rec.puzzles Archive

Sally and Sue have a strong desire to date Sam.

logic/same.street

Problem

Sally and Sue have a strong desire to date Sam.  They all live on the
same street yet neither Sally or Sue know where Sam lives.  The houses
on this street are numbered 1 to 99.

Sally asks Sam "Is your house number a perfect square?".  He answers.
Then Sally asks "Is is greater than 50?".  He answers again.

Sally thinks she now knows the address of Sam's house and decides to
visit.

When she gets there, she finds out she is wrong.  This is not
surprising, considering Sam answered only the second question
truthfully.

Sue, unaware of Sally's conversation, asks Sam two questions.
Sue asks "Is your house number a perfect cube?".  He answers.
She then asks "Is it greater than 25?".  He answers again.

Sue thinks she knows where Sam lives and decides to pay him a visit.
She too is mistaken as Sam once again answered only the second 
question truthfully.

If I tell you that Sam's number is less than Sue's or Sally's,
and that the sum of their numbers is a perfect square multiplied
by two, you should be able to figure out where all three of them
live.
Show solution
Sally asks Sam "Is your house number a perfect square?".  He answers.
Then Sally asks "Is is greater than 50?".  He answers again.

Sally thinks she now knows the address of Sam's house and decides to
visit.

        Since Sally thinks that she has enough information, I deduce
        that Sam answered that his house number was a perfect square
        greater than 50.  There are two of these {64,81} and Sally must
        live in one of them in order to have decided she knew where Sam
        lives.

When she gets there, she finds out she is wrong.  This is not
surprising, considering Sam answered only the second question
truthfully.

        So Sam's house number is greater than 50, but not a perfect
        square.

Sue, unaware of Sally's conversation, asks Sam two questions.
Sue asks "Is your house number a perfect cube?".  He answers.
She then asks "Is it greater than 25?".  He answers again.

        Observation: perfect cubes greater than 25 are {27, 64}, less
        than 25 are {1,8}.

Sue thinks she knows where Sam lives and decides to pay him a visit.
She too is mistaken as Sam once again answered only the second 
question truthfully.

        Since Sam's house number is greater than 50, he told Sue that
        it was greater than 25 as well.  Since Sue thought she knew
        which house was his, she must live in either of {27,64}.

If I tell you that Sam's number is less than Sue's or Sally's,

        Since Sam's number is greater than 50, and Sue's is even
        bigger, she must live in 64.  Assuming Sue and Sally are not
        roommates (although awkward social situations of this kind are
        not without precedent), Sally lives in 81.

and that the sum of their numbers is a perfect square multiplied
by two, you should be able to figure out where all three of them
live.

        Sue + Sally + Sam = 2 p^2        for p an integer
        64  + 81    + Sam = 2 p^2

        Applying the constraint 50 < Sam < 64, looks like Sam = 55 (p = 10).

        In summary,
                Sam = 55
                Sue = 64
                Sally = 81

    -- Tom Smith <tom@ulysses.att.com>