Puzzles by Raymond Smullyan

These puzzles are adapted from the book The Lady or the Tiger? and other logic puzzles by Raymond Smullyan, which can be purchased on Amazon or checked at archive.org





Puzzle 1: How Much? This can be solved easily with a little algebra, but you are invited to make an educated guess.





Puzzle 2: A Biscuit Puzzle. This is a piece of cake.





Puzzle 3: A Curious Number Puzzle

We describe a curious machine to which you can feed positive integers X thusly:
(1) Only numbers that begin with a 2 or 3 and do not contain the digit 0 are acceptable, the others are unacceptable.
(2) If X is 2Y (that is, the leading digit of X is 2), the machine produces Y.
(3) If X is 3Y and feeding Y to the machine would produce Z, then the machine produces Z2Z.

There are many (hundreds?) of questions to ask about this machine. Here are just a few.
Find a number X which the machince accepts and
(1) produces X.
(2) produces X2X.
(3) produces 7X.
(4) produces 3X23X.





Here is the code that is used in the above interact.