Announcement: Be excellent to each other.


Caravel Forum : Other Boards : Forum Games : Puzzle "tag" (Don't forget to read the rules in the first post!)
<<57585960
Page 61 of 88
62636465>>
New Topic New Poll Post Reply
Poster Message
stigant
Level: Smitemaster
Avatar
Rank Points: 1182
Registered: 08-19-2004
IP: Logged
icon Re: Puzzle "tag" (0)  
Well, since this seems to have kind of petered off again, I've got a puzzle that I really like, so I'm going to post it. If somebody feels like its their turn, then feel free to post your puzzle over mine.

Most people are familiar with the basic number guessing game: I think of a number between, say, 1 and 100, and you guess numbers until you guess the correct number. After each guess, I tell you whether your number is too high, too low, or just right. The optimal strategy (from the standpoint of minimizing the maximum number of guesses) is to guess in the middle (round up or down) of the currently valid range. For example, you would guess 50, and if that was too high, guess 25, and if that was too low, guess 37, and so on. The maximum number of guesses, in the worst case scenario is ceiling(log2(99)) = 7 (for example, if my number is 1, then you'll guess 50 (high), 25 (high), 13 (high), 7 (high), 4 (high), 2 (high) 1 (got it)).

We're actually going to play a different game. I will again think of a number. This time it will be between 1 and 80 inclusive (ie it could possibly be 1 or 80). You will guess numbers and I will answer with either too high (ie your guess is strictly larger than my number), or not too high (ie your guess is either correct or smaller than my number). Note that if you guess the correct answer, that is not the end of the game, as it does not mean that you know the correct answer. The game will end when you tell me that you know my number for sure (at which time you will tell me the number and I will confirm your "final answer"). There is an additional catch, however. If you guess too high, you get a strike against you. If you get two strikes then you must immediatly decide on your final answer. You can guess low/equal as many times as you like, but if you guess high twice (not twice in a row, mind you, twice total) then the game is over and you must decide what the correct answer is.

So the question is this: What is the optimal strategy for guessing my number in the fewest number of guesses? How many guesses do you need?

Here are an example strategy:

low-ball: guess 1, 2, 3, 4, in order until I tell you "too high". The answer is the last "not too high" guess. You will only receive one strike (or none, if the answer is 80), but you will take, in the worst case scenario 80 guesses.

Obviously, that's not too good. Can you find a better strategy?

Edit:
I did actually lift this from somewhere else. I believe my formulation is basically equivalent (although I changed the range of values):
Hamline University Problem Corner

____________________________
Progress Quest Progress

[Last edited by stigant at 11-13-2006 06:51 PM]
11-13-2006 at 06:45 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Doom
Level: Smitemaster
Avatar
Rank Points: 3226
Registered: 07-05-2004
IP: Logged
icon Re: Puzzle "tag" (0)  
My answer:

Click here to view the secret text

11-13-2006 at 07:06 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
jamesdenem
Level: Master Delver
Rank Points: 203
Registered: 07-03-2006
IP: Logged
icon Re: Puzzle "tag" (0)  
I think I have found the best way to figure out the number, with a worst case scenario of 16 guesses.(For the example of 1 to 80 inclusive).
Click here to view the secret text


Hopefully this is explicit enough and accurate enough to be correct.

____________________________
This signature intenionally left blank. Disregard any text you may find here, because it is probably just your imagination, and not a signature in any way. We mean it, don't believe that there is text here.
11-13-2006 at 07:09 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Doom
Level: Smitemaster
Avatar
Rank Points: 3226
Registered: 07-05-2004
IP: Logged
icon Re: Puzzle "tag" (0)  
Ack, I just realised that I've solved a very similar puzzle before. Yeah, my answer isn't correct.
11-13-2006 at 07:16 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
stigant
Level: Smitemaster
Avatar
Rank Points: 1182
Registered: 08-19-2004
IP: Logged
icon Re: Puzzle "tag" (0)  
Clearly, Doom's answer is not as good as jamesdenem, but there is a better answer still.

____________________________
Progress Quest Progress
11-13-2006 at 07:21 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Blondbeard
Level: Smitemaster
Avatar
Rank Points: 1486
Registered: 03-31-2005
IP: Logged
icon Re: Puzzle "tag" (0)  
I guess you should assume that the number is randomized :) Elseway I think that people would in this game more often than not be evil, and choose high numbers.
11-13-2006 at 07:29 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Kevin_P86
Level: Smitemaster
Avatar
Rank Points: 535
Registered: 06-28-2005
IP: Logged
icon Re: Puzzle "tag" (0)  
Perhaps
Click here to view the secret text


____________________________
+++++[>+++++<-]>[>+++>++++>+++++<<<-]>.>+.>-------.<++++.+++++.

[Last edited by Kevin_P86 at 11-13-2006 07:31 PM]
11-13-2006 at 07:31 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
stigant
Level: Smitemaster
Avatar
Rank Points: 1182
Registered: 08-19-2004
IP: Logged
icon Re: Puzzle "tag" (0)  
Blondbeard - Well, the idea is to minimize the number of guesses in the worst case scenario (ie when the number chooser is being as evil as possible).

Kevin - there's a better answer still. The answer I have in mind (and I think I have a proof of optimality) is different, but not wholly different from those presented. You are missing a key insight.

In fact, if you think about why blondbeard's suggestion works, that might guide you in the correct direction.

____________________________
Progress Quest Progress

[Last edited by stigant at 11-13-2006 07:36 PM]
11-13-2006 at 07:32 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Blondbeard
Level: Smitemaster
Avatar
Rank Points: 1486
Registered: 03-31-2005
IP: Logged
icon Re: Puzzle "tag" (0)  
Well I have a guess... I have been quite hasty, so I might be wrong.
Click here to view the secret text

11-13-2006 at 07:50 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
stigant
Level: Smitemaster
Avatar
Rank Points: 1182
Registered: 08-19-2004
IP: Logged
icon Re: Puzzle "tag" (0)  
You're getting closer (you're on the right track) but you can do better still.

