CTK Exchange
CTK Wiki Math
Front Page
Movie shortcuts
Personal info
Awards
Terms of use
Privacy Policy

Interactive Activities

Cut The Knot!
MSET99 Talk
Games & Puzzles
Arithmetic/Algebra
Geometry
Probability
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
My Logo
Math Poll
Other Math sit's
Guest book
News sit's

Recommend this site

Manifesto: what CTK is about Search CTK Buying a book is a commitment to learning Table of content Products to download and subscription Things you can find on CTK Chronology of updates Email to Cut The Knot Recommend this page

CTK Exchange

Subject: "Puzzle...Recurrence to aid?"     Previous Topic | Next Topic
Printer-friendly copy     Email this topic to a friend    
Conferences The CTK Exchange College math Topic #711
Reading Topic #711
Akash Kumar
Member since Aug-24-07
Apr-06-09, 07:00 AM (EST)
Click to EMail Akash%20Kumar Click to send private message to Akash%20Kumar Click to view user profileClick to add this user to your buddy list  
"Puzzle...Recurrence to aid?"
 
   Demon's Dungeon
================

Source - I "did not" know the source. At least, I did not before I posted the problem below at AOPS wherefrom I learnt that it was from a new puzzle book called Mathematical Mind-Benders by Peter Winkler. I heard it of from Mr A.Ghosh, a mathematics professor back here in India.

Problem: There is this demon who has got no business other than scaring non-mathematicians off. He knows a 3-digit number which he calls KEY to unlocking his treasure.

He will trade the key with someone who has an immense knowledge of mathematics and can guess the key as quickly as possible.

Here are the rules - you fail, you go to Dungeon (full of animal dung)
Succeed - you get the key and the treasure.
This is actually a plot using which he can eat humans...(in particular those who try and fail)...

Enough digression...Here are what he calls legal moves.

If the key is represented by abc, then each of a,b and c lie between 1 and 8 (inclusive).
You take many turns guessing the key (you have to guess it in minimum number of possible turns).
Each turn involves picking a 3-digit number between 111 and 888 (none of whose digits are 0/9) and speaking it out loud.


So far, so good...But there is a complication (which we can use to our aid)..The demon, not being an intelligent being itself, forgot the key and gladly accepts any number you speak out which has got either ab* or *bc or a*c right.

Based on the above information please find the minimum number of trials needed. I know i can brute force it in 64...I improved to 56 but cannot prove if its minimal...

NOTE: The guy who asked men this problem tells me that the answer is less than 35...though he cant exactly recollect what it was....

Further, with some help from guys at AOPS, now I know the answer - but I would be quick to add - that I do not know why is it minimal . (I am not posting the answer for the sake of those who read it here and want to have a go at the problem.)

But I would gladly divulge details of my own failed attempt at the problem

I myself had tried a recursive approach wherein I let T(n, k) indicate the maximum number of 'possible key' combinations you can reason about after n turns when all of a,b, and c in the demon's number lies between 1 and k .... Which meant that I needed to find n for which T(n, 8) exceeded 512 for the first time. But no luck. Infact, I was not even able to make out any connections b/w T(n, k) and its subproblems.

Good day
-Akash


Einstein - You know, earlier my preference was mathematics. Later on it changed to physics

Pincare: And why is that?

Einstein: I could not tell important facts from non-important ones.

Poincare: Strange that you say so. But now that you mention it, earlier i cherished physics..Now i cherish mathematics.

Einstein: And why is that

Poincare: I could not tell what is true from what is not.


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top

  Subject     Author     Message Date     ID  
