3
$\begingroup$

A party is being held at a local mansion. The host is very rich and his success is because of one thing — his famous recipe for Spaghetti!

The only guests that may attend are people who correctly reply to the guard at the door.

Here's where you come in. You and a friend are trying to steal this recipe. You sneak by and listen to the passwords.

The first guest arrives. The security says "5", and the guest replies "2".

The second guest arrives. The security says "6", the guest replies "2".

The third guest arrives. The security says "3", the guest replies "2".

Your friend thinks he's got it all figured out so he walks up to the door and the security says "2". He replied "2", and is tarred and feathered and sent away in shame.

Another guest arrives, security says "0" and he says "0" to get in.

You walk up and get a "4" from security. What is your response?

Thanks for the ideas, credits to:

Part 1 was created by warspyking and is found here: The Security to the Party

Part 2 in Mew's version The Security to the Party [Part 2]

Part 3 in Kelvin Barsana's version The Security to the Party [Part 3]

$\endgroup$
7
  • $\begingroup$ why is it part 4, its a variation, why do you call it "part"? $\endgroup$
    – skv
    Commented Nov 11, 2014 at 7:32
  • 1
    $\begingroup$ @skv, hey - that's a good riddle. I'll post it as a separate question. $\endgroup$
    – JNF
    Commented Nov 11, 2014 at 7:35
  • $\begingroup$ probably because the other are also named part 2, part 3, et cetera $\endgroup$
    – Mathias711
    Commented Nov 11, 2014 at 7:35
  • 1
    $\begingroup$ @skv, ;). just because the rest of them did. $\endgroup$
    – JNF
    Commented Nov 11, 2014 at 7:35
  • 2
    $\begingroup$ woohoow, one answer correct! $\endgroup$
    – Mathias711
    Commented Nov 11, 2014 at 7:36

2 Answers 2

12
$\begingroup$

Answer:

Respond $1$.

Explanation:

Put x into binary. The number of 1s in the result is the answer. Here is a key for the given numbers: $$\begin{align}5&=101 &\rightarrow 2 \\ 6&=110 &\rightarrow 2 \\ 3&=11 &\rightarrow 2 \\ 2&=10 &\rightarrow 1 \\ 0&=0 &\rightarrow 0 \\ 4&=100 &\rightarrow 1\end{align}$$

$\endgroup$
7
$\begingroup$

Number of 1's in the binary code of the decimal number being called.....

So for 4 the response should be

1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.