# Living next door to Alice

Bob and Charlie live in a small village with 99 houses, numbered from 1 to 99. One day they meet Alice, a person who has recently moved to this village.

Bob asks her if her house number is a square number, and Alice answers his question. Bob asks further: "Is your house number greater than 50?" Alice answers this question too. Now Bob thinks he knows the house number and tries to visit Alice. However, he goes to the wrong house because Alice lied on the first question.

Later, Charlie meets Alice and asks her if her house number is a cubic number, and Alice answers his question. Charlie asks further: "Is your house number greater than 25?" Alice answers this question too. Now Charlie thinks he knows the house number and tries to visit Alice. However, he also goes to the wrong house because Alice again lied on the first question.

In reality the house number of Alice is less than the house number of Bob and less than the house number of Charlie. In addition, the sum of all three house numbers is the double of a square number.

What is Alice's house number?

• Are we to assume Alice tells the truth for the second question? – Thomas Markov Feb 5 at 15:55
• Do Bob and Charlie know that Alice's house number is less than theirs? – Tapi Feb 5 at 15:56
• Credit source. Puzzle is originally by E. R. Emmet as #48 (Sinister Street) in Brain Puzzler's Delight aka _101 Brain Puzzles) – Mark Tilford Feb 6 at 3:19
• In a village so small, it is presumable Bob and Charlie know many others in the village, where they live, and which houses were empty prior to Alice's arrival. There are many possibilities. You might want to edit the sketch to Bob and Charlie too being new arrivals. – JJM Driessen Feb 6 at 10:37
• Alice? Who the f*** is alice? – Hybrid Web Dev Feb 7 at 2:23

Alice's house number is

$$55$$

Reasoning

In the first case, Bob's two questions lead him to believe that he knows Alice's house number. This means that there can be at most $$2$$ options remaining as a result of Alice's answers to Bob's questions and that he can rule out one of them because he knows where he lives himself. The only combination of answers that leave at most two options remaining is Yes/Yes which leaves house numbers $$64$$ and $$81$$ as Bob's options.

Similarly, the answers to Charlie's questions must leave at most two options. In this case there are two possibilities: Alice answers Yes/No, leaving $$1$$ and $$8$$ or Alice answers Yes/Yes leaving $$27$$ and $$64$$.

Now we know that Charlie cannot live in number 1 since Alice must live in a smaller house number. This means that the possibilities for Bob and Charlie's house numbers are $$(81,64), (81,27), (81,8), (64,27), (64,8)$$
Given the last condition, the possibilities for Alice's house are $$17$$, $$55$$, $$20$$ or $$7$$. Now, interpreting the statement "Alice lied about the first question" to mean "Alice only lied about the first question" and considering that each second question must be true, we find that the only viable option is 55.
That is, Bob=81, Charlie=64, Alice=55.

• by six seconds you beat me! :) – SteveV Feb 5 at 15:58
• Hex beat Steve by 6 seconds. – Thomas Markov Feb 5 at 15:59
• @ThomasMarkov By how many seconds did SteveV beat you to that comment?? ;-) – Stiv Feb 5 at 16:04
• 9 seconds, I was reading both answers haha – Thomas Markov Feb 5 at 16:04
• This street must be a nightmare for postmen if Bob and/or Charlie are indeed living next door to Alice – Mohirl Feb 5 at 16:45

She live in

55

Because

Bob thought he knew the answer so her first answer must have been yes, it is a square and her second answer was yes it is over 50. This is the only combination that results in two possibilities 64 and 81. Bob must live in one of those two and tried the other one

Also

Charlie thought he knew the answer so her first answer must have been yes, it is a cube and yes it is over 25 (she didn't lie and we already know it's over 50). So Charlie thought she was in 27 or 64 and he must have lived in one so tried the other.

Then

Say Charlie lives in 27. then Bob lives in 64 or 81 and Alice lives in 26. 26+27+64 = 117, which is not double a square and 26+27+81=134 which is also not a double of a square.

So

Charlie lives in 64, Bob in 81 which sum to 145. 200 is the only double of a square that fits the parameters so Alice lives in 55.

• It's nice to see that you got the same answer. – hexomino Feb 5 at 15:59

I think I have it (I guess others beat me to it though).

Alice is in 55.

Reasoning

The key to this problem is that both Bob and Charlie think they know after Alice answers two questions. First, note that there are much fewer squares and cubes that numbers that are not squares or cubes. So Alice answered yes to the first question when either guy asked (but was lying). The squares are $$1,4,9,16,25,36,49,64,81$$ There are two squares above $$50$$. What happened is that Bob lives in either 64 or 81 so when Alice said yes to both questions he knows she lives in the other one. The cubes are $$1,8,27,64$$. When Alice says yes to the second question Charlie could live in either $$27$$ or $$64$$ (we know she says yes to being greater than 50 and isn't lying so she must be greater than 25). Now we can just try all the possibilities there are only 4 of them. We can find the only feasible solution to be Bob is in 81, Charlie is in 64, and Alice is in 55 ($$81 + 64 + 55 = 2 \times 10^2$$).

Is it

64

Because Alice said

"No" to the first questions. Hence, $$64$$ which is both a perfect cube and a perfect square. $$4^3=8^2$$. Alice + Bob+ Charlie=$$64+80+98=242=2*11^2$$.

• why should Bob think he knows the number ?? – daw Feb 5 at 15:50

I came up with

54, which seems to be wrong based on the checkmark.

That said,

If Charlie deduces that he knows, then he must live in 64 or 81 (and think she lives in the other) as those are the only ones that could be set up for elimination by his two questions.

After,

If Bob deduces that he knows, and we already know she lives in something above 50 (as she presumably didn't lie on question two to Charlie), then he lives in either 27 or 64 and visited the other one.

I then make the presumption

Bob and Charlie would both already know if their counterpart in this question is living in 64 (small village, and they're asking Alice because she's new) and therefore they must live in 27/81 and both tried 64.

27 + 81 = 108; the only way to get to a doubled square from that sum with a number in the range 51-99 is by adding 54 to get 162 (2*81).

• Good reasoning, but this fails the premise "In reality the house number of Alice is less than the house number of Bob and less than the house number of Charlie". One has to be very careful when making presumptions! – wimi Feb 6 at 9:29
• Ahhhh, that's the condition I was missing! I got dialed in on the doubled-square thing and forgot to re-read. Thanks! – Calvin Feb 6 at 14:06

Since we don't know how Alice responded, and know nothing about houses of Bob and Charlie, if we assume no/no for the questions, then Alice's house number can be:

1 (Bob - 2, Charlie - 5 => 1+2+5=8=2*(4=2^2)) 8 (Bob - 10, Charlie - 18 => 8+10+14=32=2*(4^2)) .... and so on :)

And if we take other combinations of yes/no, we'll have other numbers :)

• ouch ... I've made a mistake with the 8 :D – guest Feb 14 at 10:35
• If you made a mistake, you can always edit your answer to fix it. – Rand al'Thor Feb 14 at 11:45

I have a very different answer and a slightly different approach.

50+25+23= 98 = 2(49).