Puzzle...Recurrence to aid? Akash Kumar Apr-06-09 TOP
  RE: Puzzle...Recurrence to aid? alexb Apr-06-09 1
     RE: Puzzle...Recurrence to aid? Akash Kumar Apr-06-09 2
         RE: Puzzle...Recurrence to aid? alexb Apr-07-09 3
             RE: Puzzle...Recurrence to aid? Akash Kumar Apr-07-09 4
                 RE: Puzzle...Recurrence to aid? alexb Apr-08-09 5
                     RE: Puzzle...Recurrence to aid? Akash Kumar Apr-08-09 6
                         RE: Puzzle...Recurrence to aid? alexb Apr-09-09 7
                             RE: Puzzle...Recurrence to aid? Akash Kumar Apr-10-09 8

Conferences | Forums | Topics | Previous Topic | Next Topic
alexb
Charter Member
2356 posts
Apr-06-09, 10:43 AM (EST)
Click to EMail alexb Click to send private message to alexb Click to view user profileClick to add this user to your buddy list  
1. "RE: Puzzle...Recurrence to aid?"
In response to message #0
 
   I can give you a hint: think geometry!

The 512 possibilities form a grid cube in 3D. Every time you check a key, you actually account for all the triples on the three perpendicular lines through that node. The question is now, how many such 3d repers does one need to cover all the grid?


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top
Akash Kumar
guest
Apr-06-09, 00:58 AM (EST)
 
2. "RE: Puzzle...Recurrence to aid?"
In response to message #1
 
   Hmmm...That looks like a neat idea.

But i feel like that I can use this method only for establishing the lower and upper bounds on the number of attempts needed. I don't see yet how this method helps in achieving one construction which solves the problem.

I see using the 'cube' that one non-key number, say xyz, helps eliminate 22 numbers (which are xy*, x*z, *yz).

Thus, we can arrive at a lower bound which is 512/22 = 23.27 or 24.

Further, it also helps in calculation of upper bound (the brute force 64) in a different way. (I feel I may have done something fishy below. Please verify)

Every node which is a non-key, (say xyz again), helps eliminating 3 lines passing through that node.

There is a total of 16 xy lines on each z-slice. Thus 8 z-slices contribute 16*8 xy-lines. Next, all the 64 points on the xy-plane have a z-line passing through them.

Thus, total number of lines in the figure is 16*8 64 = 192.
Since every choice helps in reasoning about 3 lines, we can remove all the lines in 192/3 = 64 moves.

But I am not entirely convinced by my reasoning. Eliminating the lines passing through one node and eliminating the 22 values on those lines looks much the same. Then why is one calculation giving lower bound and the other one the upper bound?

Am i missing something? (Must be)


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top
alexb
Charter Member
2356 posts
Apr-07-09, 01:11 AM (EST)
Click to EMail alexb Click to send private message to alexb Click to view user profileClick to add this user to your buddy list  
3. "RE: Puzzle...Recurrence to aid?"
In response to message #2
 
   >Every node which is a non-key, (say xyz again), helps
>eliminating 3 lines passing through that node.
>
>There is a total of 16 xy lines on each z-slice. Thus 8
>z-slices contribute 16*8 xy-lines. Next, all the 64 points
>on the xy-plane have a z-line passing through them.
>
>Thus, total number of lines in the figure is 16*8 64 =
>192.
>Since every choice helps in reasoning about 3 lines, we can
>remove all the lines in 192/3 = 64 moves.

As I see it, if there are 16 xy-lines in every z-section, you do not need z-lines to cover all the points. This is wasteful.

Consider only the planes z = 2, 3, ..., 8. This gives you 7×8 = 56 distinct z-lines. These lines meet the z = 1 section in 56 points. Choose the lines so as to leave a line (x-line or y-line) in z = 1 section. Which is pretty easy. This shows that you can do with 57 lines. But you can do better.


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top
Akash Kumar
guest
Apr-07-09, 11:38 PM (EST)
 
4. "RE: Puzzle...Recurrence to aid?"
In response to message #3
 
   I dont see yet how you reduce the number of solutions below 56 (which I did earlier).

Nice to see 'the cube way' getting done in only 57.

If time permits, can you please try posting the solution 'the cube way'. If not, please post a hint.

