# Riddle for you guys

Discussion in 'BlackHat Lounge' started by J0kerz, Dec 12, 2010.

1. ### J0kerzSupreme Member

Joined:
Nov 2, 2009
Messages:
1,441
443
Occupation:
IM
Location:
There
A guy tells you:

I will pick a random number between 0 and 100.
I will give you X\$ if you find the exact number.

The rules are simple: You have to give me 1\$ for every questions you ask about this number and I must only answer by YES or NO.

What is the minimal amount I should give you to make sure you always make a profit? (X\$)

Last edited: Dec 12, 2010
2. ### lewiElite Member

Joined:
Aug 5, 2008
Messages:
2,316
825
First of all "OUCH!" as walking into a bar would have hurt!

Secondly he never says how much he will pay if you guess the number correctly and so it could be \$0 and so the minimum would be 0!

Lewi

• Thanks x 1
3. ### extremephpBANNEDBANNED

Joined:
Oct 19, 2010
Messages:
1,293
1,277
The minimum about You should give me is the number of Questions asked till telling the answers!

It can be anywhere from \$0 to \$99, with regards to when he gets the answer!!

~ExP~

4. ### M1ndfluXSenior Member

Joined:
Dec 23, 2009
Messages:
1,129
874
Location:
031010
dont you have anything to scale up?

5. ### GreyWolfExecutive VIP

Joined:
Aug 17, 2009
Messages:
1,935
5,683
Gender:
Male
Occupation:
Artist / Craftsman
Location:
sitting at my PC
I think the max number of questions needed to know the answer is 7. So to guarantee a profit no matter what payout would need to be greater than \$7.

6. ### hartianNewbie

Joined:
Aug 20, 2009
Messages:
31
14
Location:
13.0827° N, 80.2707° E
The minimum payout should be 10\$...

7. ### tacopalypseExecutive VIPJr. VIPPremium Member

Joined:
Nov 30, 2009
Messages:
987
2,502
yea its \$7 because 100 is between 2^6 and 2^7
so a binary search on 100 items would require 7 guesses

8. ### lethbridgeJunior Member

Joined:
Sep 20, 2010
Messages:
138
42
Occupation:
Location:
yes it would take 6 questions to arrive at a definite answer.

Joined:
Nov 2, 2009
Messages:
1,441