Thursday, March 31, 2016

Do I Really Have To Find The Conveniently Lying Around Puzzle Hint?: Basic Combinatorics and Computer Games

Screen text: I don't know the right combination, and trying to find it will take too long.
Situation 1: combination lock.  3 buttons (levers? thingamajigs?) , each button has 5 sides.  Without any further information to rule out possible combinations, I have 5 choices for the first button, 5 choices for the second button, and 5 choices for the third button, for 5*5*5 = 125 total possibilities to try for a brute force test-everything solution.  Assume I need 2 seconds to set each button to a possibility.  Then the maximum time I need to test a combination is 6 seconds (less for combinations where I need to change only one or two slots).  6 seconds * 125 tries = 750 seconds or 12.5 minutes.  Assume I stop for a break and to make notes to keep track of my attempts.  I can still reasonably force the lock in under 30 minutes.  Even in a real-time game, unless you are in a down-to-the-minute crunch, this is doable.  Tedious (very tedious!), but straightforward.  I don't truly need someone's conveniently left out password here. 

How about this one?
Screen text: I can't figure this out without a plan.
Situation 2: A clearly magical harp sitting in a swamp (if it weren't magical, we would have serious water damage to this poor instrument).  We do have a limited number of pitches: 17, one for each colored segment.  (My mouse pointer is covering up one such segment). If we assume the magical melody is
  • exactly 17 notes long, no repeats, we have 17 choices for the first note, then 16 choices for the second note, 15 choices for the third note, etc., for 17*16*15*14*...*3*2*1 = 17! = 355687428096000 combinations.  Way too many to test without a computer!  (Read the "!" as "factorial" in this context.)
  • exactly 17 notes long, repeats allowed, we have  17*17*17*...*17 = 17^17 = 827240261886336764177 possible choices.  Way too many to test!  (With a computer?  I'm not sure.  Let me do some more research.)
  • Less than or more than 17 notes? Less than, and you could probably still force it with a computer eventually.  Small enough and you could do it by hand.  More than 17?  Well, how much more?  At some point you can always make the problem too big.  Even the integers are infinite.  (And the real numbers are infinitely more infinite than the integers.  In a mathematically well-defined and amazingly mind-blowing way.)
  • If timing and tempo matter?  Forget it.  
I do need a conveniently lying around hint for this one, even with an untimed game.

Edit: turned out situation 2 was just about tuning the strings, rather than a combination.  Since tuning is an aesthetic choice (individual or cultural), yes, I did need a guide. 

No comments:

Post a Comment