____________________________
Progress Quest Progress
11-13-2006 at 07:54 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Blondbeard
Level: Smitemaster
Avatar
Rank Points: 1486
Registered: 03-31-2005
IP: Logged
icon Re: Puzzle "tag" (0)  
Ehhm :? I realize I'm not so clear as to how you should solve the puzzle, but
Click here to view the secret text

11-13-2006 at 07:56 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Blondbeard
Level: Smitemaster
Avatar
Rank Points: 1486
Registered: 03-31-2005
IP: Logged
icon Re: Puzzle "tag" (0)  
I'm an total idiot!

Click here to view the secret text

11-13-2006 at 08:04 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Blondbeard
Level: Smitemaster
Avatar
Rank Points: 1486
Registered: 03-31-2005
IP: Logged
icon Re: Puzzle "tag" (0)  
Also: If I may not answer due to already having given an answer, please ignore my post.

[Last edited by Blondbeard at 11-13-2006 08:07 PM]
11-13-2006 at 08:07 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
stigant
Level: Smitemaster
Avatar
Rank Points: 1182
Registered: 08-19-2004
IP: Logged
icon Re: Puzzle "tag" (0)  
You got it. In general, n guesses will be sufficient to guess from a range of 1 + n(n+1)/2 numbers. If the range had been 1-79 instead of 1-80, then you would only need 12 guesses.

____________________________
Progress Quest Progress
11-13-2006 at 09:10 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
TripleM
Level: Smitemaster
Rank Points: 1373
Registered: 02-05-2003
IP: Logged
icon Re: Puzzle "tag" (0)  
The guess-a-number idea reminded me of something. (Blondbeard, feel free to post the next puzzle in place of mine, but I thought I'd throw this up in the air).

Lets suppose you had to guess a number from 1 to 100 again, with the usual 'too high' or 'too low' (or 'you got it'). However, I'm not going to tell you the answer until after your *next* guess. Thus, after your first guess I say nothing; after your second I give the answer to your first, after your third I give the answer to your second, etc.

What do you do?

OK, I'm not actually sure of the answer to this puzzle; I saw a generalised version as a programming puzzle, but I'll be interested to see what people come up with. I can probably work out the answer in this case; the person who comes up with the right 'starting guesses' wins. If I can work it out by then.

(edit - by the way, your aim is to guess the correct number (not just figure it out))
(double edit - OK, I've printed out a list of all possible first-two-guesses. Theres quite a few. First person to name a pair on my list..)


[Last edited by TripleM at 11-13-2006 11:44 PM]
11-13-2006 at 11:13 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
jamesdenem
Level: Master Delver
Rank Points: 203
Registered: 07-03-2006
IP: Logged
icon Re: Puzzle "tag" (0)  
While waiting for the next puzzle to come, if Blondbeard decides to do one, I might as well try this one out.

Err, wouldn't figuring out what the correct number is mean you could guess it?
Click here to view the secret text


____________________________
This signature intenionally left blank. Disregard any text you may find here, because it is probably just your imagination, and not a signature in any way. We mean it, don't believe that there is text here.
11-14-2006 at 12:55 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
RoboBob3000
Level: Smitemaster
Avatar
Rank Points: 1980
Registered: 10-23-2003
IP: Logged
icon Re: Puzzle "tag" (0)  
I haven't proven it to myself entirely yet, but I'm going to take a guess and go with 33 and 78 (or 66 and 22).

____________________________
http://beepsandbloops.wordpress.com/
11-14-2006 at 04:53 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
TripleM
Level: Smitemaster
Rank Points: 1373
Registered: 02-05-2003
IP: Logged
icon Re: Puzzle "tag" (0)  
Hm. On second thought, now that I've actually listed all my answers, I'm rather confused. According to my program, there are over 3000 possible pairs of starting guesses which lead to the optimal number of guesses (11), including both of the above possibilities. Also including guessing 50 twice. Either I'm working out something wrong, or this is a much stranger puzzle than I thought..
11-14-2006 at 05:17 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
Blondbeard
Level: Smitemaster
Avatar
Rank Points: 1486
Registered: 03-31-2005
IP: Logged
icon Re: Puzzle "tag" (0)  
Okay :) I have a "puzzle". I think it's quite neat, and I'll post it after TripleM's puzzle. Or should I post it now?
11-14-2006 at 10:01 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Maurog
Level: Smitemaster
Avatar
Rank Points: 1501
Registered: 09-16-2004
IP: Logged
icon Re: Puzzle "tag" (0)  
Here is what I think to be a solution to TripleM's puzzle:
                             W
            Gi                                      Gi+1
|===========O=======================================O========|
 ----------- ------------------------------------------------
     W1                                 W2           --------
                                                        W21
Looks monstrous doesn't it? W is the remaining pool of possible values (100 at the beginning). Gi+1 is the last guess point, and Gi is the one before last. i is the number of guesses it takes us.

It's trivial that once we find the optimal formula of check point according to current pool, it will work for the next, shortened pool. We guess Wi+1 before we know if the answer is higher than Wi or not. So if the answer is in W1 we wasted one guess. It either takes us two guesses to shorten the pool to W1 or one guess to shorten the pool to W2. Since we are assuming the worst case scenario, the derivation formula is:
guess( W, i ) = max( guess( W1, i+2 ), guess( W2, i+1 ) )

When will this value be minimal? When guess( W1, i+2 ) = guess( W2, i+1 ).

Of course guess(1, i) = i is our stop condition (the pool shortened to one value, the number of guesses is i).

We are looking for a part of W where the point should optimally be, i.e. a p so that guess( W * p, i+2 ) = guess( W * (1-p), i+1 ) Let's assume it exists, and the equasion is true, then by deriving we see that:
guess( W, 0 ) = guess( W*p*p*p*...*p (=1), 0+2+2+...+2 )
guess( W, 0 ) = guess( W*(1-p)*(1-p)*(1-p)*...*(1-p) (=1), 0+1+1+...+1 )


But the result is the same, so we know 0+2+2+...+2 = 0+1+1+...+1, so there are twice as many '+1' as '+2', which means
p^(2i) = (1-p)^i => p^2 = (1-p)

This is a quadratic solution which gives us p = 0.381966014

So the optimal fraction of W to put the next point on is about 38%, and applied to the problem the first two numbers should be 38 and about 76, or symmetric equivalents (38 and 62, 62 and 24, 62 and 38).

____________________________
Slay the living! Raise the dead!
Paint the sky in crimson red!
11-14-2006 at 01:11 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
stigant
Level: Smitemaster
Avatar
Rank Points: 1182
Registered: 08-19-2004
IP: Logged
icon Re: Puzzle "tag" (0)  
Off topic:

I'm thiiiinking of a number between 450 and 850. Do you know what it is?

____________________________
Progress Quest Progress
11-14-2006 at 02:24 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
zex20913
Level: Smitemaster
Avatar
Rank Points: 1723
Registered: 02-04-2003
IP: Logged
icon Re: Puzzle "tag" (+1)  
It's my credit score! And it just happens to be something I don't care to hear about from you! Haha!

____________________________
Click here to view the secret text

11-14-2006 at 07:40 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Watcher
Level: Smitemaster
Avatar
Rank Points: 902
Registered: 02-04-2003
IP: Logged
icon Re: Puzzle "tag" (+2)  
Here's another approach to TripleM's problem:

I'm going to define a sequence, S(n). I'll define it by these rules:

S(0) = 0
S(1) = 1
S(n) = S(n-1) + S(n-2) + 1


Here are the first eleven numbers in this sequence:

0, 1, 2, 4, 7, 12, 20, 33, 54, 88, 143

Now, I claim that given n guesses, with possible answers "too high", "too low", and "correct", and a delay of one question on the answers, it is possible to figure out any number between 1 and S(n). Furthermore, your first guess will always be S(n-1) + 1.

Proof by induction:

For n = 1, there's only S(1) = 1 number, so you use your one guess to guess that number, 1. It's equal to S(0) + 1

For n = 2, there are S(2) = 2 numbers. Since you have 2 guesses and you have to specify both before getting any answers, you simply guess first 2 (which is equal to S(1) + 1), then 1.

For larger n, you guess S(n-1) + 1, followed by S(n-2) + 1. You are now told whether S(n-1) + 1 was correct.

If it's correct, great.

If it's too high, you now have to guess a number between 1 and S(n-1). Also, you have n-1 guesses, of which you have already specified that the first one is S(n-2) + 1. This is exactly the induction hypothesis for n-1, so this situation is solvable.

If it's too low, your second guess was wasted. You now have to guess a number larger than S(n-1) + 1, but smaller than or equal to S(n). The number of possibilities is S(n) - (S(n-1) + 1) = S(n-2), and you have n-2 guesses. By the induction hypothesis, this situation is solvable.

Hence, with 10 guesses you can guess any number from 1 to 143, and your first two guesses should be 89 and 55.

____________________________
Today the refrigerator, tomorrow the world!
11-14-2006 at 08:07 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
TripleM
Level: Smitemaster
Rank Points: 1373
Registered: 02-05-2003
IP: Logged
icon Re: Puzzle "tag" (0)  
Excellent. Looks like you were both right; the fact that 100 was not a 'nice' number gave lots of answers, but changing it to 143 gives precisely what both of you came up with. Very nice.
And yes, Blondbeard, post away :)
11-14-2006 at 09:02 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Blondbeard
Level: Smitemaster
Avatar
Rank Points: 1486
Registered: 03-31-2005
IP: Logged