BR
-Akash


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top
alexb
Charter Member
2356 posts
Apr-08-09, 00:22 AM (EST)
Click to EMail alexb Click to send private message to alexb Click to view user profileClick to add this user to your buddy list  
5. "RE: Puzzle...Recurrence to aid?"
In response to message #4
 
   You can do that with 32 guesses.

Think of the cube as being cut into 8 smaller cubes.

There are 16 guess with combinations of numbers 1, 2, 3, 4 whose sum is a multiple of 4. The number of such combinations is 16 because choosing two number into a key fixes the third number.

Now translate these combinations by the vector (4, 4, 4). All in all, you have 32 combinations that cover the cube. The proof depends on the observation that the solution contains either 2 or more numbers from the set {1, 2, 3, 4} or 2 or more numbers from the set {5, 6, 7, 8}.

The part that 32 is the absolute minimum is more involved.


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top
Akash Kumar
guest
Apr-08-09, 10:35 PM (EST)
 
6. "RE: Puzzle...Recurrence to aid?"
In response to message #5
 
   Thanks for your solution Alex.

I see how it works.

The proof of minimality is not in my reach yet. Am trying it. Will get back if I need more help.

BTW I tried generalising the problem a little bit in (now I think vain) hope that the general version might be actually easier than the version stated in the problem.

I was trying the case when the Key length is L and the demon's memory is so bad that he says yes even if d (1 <= d < L) digits are spoken wrongly in a turn.

My approach was again to invoke recursion (a la dynamic programming) argument to handle the problem as I thought the cube argument would be tough to use in the general case. But hell, no recursive solution came up. Maybe it is a fool's errand to try using recursion here...


BTW I still keep thinking that a recurrence relation for this problem should exist. The reason is I have seen similar problems (I believe) where recursion works.

For example, the orb puzzle - wherein you have 2 orbs which break only when dropped from a threshold height and won't break unless that height is reached. You need to use these 2 orbs and determine in fewest drops the threshold height from which they start breaking.

The trick is to setup a recurrence to solve the 'reverse problem' of determining maximum height which you can scale using 2 orbs and 'd drops'. The case where 'd drops' lead to scaling a height more than 100 the first time leads to the answer.

I tried a similar approach as outlined in my first post but eventually gave up as a bad idea.

But to end it, I would definitely say that your cube approach was too cute...

Good day
-Akash


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top
alexb
Charter Member
2356 posts
Apr-09-09, 02:20 PM (EST)
Click to EMail alexb Click to send private message to alexb Click to view user profileClick to add this user to your buddy list  
7. "RE: Puzzle...Recurrence to aid?"
In response to message #6
 
   >Thanks for your solution Alex.

Unfotunately the solution is not mine. I have Winkler's book. But you can think of how one can (combinatorially) reorganize a given configuration while still maintaining its properties, like being a cover.


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top
Akash Kumar
guest
Apr-10-09, 11:00 PM (EST)
 
8. "RE: Puzzle...Recurrence to aid?"
In response to message #7
 
   Hello Alex,

Thanks again for your help throughout with this puzzle and thanks for that tip - I believe I may put it to use in solving puzzles/problems in future. Its good to have it in your toolbox.

BTW I had an email exchange with Peter Winkler regarding the same puzzle. There also, I asked about the utility of a recursive method (in both the original and the generalized version above) if at all one was applicable.

He answered in negative, I am quoting him below in order that one is not misled by attempting a problem not likely to yield to a particular methodology.

"I'm afraid that a recursion is unlikely for this problem; it's essentially
a problem in coding theory, which is quite a difficult subject. Coding
problems often have clever solutions in some cases and nothing but
crude bounds in many other cases."


Good day
-Akash


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top

Conferences | Forums | Topics | Previous Topic | Next Topic

You may be curious to have a look at the old CTK Exchange archive.
Please do not post there.

Copyright © 1996-2018 Alexander Bogomolny

Search:
Keywords:

Google
Web CTK