\"Writing.Com
*Magnify*
SPONSORED LINKS
Printed from https://writing.com/main/view_item/item_id/2308429-Logic-Problem
Image Protector
\"Reading Printer Friendly Page Tell A Friend
No ratings.
Rated: E · Essay · Scientific · #2308429
How I solved a logic problem.
I found a logic puzzle on the web, and decided to solve it.

Here is the puzzle:

         Each picks a whole number 1 to 30.
         A: "Is your number double mine?"
         B: "I don't know. Is your number double mine?"
         A: "I don't know. Is your number half mine?"
         B: "I don't know. Is your number half mine?"
         A: "I don't know."
         B: "I know your number."
         What is A's number?


Here is my solution:

A: Is your number double mine?

B: I don't know.

         A now knows that B's number is even. We can tell that B's number is even, because an odd number
         cannot be double any whole number. Therefore, if B had chosen an odd number,
         then they would have had to answer 'No' rather than 'I don't know'.

B: Is your number double mine?

A: I don't know.

         B now knows that A's number is even, and for exactly the same reason as above.

         B can further conclude that A's number is not 2. Since A knows that B has chosen an even number and therefore
         cannot have chosen 1, in the event that A had chosen 2 their answer would have to be 'No'
         rather than 'I don't know'.

         Note that we are no longer considering odd numbers as possibilities as we have already ruled them out above.

A: Is your number half mine?

B: I don't know.

         A now knows that B's number is an even number less than or equal to 14.

         This is because if B's number were 16 or larger then it would be half of 32 or more,
         and this is beyond the upper limit stipulated.
         In such an instance B would have had to answer 'No' rather than 'I don't know'.

         A can further conclude that B has not chosen 2, 6, 10 or 14, since half of any of these would be an odd number,
         and A already knows that B has chosen an even number.

         A now knows that B has selected one of the following numbers: 4, 8, or 12.

B: Is your number half mine?

A: I don't know.

         In answering this A knows that B has chosen one of the following numbers: 4, 8 or 12,
         therefore if A had selected 2, 4, or 6 they would have to answer 'Yes' rather than I don't know.

         Now B can also conclude that A's number is less than or equal to 14, using the same logic as stated above,
         i.e. that any number of 16 or greater doubled would result in a figure beyond the stipulated range choice of 1 - 30.

         B now knows that A's number is one of the following: 4, 6, 8, 10, 12, or 14, (2 having already been eliminated earlier).

         B can then further eliminate 6, 10 and 14, because is A had chosen any one of these,
         then half that number would be as odd number (3, 5, or 7 respectively),
         and in such an instance A would have had to answer 'No' rather than 'I don't know',
         knowing that B had chosen an even number.

         This leaves just 4, 8, and 12 as possibilities.

         Since if A had chosen 8 or 12 they would have had to answer 'No' to this question,
         because A knows that B has chosen a number less than or equal to 14 and 8 or 12 are half of 16 and 24 respectively.
         Therefore the only possibility is that A has chosen 4.

B: I know your number.

B: Your number is 4.



Part of the key to solving this was realise that because it was given as a logic problem then the answers given by 'A' and 'B' would be precise. I could assume that there was enough information to solve the problem using logic.

There are three possible answers to each question, and we can make inferences based on the 'I don't know' answers, because if either 'Yes' or 'No' were the answer these answers would also convey information. It was therefore important to be aware of what each party knew at each stage, and how this must have affected their answers.

It was also useful to realise that though the answer was quickly identified as being an even number, knowing this allowed us to eliminate certain numbers because a half of that number would be an odd number.
© Copyright 2023 Adherennium - Maybe Writing? (adherennium at Writing.Com). All rights reserved.
Writing.Com, its affiliates and syndicates have been granted non-exclusive rights to display this work.
Printed from https://writing.com/main/view_item/item_id/2308429-Logic-Problem