I have tried to solve this but I can't. Does somebody know the answer?
Ref: Puzzle World, Ed. Nob Yoshigahara and Richard Bozulich, Ishi Press, Summer 1992, Pilot Edition.
Puzzling Stack Exchange is a question and answer site for those who create, solve, and study puzzles. It only takes a minute to sign up.Sign up to join this community
Since this does not have the no-computers tag I have used a computer to
find the single solution
P,U,Z,L,E,W,O,R,Dbeing unique digits in $[0,9]$, and
- all instances of
xfree to be any digit.
That solution is
P,U,Z,L,E,W,O,R,D = 6,9,5,0,3,7,8,2,1.
Numerically on the left, and with the character
4on the right:
695503 PUZZLE 6684445 PPOXXXZ ------- * ------- * 3477515 EXWWZDZ 2782012 RWORLDR 2782012 RWORLDR 2782012 RWORLDR 5564024 ZZPXLRX 4173018 XDWELDO 4173018 XDWELDO ------------- + ------------- + 4649051550835 XPXULZDZZLOEZ
I did it in a relatively similar way to a manual approach
I haven't made all the inferences I would make manually, but I have reduced the space in steps that would probably be used as part of a manual approach (one would prune more of the space than we need to with a computer, since they calculate so fast):
If one labels the multiplicand
x6,x5,x4,x3,x2,x1,x0then the innermost generator (the third function) looks for values of
P,U,Z,Z,L,E(with unique digits
x3(in $[0,9]$) that produce a valid
x,W,O,R,L,D,xintermediate sum (with unique digits
P,U,Z,L,E,W,O,R,D) - there are $242$ such choices.
The generator that wraps around that (the second function) then runs through these choices and looks for values of
x5,x4,x2,x1that produce intermediate sums with the matching
W,O,L,D- this yields $2,315$ choices.
The generator that wraps around that (the first function) then runs through these choices and looks for values of
x6,x0that produce a final result matching
x,P,x,U,x,Z,x,Z,x,L,x,E,x- this yields a single result (the two multiplicands as stings).
The Python code:
from itertools import combinations, permutations def iterSolutions(): for puzzle, puzzleInt, x1, x2, x3, x4, x5 in iterValid_Puzzle_PuzzleInt_X1_X2_X3_X4_X5(): p, u, z, z, l, e = puzzle pX = (10 * x1 + 100 * x2 + 1000 * x3 + 10000 * x4 + 100000 * x5) for x6 in range(10): pR = puzzleInt * (1000000 * x6 + pX) for x0 in range(10): r = str(puzzleInt * x0 + pR) newP = len(r) > 11 and r[-12] or '0' if newP == p: newU = len(r) > 9 and r[-10] or '0' if newU == u: newZ = len(r) > 7 and r[-8] or '0' if newZ == z: newZ = len(r) > 5 and r[-6] or '0' if newZ == z: newL = len(r) > 3 and r[-4] or '0' if newL == l: newE = len(r) > 1 and r[-2] or '0' if newE == e: yield puzzle, ''.join(str(v) for v in (x6, x5, x4, x3, x2, x1, x0)) def iterValid_Puzzle_PuzzleInt_X1_X2_X3_X4_X5(): for puzzle, puzzleInt, x3, w, o, d in iterValid_Puzzle_PuzzleInt_X3_W_O_D(): for x1 in range(10): s1 = str(puzzleInt * x1) wNew = len(s1) > 5 and s1[-6] or '0' if wNew == w: for x2 in range(10): s2 = str(puzzleInt * x2) oNew = len(s2) > 4 and s2[-5] or '0' if oNew == o: l = puzzle for x4 in range(10): s4 = str(puzzleInt * x4) lNew = len(s4) > 2 and s4[-3] or '0' if lNew == l: for x5 in range(10): s5 = str(puzzleInt * x5) dNew = len(s5) > 1 and s5[-2] or '0' if dNew == d: yield puzzle, puzzleInt, x1, x2, x3, x4, x5 def iterValid_Puzzle_PuzzleInt_X3_W_O_D(): for puzzleSelection in combinations('9876543210', 5): for p,u,z,l,e in permutations(puzzleSelection): puzzle = ''.join((p,u,z,z,l,e)) puzzleSet = set(puzzle) puzzleInt = int(puzzle) for x3 in range(10): s3 = str(puzzleInt * x3) if len(s3) == 5: w = '0' elif len(s3) < 5: continue else: w = s3[-6] d,l,r,o = s3[-2:-6:-1] if l != puzzle: continue if len(puzzleSet | set((w,o,r,d))) == 9: yield puzzle, puzzleInt, x3, w, o, d
Running that code (sub-second):
Which is saying the only solution is
>>> for solution in iterSolutions(): ... solution ... ('695503', '6684445') >>>
695503 * 6684445, the multiplication I showed above.