Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Need help forgot my alarm code.

  1. May 5, 2010 #1
    Hi Guys sorry to be a pain

    We had a power cut in the area, and it messed my alarm up i put my code in to turn it off but instead reprogrammed it with a new code. the buttons i used were 12349 but cant remember the order i put them in, could someone pm me a list of combinations to try. it is only a 4 digit code combination

    Many Thanks
     
    Last edited: May 5, 2010
  2. jcsd
  3. May 5, 2010 #2
    There are a total of 120 combinations with those numbers for you can choose 5 of the entries for the first digit, then 4 for the next, 3 for the next and 2 for the last, thus 5*4*3*2=120.
     
  4. May 5, 2010 #3
    Code (Text):
    l=0;k=[1,2,3,4,9];forstep(i=(#k)!-1,0,-1,z=numtoperm(#k,i);print1(l++" ] ");for(i=1,#k,print1(k[z[i]]" "));print)
    1 ] 1 2 3 4 9
    2 ] 2 1 3 4 9
    3 ] 1 3 2 4 9
    4 ] 2 3 1 4 9
    5 ] 3 1 2 4 9
    6 ] 3 2 1 4 9
    7 ] 1 2 4 3 9
    8 ] 2 1 4 3 9
    9 ] 1 3 4 2 9
    10 ] 2 3 4 1 9
    11 ] 3 1 4 2 9
    12 ] 3 2 4 1 9
    13 ] 1 4 2 3 9
    14 ] 2 4 1 3 9
    15 ] 1 4 3 2 9
    16 ] 2 4 3 1 9
    17 ] 3 4 1 2 9
    18 ] 3 4 2 1 9
    19 ] 4 1 2 3 9
    20 ] 4 2 1 3 9
    21 ] 4 1 3 2 9
    22 ] 4 2 3 1 9
    23 ] 4 3 1 2 9
    24 ] 4 3 2 1 9
    25 ] 1 2 3 9 4
    26 ] 2 1 3 9 4
    27 ] 1 3 2 9 4
    28 ] 2 3 1 9 4
    29 ] 3 1 2 9 4
    30 ] 3 2 1 9 4
    31 ] 1 2 4 9 3
    32 ] 2 1 4 9 3
    33 ] 1 3 4 9 2
    34 ] 2 3 4 9 1
    35 ] 3 1 4 9 2
    36 ] 3 2 4 9 1
    37 ] 1 4 2 9 3
    38 ] 2 4 1 9 3
    39 ] 1 4 3 9 2
    40 ] 2 4 3 9 1
    41 ] 3 4 1 9 2
    42 ] 3 4 2 9 1
    43 ] 4 1 2 9 3
    44 ] 4 2 1 9 3
    45 ] 4 1 3 9 2
    46 ] 4 2 3 9 1
    47 ] 4 3 1 9 2
    48 ] 4 3 2 9 1
    49 ] 1 2 9 3 4
    50 ] 2 1 9 3 4
    51 ] 1 3 9 2 4
    52 ] 2 3 9 1 4
    53 ] 3 1 9 2 4
    54 ] 3 2 9 1 4
    55 ] 1 2 9 4 3
    56 ] 2 1 9 4 3
    57 ] 1 3 9 4 2
    58 ] 2 3 9 4 1
    59 ] 3 1 9 4 2
    60 ] 3 2 9 4 1
    61 ] 1 4 9 2 3
    62 ] 2 4 9 1 3
    63 ] 1 4 9 3 2
    64 ] 2 4 9 3 1
    65 ] 3 4 9 1 2
    66 ] 3 4 9 2 1
    67 ] 4 1 9 2 3
    68 ] 4 2 9 1 3
    69 ] 4 1 9 3 2
    70 ] 4 2 9 3 1
    71 ] 4 3 9 1 2
    72 ] 4 3 9 2 1
    73 ] 1 9 2 3 4
    74 ] 2 9 1 3 4
    75 ] 1 9 3 2 4
    76 ] 2 9 3 1 4
    77 ] 3 9 1 2 4
    78 ] 3 9 2 1 4
    79 ] 1 9 2 4 3
    80 ] 2 9 1 4 3
    81 ] 1 9 3 4 2
    82 ] 2 9 3 4 1
    83 ] 3 9 1 4 2
    84 ] 3 9 2 4 1
    85 ] 1 9 4 2 3
    86 ] 2 9 4 1 3
    87 ] 1 9 4 3 2
    88 ] 2 9 4 3 1
    89 ] 3 9 4 1 2
    90 ] 3 9 4 2 1
    91 ] 4 9 1 2 3
    92 ] 4 9 2 1 3
    93 ] 4 9 1 3 2
    94 ] 4 9 2 3 1
    95 ] 4 9 3 1 2
    96 ] 4 9 3 2 1
    97 ] 9 1 2 3 4
    98 ] 9 2 1 3 4
    99 ] 9 1 3 2 4
    100 ] 9 2 3 1 4
    101 ] 9 3 1 2 4
    102 ] 9 3 2 1 4
    103 ] 9 1 2 4 3
    104 ] 9 2 1 4 3
    105 ] 9 1 3 4 2
    106 ] 9 2 3 4 1
    107 ] 9 3 1 4 2
    108 ] 9 3 2 4 1
    109 ] 9 1 4 2 3
    110 ] 9 2 4 1 3
    111 ] 9 1 4 3 2
    112 ] 9 2 4 3 1
    113 ] 9 3 4 1 2
    114 ] 9 3 4 2 1
    115 ] 9 4 1 2 3
    116 ] 9 4 2 1 3
    117 ] 9 4 1 3 2
    118 ] 9 4 2 3 1
    119 ] 9 4 3 1 2
    120 ] 9 4 3 2 1
    :biggrin:
     
  5. May 5, 2010 #4

    turbo

    User Avatar
    Gold Member

    Doesn't your alarm have a method of resetting to factory defaults? Do that and choose a code.
     
  6. May 5, 2010 #5
    Yes, sorry, spent most of the day trying to, I did just reset back to factory setting. and is working normal now.

    I would like to say many thanks to Xitami for your time and kindness for helping me.
     
  7. May 5, 2010 #6
    This must be one of the funniest and ingenious covert homework questions I've ever seen.:rofl:
     
  8. May 5, 2010 #7

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

    Indeed!

    To turn it into a puzzle:

    Suppose the door unlocks any time it receives the correct 5 keystrokes in order, regardless of which keys are pressed earlier. So if the correct order is 94321, the door unlocks after pressing (say) 1194321 or 6231111111222222294321. What is the smallest number of keystrokes needed to unlock the door in the worst case? What is the sequence?

    How can such sequences be generated (and their lengths counted) for given combinations of digits, possibly including repeats?
     
  9. May 6, 2010 #8
    variant with repeated digits in code

    N=5 digits
    K=5 code length
    N^K==3125 combinations
    sequence length < K*N^K :biggrin:
    Code (Text):
    1234241392414139392424131392924192411392139224132413392439244139413992412413413913923924924292421393
    1393241424143929392941314131924224144131139339299242392913934131241492431394241939214132924324194132
    1394392192433921139441322419924341323921241913949244241141331399392292443922139941332411924441333922
    2411139992449249392313914134241292494134392324121391924992491399139113912411241224123922392339234133
    4134413492929213131324242439393941414192922424414113133939929239391313414124249293131424293931414292
    9324294142131439319293393113144142242992934142393124291314929424214143131939329294393213194143242192
    9441433932242113199294929939331311414424229299414439332422131192999299131913111311242124222422393239
    3339334143414441449291414939342423131292919291131213122423242339343934414941499291242341491312393492
    1324394192133941132441922439921341923941243913249214243141931329394292143942132941932431921441933942
    2431132992149219394313214194243292194194394324321321921992191329132113212431243224323942394339434193
    4194419492114199394424331322921192111322132224332433394439444199419992112433419913223944921292121323
    1323243424343949394941914191921224344191132339499212394913234191243492244113399224922939931331411424
    4292294114399324421331922992291339133113312441244224423992399339934113411441149221411939942443133292
    2192211332133224432443399439944119411992212443411913323994922292221333133324442444399939994111411192
    2224444111133339999222399913334111244492231334244939914112922324494112133439919223399113344112244992
    2341123991244913349239134124923141293914249313429231923113421342249324933914391441294129923124934129
    1342391492329232134313432494249439193919412141219232249441211343391992323919134341212494923313442499
    3911412292332499412213443911923339111344412224999233412239112499134492342491412313493912923439121349
    4123249192344123391224911349923493142931431421429429329319314429331422931142993149319429431432932142
    1931993191429142114212931293229323142314331434293429442949311931114221422293329333144314442994299931
    1293342991422314493121423293431494291931229344291142331499312314914234291293493294214319329932914311
    4312942294231933193421442149321932114321432294329433194319442194219932129434219143231949322143329443
    1994211932229444211143331999322319914334211294493232949421214343191932331911434421229499323421231912
    9491434933114422993312993422914423114933214432994311942219332299442211443311993323119144342212994933
    3299942221444311193333111144442222999933342223111299914449334311214494223299193344223311229911449933
    4934231291493432919423214943121934331211494423229199343423231212919149493443122149942332911934442333
    1222911149993449349423431232912149193499349134914491499149114912491299129112912291239123112312231233
    1234123422342334234423494321943221944321194332199432321919434321219494333211194443222199943343223211
    2199194494344323321221911949943494433221199443433232212119199494444333322221111999944494499449194919
    9919911991219121112112211232123222322332234323433343344334949499949919191119112121222122323233323343
    4344434494911912212332344349949121234349191232349999911111222223333344444999122234449111233349911223
    34499123349112344912234912349
    sequence length 3129
    3129==N^K+K-1. optimal
     
    Last edited: May 6, 2010
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook