All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Logic
A locked safe (Posted on 2002-07-16) Difficulty: 5 of 5
(Puzzle by Raymond Smullyan)

There is a safe containing millions of dollars – unfortunately the combination is written on only one card, and that card has been accidentally locked inside the safe! If the wrong combination is used, the lock will jam and the only way to open the safe would be to blow it up, destroying the contents.

A combination is a string of digits from 0 through 9. It can be any length and contain any number of digits occurring any number of times; 90915 is a combination; so is 2133127; so is 5. Certain combinations will open the lock, certain combinations will jam the lock, and the remaining combinations will have no effect whatever (these last are called neutral).

The small letters x and y will represent arbitrary combinations, and by xy is meant the combination x followed by the combination y; for example, if x is 213 and y is 3812, then xy is 2133812. By the reverse of a combination is meant the combination written backwards; for example, the reverse of 3812 is 2183. By the repeat xx of a combination x is meant the combination followed by itself; for example, the repeat of 3182 is 31823182.

Now, some of the combinations are related to other combinations. There are five properties of this relation:

  • Property A: For any combination x, the combination 2x2 is related to x. (For example, 21452 is related to 145.)
  • Property B: If x is related to y, then 1x is related to 2y. (For example, since 21452 is related to 145, then 121452 is related to 2145.)
  • Property C: If x is related to y, then 5x is related to the reverse of y. (For example, since 21452 is related to 145, then 521452 is related to 541.)
  • Property D: If x is related to y, then 9x is related to yy (the repeat of y).(For example, since 21452 is related to 145, then 921452 is related to 145145. Also, 521452 is related to 541, so 9521452 is related to 541541.)
  • Property E: If x is related to y, then if x is neutral then y jams the lock, and if x jams the lock then y is neutral. (For example, if 521452 is neutral, then 541 will jam the lock.)

    Find the shortest possible combination that will open the lock.

    Notes/Clues:
    a) The relation is only one way. Think of it like mother and son. The mother is the parent of the son, but the son is not the parent of the mother.
    b) The first thing you need to do is to establish (just using property E) how to solve the puzzle (i.e. how do you know if a combination opens the lock?). Then use this information to solve the puzzle using properties A thru D.

  •   Submitted by levik    
    Rating: 4.1935 (31 votes)
    Solution: (Hide)
    Begin with some additonal notation:
    X is the reverse of x; if x = 123, x = 321.
    a ~ b means a is related to b.

    To find a number that opens the lock, it is necessary to find a number that relates to itself, which then, by property E, can neither be neutral nor jam the lock, and must open it. The shortest number that relates to itself presumably has the form of xx2 or x2x2, where x is a series of 1s, 5s, and 9s that gives the steps needed to find that very number.

    To find the number, it is best to work backwards. Starting with xx2:
    xx2 → 2XX → XX → xx → x
    or
    xx2 → 2XX → XX → X → x
    This gives the proof:

    2x2 ~ x
    92x2 ~ xx
    592x2 ~ XX
    1592x2 ~ 2XX
    51592x2 ~ xx2
    Therefore, x must equal 51592, and this shows that the number 51592515922 relates to itself and therefor must open the safe. Similarly: 2x2 ~ x 52x2 ~ X 952x2 ~ XX 1952x2 ~ 2XX 51952x2 ~ xx2 Therefore, x in this example is equal to 51952, and 51952519522 also relates to itself and opens the safe.

    Now, working backwards again for x2x2:
    x2x2 → 2X2X → 2X → X → x
    or:
    x2x2 → x2 → 2X → X → x.
    These give the proofs:

    2x2 ~ x
    52x2 ~ X
    152x2 ~ 2X
    9152x2 ~ 2X2X
    59152x2 ~ x2x2
    
    That means that x must equal 5915, and 5915259152 relates to itself and must open the safe.
    And the last proof:
    2x2 ~ x
    52x2 ~ X
    152x2 ~ 2X
    5152x2 ~ x2
    95152x2 ~ x2x2
    
    This last proof gives that x=9515, and 9515295152 also relates to itself and must open the safe.

    Finally, a simple relation must be noted:

    2y2 ~ y
    92y2 ~ yy
    
    So, for any repeated number yy, 92y2 is related to y. By property E, if yy opens the safe, 92y2 must also open the safe. The last two solutions, 9515295152 and 5915259152, both have the form yy, and can be made shorter:
    2951522 ~ 95152 
    92951522 ~ 9515295152 
    
    and
    2591522 ~ 59152 
    92591522 ~ 5915259152
    
    Since 92951522 relates to 9515295152, which opens the safe, it must also open the safe. Similarly, 92591522 relates to 5915259152, and must open the safe as well.

    Therefore, there are two 8-digit solutions, 92591522 and 95951522.

    Comments: ( You must be logged in to post comments.)
      Subject Author Date
    Puzzle Thoughts K Sengupta2023-07-13 13:59:39
    SolutionSolutionMath Man2012-10-14 22:09:00
    SolutionTackledTristan2005-06-14 16:17:10
    I'll tackle this soonTristan2005-06-14 01:46:50
    nice number problemalex2004-09-19 01:51:34
    SolutionANSWER!John Tate2003-06-08 11:13:25
    Got itSilly Jilly2003-05-19 06:00:27
    SolutionThe Real Solution (Part 3)DJ2003-04-22 16:17:28
    SolutionThe Real Solution (Part 2)DJ2003-04-22 16:15:41
    SolutionThe Real Solution (Part I)DJ2003-04-22 16:13:48
    SolutionFinding our numberTim Axoy2003-04-20 04:13:48
    SolutionWhat opens?Tim Axoy2003-04-20 04:07:09
    its hauntingAamir Rashid2003-04-19 13:10:32
    re: open a new mintVicky2003-04-15 20:40:27
    open a new mintJonathan Waltz2003-04-01 03:44:29
    SolutionarrghDJ2003-03-19 09:04:15
    Solutionsolutionluvya20032003-03-15 13:58:55
    ???luvya20032003-03-15 06:52:10
    Some Thoughtsre: ThoughtsDJ2003-03-03 20:11:06
    Some ThoughtsThoughtsDJ2003-03-03 17:51:08
    What if...?Melissa2002-11-22 07:36:52
    re(2): forward..Cheradenine2002-07-26 06:59:56
    re: forward..Nick Reed2002-07-26 02:48:13
    Some Thoughtsforward..Cheradenine2002-07-26 00:18:38
    re(6): more hintsCheradenine2002-07-23 23:40:02
    Some Thoughtsre(5): more hintsNick Reed2002-07-23 23:35:42
    Some Thoughtsre(4): more hintsCheradenine2002-07-23 23:22:47
    Questionre(3): more hintslevik2002-07-22 09:55:44
    re(3): more hintsCheradenine2002-07-19 05:50:18
    Hints/Tipsre(2): more hintsHappy2002-07-19 05:32:46
    re: more hintsCheradenine2002-07-19 01:04:57
    Hints/Tipsmore hintsHappy2002-07-18 12:50:13
    re(2): possibility..Happy2002-07-18 05:05:01
    zero is the heroqball2002-07-17 18:19:45
    Hints/Tipsre: possibility..Happy2002-07-17 12:17:57
    Hints/Tipspossibility..Cheradenine2002-07-17 08:47:27
    Hints/TipsthoughtsCheradenine2002-07-17 08:30:33
    re(2): Hmmm...friedlinguini2002-07-17 05:57:14
    Some Thoughtsre: First stepsNick Reed2002-07-17 00:11:22
    re: Hmmm...TomM2002-07-16 17:39:37
    QuestionHmmm...friedlinguini2002-07-16 15:17:18
    Hints/TipsFirst stepsTomM2002-07-16 14:35:51
    Thanks go to...levik2002-07-16 12:18:33
    Please log in:
    Login:
    Password:
    Remember me:
    Sign up! | Forgot password


    Search:
    Search body:
    Forums (0)
    Newest Problems
    Random Problem
    FAQ | About This Site
    Site Statistics
    New Comments (3)
    Unsolved Problems
    Top Rated Problems
    This month's top
    Most Commented On

    Chatterbox:
    Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information