All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Logic
7 boolean Questions (Posted on 2013-07-19) Difficulty: 4 of 5
I am thinking of an integer n with 0 <= n <= 15.

To figure out what number I'm thinking of, you can ask me 7 yes-or-no questions -- questions that can only be answered with either "yes" or "no".

The questions must be independent of each other, their answers, and the order in which they are answered. (So you can't ask a question like, "if the answer to the previous question was "yes", then is n larger than 10, otherwise is n even?")

When you ask me your seven questions, I am allowed to LIE about at most one of the answers. What seven questions can you ask to determine n?

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Hi, Mr Hamming | Comment 1 of 3

Prior to asking my questions I  would ask you to write your number in a binary base (4 bits)

and then add 3 parity check bits to create a 7- bit Hamming word.

<o:p> </o:p>

If you do not know how to do it - http://users.cs.fiu.edu/~downeyt/cop3402/hamming.html

will provide the necessary guidance.

<o:p> </o:p>

Then I will ask you (in any order) my 7 independent questions:

<o:p> </o:p>

Is the leftmost bit  1?

Is the 2nd from left bit  1?
……etc

Is the   rightmost bit 1?

You can either answer truthfully or lie once.

No problem – 2^3 combination will indicate the erroneous place (7 possibilities) or

will warrant the right data. 

<o:p> </o:p>


  Posted by Ady TZIDON on 2013-07-19 16:39:48
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (7)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information