File: ugly graph.JPG (8.2 KB)
Downloaded 254 times.
License: Public Domain
icon Re: Puzzle "tag" (0)  
Alright... This is not really a puzzle, but I think it's neat. I guess everybody is familliar with the chain rule?
d(g(f(x))/dx = (df(x)/dx)* dg(y)/dy where y = f(x).

My impression is that a lot of people use this rule without really understandig why it looks like it does. You can very well explain it in words, but a picture sometimes says more than a thousand words, and just for fun I came up with a way of showing the rule graphically. I made a simple picture on squared paper. So your goal is this: come up with a graphically apealing way to present the chain rule where the chain rule can trivially be obtained in your picture, and explain how you think.

The picture don't have to look very good. Just show the principle. Also the functions f(x) and g(y) might be choosen to be quite simple, as long as it's obvious that it doesn't matter what functions you choose for the result you obtain.

Here is an example picture where I have painted the function x^2. It's not pretty, but it's "good enough".


If needed I can post hints. Also: If you think this puzzle sucks, since it isn't really a puzzle, please tell me so.



[Last edited by Blondbeard at 11-14-2006 09:23 PM]
11-14-2006 at 09:22 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Znirk
Level: Smitemaster
Avatar
Rank Points: 613
Registered: 07-28-2005
IP: Logged
icon Re: Puzzle "tag" (0)  
Not that I have a solution, but ...
Blondbeard wrote:
I guess everybody is familliar with the chain rule?
... let me be the first to say that I haven't the faintest trace of a clue what you're talking about :fun
11-14-2006 at 09:34 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Kevin_P86
Level: Smitemaster
Avatar
Rank Points: 535
Registered: 06-28-2005
IP: Logged
icon Re: Puzzle "tag" (0)  
Znirk wrote:
Not that I have a solution, but ...
Blondbeard wrote:
I guess everybody is familliar with the chain rule?
... let me be the first to say that I haven't the faintest trace of a clue what you're talking about :fun
It's a differentiation rule - used in Calculus.

____________________________
+++++[>+++++<-]>[>+++>++++>+++++<<<-]>.>+.>-------.<++++.+++++.
11-14-2006 at 09:36 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Blondbeard
Level: Smitemaster
Avatar
Rank Points: 1486
Registered: 03-31-2005
IP: Logged
icon Re: Puzzle "tag" (0)  
Okay... Change of plans. Obviously I was the only one who thought my previous idea was neat. Here's a new puzzle instead.

Why is Christmas (25 dec) and Halloween (31 okt) mathematically equal?
11-16-2006 at 09:14 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Kevin_P86
Level: Smitemaster
Avatar
Rank Points: 535
Registered: 06-28-2005
IP: Logged
icon Re: Puzzle "tag" (0)  
Blondbeard wrote:
Why is Christmas (25 dec) and Halloween (31 okt) mathematically equal?
here :)

____________________________
+++++[>+++++<-]>[>+++>++++>+++++<<<-]>.>+.>-------.<++++.+++++.
11-16-2006 at 09:22 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Blondbeard
Level: Smitemaster
Avatar
Rank Points: 1486
Registered: 03-31-2005
IP: Logged
icon Re: Puzzle "tag" (0)  
:blush :( :~(

I give up! I really ought to never post here again. If anyone have a puzzle, feel free to post it.
11-16-2006 at 09:35 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
<<57585960
Page 61 of 88
62636465>>
New Topic New Poll Post Reply
Caravel Forum : Other Boards : Forum Games : Puzzle "tag" (Don't forget to read the rules in the first post!)
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.