• Ike (unregistered)

    For those wondering why the owner doesn't just give the Realtor the key, the answer is that the house may be shown by more than one Realtor, and they may not even all be from the same company.

    Of course, that means that more people know the combination, which makes lock boxes even more WTF-y.

  • Anonymous (unregistered) in reply to Cad Delworth
    Cad Delworth:
    Likewise. Assuming these things are hung around the front door handle (as Sentrilock's site illustrates them), what's to stop a criminal walking away with the box and taking it elsewhere to physically break open, then stroll back later with the key to let themselves in?
    Well, the boxes are bolted to the wall whenever I've seen them and you can only access the bolts from the inside. It would probably be easier to break in through a door or window than to make off with the box.
  • (cs)

    The Realtors(TM!) in my area don't use boxes with any buttons. Each REALTOR(TM!) has a small hardware device with a ten digit keypad that they enter a unique number into. They then put that device at the bottom of the lockbox and it opens.

  • Lone Marauder (unregistered)

    I know when I was house hunting about 6 years ago, the trend in hardware seemed to be a lock box without a keypad/dial/etc on the front. My realtor had a small remote with some contacts on the back - she entered the code and snapped the "remote" into the lock box and it opened. So even if you knew the combination, unless you had one of the remotes (which I assume aren't given out to every Joe Schmoe) you couldn't open the box.

  • Lone Marauder (unregistered) in reply to strictnein

    Dang, beat me by 3 minutes :)

  • Daniel (unregistered) in reply to db48x

    Yeah, because we see Real Estate agents reading dailywft all the time.

  • midas (unregistered) in reply to Frank

    I do not find it ethically unquestionable. If the lock can be broken easily, it should not be on the market.

  • Nobody (unregistered)

    @Frank The same reason as any other security flaw announcement.

    People can and will break in easily, yesterday the realtor could say. "It's not our fault we fitted a super secure lock box - what more could we do, liable us?"

    Today you can point out that the brightest (or most bored minds) on the internet have shown that the lock boxes are about as secure as your sister's "My Little Pony" diary lock. And so it's the realtors fault for using one.

  • Ramses So let it be written so let it be done (unregistered)

    Seriously? If someone wants to get into a house to steal something they will, lock box or no lock box. Usually a good kick to the door near the door knob will get you in. Or a screw driver wedged into the striker plate(I have locked myself out of many doors which is why I know this). Dead bolts are another issue all together.

    This lock box wouldn't be the same as Al Gore's lock box would it? (Senseless American Political Humor in case you were wondering)

  • Anders (unregistered)

    This was my first VB-project ever! I'm a bit embarrassed to show it but to my defense it was fifteen years ago...

    If Len(Text1.Text) = 4 Then
        a = Mid(Text1.Text, 1, 1)
        b = Mid(Text1.Text, 2, 1)
        c = Mid(Text1.Text, 3, 1)
        d = Mid(Text1.Text, 4, 1)
        
        Label1.Caption = a & b & c & d & a & b & c & a & d & b & c & a & b & d & c & a & b & a & c & d & b & a & c & b & d & a & c & b & a & d & c & b & a
    
    
  • Keith Brawner (unregistered) in reply to midas
    midas:
    I do not find it ethically unquestionable. If the lock can be broken easily, it should not be on the market.

    You don't know much about locks, do you?

  • Anon (unregistered) in reply to Anonymous
    Anonymous:
    Cad Delworth:
    Likewise. Assuming these things are hung around the front door handle (as Sentrilock's site illustrates them), what's to stop a criminal walking away with the box and taking it elsewhere to physically break open, then stroll back later with the key to let themselves in?
    Well, the boxes are bolted to the wall whenever I've seen them and you can only access the bolts from the inside. It would probably be easier to break in through a door or window than to make off with the box.

    I've never seen anyone bolt a box like this to the wall. Making large holes through the exterior wall in order to fit it seems a bit extreme.

  • new299 (unregistered) in reply to Frank

    It's a well studied problem already. Hint google "de Bruijn sequence".

  • new299 (unregistered) in reply to db48x

    de Bruijn graph

  • stEvil (unregistered) in reply to frits
    frits:
    C# brute force method. Uses string search to avoid duplicates.
            //Brute Force method. Accepts up to 16 buttons
            string CreateLockBoxSequence(uint numberOfDigits, uint numberOfButtons)
            {            
    
            StringBuilder output = new StringBuilder();
            uint numberBase = 10;
            if (numberOfButtons > 10)
            {
                numberBase = 16;
            }
            if (numberOfButtons > 16)
            {
                throw new ArgumentException("Number of buttons cannot be greater than 16");
            }
            uint loopCount = (uint)Math.Round(Math.Pow(numberBase,numberOfDigits));
            for (uint i = 0; i < loopCount; i += numberBase)
            {
                //This loop serves to  omit unused digits.
                for (uint k = 0; k < numberOfButtons; k++)
                {
                    StringBuilder formatBuilder = new StringBuilder();                    
                    string sequence = Convert.ToString(i + k, (int)numberBase);
                    for (int j = sequence.Length; j < numberOfDigits; j++)
                    {
                        formatBuilder.Append("0");
                    }
                    formatBuilder.Append(sequence);
                    sequence = formatBuilder.ToString();
                    //Append if the sequence doesn't already exist
                    if (!output.ToString().Contains(sequence))
                    {
                        output.Append(sequence);
                    }
                }
            }
            return output.ToString();
        }
    

    Addendum (2010-03-31 10:21): This method produces 10,124 digits for a (4,10) input.

    With all the cycles spent checking that the sequence does not repeat, I would bet that a random number generator would be just as effective.

    BTW, the bonus points problem says 1-2-3-4-5 would not cover 1-2-3-5. I think it should read 1-2-3-4 instead of 1-2-3-4-5

  • not a burglar (unregistered) in reply to Frank

    This isn't a practicable way to break into a house anyway. Even a cursory glance shows that the number of keypresses to crack the lock is 10003 < n < 40000, and I'm risking a guess that if you showed up at a house with 20 printed out pages of numbers and spent 6 hours pressing the buttons near the door, someone might get a clue and call the police. Especially when you can instead apply a crowbar to a backdoor and be in the house in 15 seconds instead.

  • (cs) in reply to Rootbeer
    Rootbeer:
    TRWTF is that these devices are used at all.

    What's wrong with the access control system called "give a copy of the key to the realtor, and they keep it at their office when they're not showing the property"?

    Obviously alot of people here have never bought or sold a house.

    The selling agent and the buying agent are not always the same person. If your agent finds a house that suits your criteria on MLS he/she will make an appointment with the agent with whom the house is listed for a viewing. That agent calls the homeowner with the date and time (so they will be away from the house) and has them leave the lockbox on the door or they go to the house and leave the lockbox if the house is vacant or the homeowner is not around. Your agent is provided with the lockbox code. The listing agent is typically not (rarely ever) present at these walk-throughs. If they are, they usually stay outside until you are done.

    This is how it was done both times I bought (and the one time I sold) a house.

  • Ryan (unregistered)

    Assuming perfect overlap (meaning all numbers are used in 4 different combinations) you would still need 10000/4 = 2500 characters to compile a string to cover all possible combinations. Not something the average burglar would want to enter by hand and that is the best case scenario which is obviously much shorter than the actual solution.

  • Anonymous (unregistered) in reply to new299
    new299:
    It's a well studied problem already. Hint google "de Bruijn sequence".
    Hint: Bring Your Own Code is always a well studied problem, because there aren't enough people submitting interesting problems. You can change that.
  • mwb (unregistered) in reply to Frank

    I've been looking at houses recently, so I can say with near certainty that the combination lock boxes aren't really used much any more. Every house we go to has an electronic keybox that unlocks using an electronic key that is unique to our realtor. The box also records what realtors have opened it and when, and our realtor gets a ping back from the listing agent later...

    I'm not saying that the new boxes are secure. They're probably riddled with security problems, especially given the large number of electronic keys that will open them, and the open question of the communication between key and box and whether or not that can be sniffed or replicated... They're just not insecure in this way.

  • (cs) in reply to Frank
    Frank:
    Quite honestly, this is a ethically questionable code challenge.

    You're not only revealing how these lock boxes work (Which, yes, would be commonly available information), but you're announcing "to the world" that they're simple to break into, with a solution to how to do it.

    Fewer and fewer of those lockboxes are mechanical, so any solutions found will perhaps become nearly useless in a couple of years.

    A typical lockbox these days is an electronic device, with a little MCU inside, hooked up to a solenoid and an IR receiver. You use a remote to unlock it. I doubt those are much safer though, only require different expertise to figure out. I'm pretty sure the current ones are not very hard to bypass, and will stay that way until their weaknesses become publicized.

    Alas, all of that is kinda moot if what the lockbox protects is easier to bypass than the lockbox itself. Most residential keys, especially those of low-end distressed properties, can be picked in half a minute or so.

    For those who don't know: The lockbox design is such that you don't need to have it open in order to unlock the door's key lock. In fact, the lockbox stays latched onto the door handle until the property is delisted (usually: sold). The key is stored in a little drawer inside of the lockbox.

  • Ryan G (unregistered) in reply to Frank

    It would seem to me the more unethical thing would be to let people go on believing they're secure when they're actually just a robbery waiting to happen. Sometimes you have to slap someone in the face with reality before they'll do the right thing. There was a show called "It Takes A Thief" on Discovery where ex-criminals would demonstrate to homeowners just how easy it is to break into their homes and find their hidden (and not-so-hidden) valuables. I think my favorite was when the family's dog jumped in the getaway van with the thieves.

  • (cs) in reply to Anonymous
    Anonymous:
    new299:
    It's a well studied problem already. Hint google "de Bruijn sequence".
    Hint: Bring Your Own Code is always a well studied problem, because there aren't enough people submitting interesting problems. You can change that.
    Maybe Alex should post a difficulty level 10 problem from Knuth's trilogy tomorrow. /me ducks and runs.
  • I. G. Noramus (unregistered)

    Hasn't that question been asked several times before, eg. in the WTF Forums?

  • John (unregistered) in reply to Frank

    I my area (Columbia, MO), the Realtors have advanced lock boxes that use wireless communications to open the boxes. The Realtors all carry blackberries which contain some kind of code to open the lock boxes. The agent just types some stuff in (not sure what) to the blackberry and a few seconds later the lock box opens.

  • (cs) in reply to stEvil
    stEvil:

    With all the cycles spent checking that the sequence does not repeat, I would bet that a random number generator would be just as effective.

    What part of 'brute force' don't you understand? Besides, checking and not checking would still be on the same order of magnuitude.

    stEvil:
    BTW, the bonus points problem says 1-2-3-4-5 would not cover 1-2-3-5. I think it should read 1-2-3-4 instead of 1-2-3-4-5

    I'm not even sure what your point is here. This method just produces all sequences in a range and appends them if they don't already exist.

    Where's your code, mr. genius? You even have the advantage of others posting the efficient way of doing this now. So let's see it.

    Addendum (2010-03-31 12:48): BTW- You could micro-optimize my original method by using a hash table and check for the existence of a string instead of doing a string search.

  • grizz (unregistered)

    It never fails to amaze me how often the guy who says "maybe this isn't such a good idea" gets ridiculed and scorned. The rational used to justify the abuse usually boils down to variations on the themes of "the bad guys already know all this anyway" and "security by ignorance never works; we're really empowering the masses by telling them about a vulnerability". I say bollocks to both arguments.

    It is almost certain that "the bad guys" do in fact already have the knowledge being discussed. The thing is, as is discussed in this thread, they usually also have other knowledge/tools that are more efficient; using this example, it's pretty unlikely a thief going to stand there keying in ~10K numbers rather than using a lock pick or a brick. The problem arises when some piece of knowledge lowers the bar for what determines a "bad guy". If you don't think there is a population of bored kids out there who see stuff like this and say, "Hey! I didn't know that's how those locks worked! Let's give it a try, just for kicks!" then you're a fool. Now, instead of just a (relatively) small number of actual criminals, the group of "bad guys" grows exponentially to include bored kids and casual vandals. And yes, I know that the chances of a bored kid having the patience to key in all 10K numbers approaches zero, but we also know that the lock will open long before exhausting the set of all possible combinations, especially with some of the other techniques already discussed in the thread.

    I also disagree with the "security by ignorance never works" argument. This website is a prime example of ignorance in action. Do you think most of the examples we see here everyday are the result of anything but ignorance or stupidity? The schmucks responsible for them certainly wouldn't have chosen to do some of the ridiculous things we all chuckle at if they'd known a better way. What's more, simply knowing that a thing is possible is often the biggest obstacle to getting something done. Would our hypothetical bored kid known about the limitations of these locks or how to use the De Bruijn sequence to brute force the key entries? Bloody unlikely, I think. However, the very sites that host these "hey, didja know that ..." type of discussions are often the same sites our bored little nascent troublemakers often hang out on. Just because "security by ignorance" doesn't ALWAYS work doesn't mean we need to do our best to ensure that it NEVER works.

    Finally, the "we're educating people to the problem" justification is complete and utter BS. How, precisely, to you think people are going to be educated? From reading about it on TDWTF? <sarc>Yeah; right!</sarc> They'll learn about it when their neighbors’ house is vandalized or they come home to find all their stuff gone and the police tell 'em that entry was gained by someone getting the key out of the lock box. Thanks, but that's not the way I want to be "educated".

    </rant>

    This may seem like a strident reaction to a fairly innocuous situation, but I'm really tired of people being mocked and scoffed at for daring to raise a question about the wisdom of doing something.

    Let the ad hominum attacks commence!

  • cellocgw (unregistered) in reply to mr X
    mr X:
    That's the same system as the door entry on my workplace! I've been wondering how short a sequence would be enough to brute-force it for ages.

    you sure you have the same brand? I have one which looks about the same, but I tested it: if you punch a number NOT in the combo, it won't open. It is true that order doesn't matter, so 1-2-3 is the same as 2-1-3 and so on, but 1-4-2-3 won't open it.

  • Anonymous (unregistered) in reply to Anonymous
    Anonymous:
    Or just put a brick through it like everyone else. But considering this was in the context of real-estate, why the hell would you want to break into an EMPTY house anyways?

    Because even if the house is empty, you still have electrical wire (copper) and copper tubing. Both can be turned in for recycling and earn some decent money.

  • rfoxmich (unregistered) in reply to db48x

    The easier way to attack a lock like this involves a sharp smack with a hammer. When I was house hunting it always seemed to me that these devices were quite flimsy in construction.

  • Bosshog (unregistered) in reply to Beta
    Beta:
    Anon Ymous:
    The correct combination turned out to be my house number! Tried it on another house for sale in the neighborhood... success. (I did not enter the house, just tested the code on the box.) I informed the builder selling the houses and they assured me that they take security very seriously.

    Some blockheads would consider what you did breaking and entering, and some of those blockheads have badges. Be glad the builder wasn't quite that stupid.

    And some of those badges say "I'm Special". I doubt it counts as breaking and entering if you didn't break or enter.

  • Godmode (unregistered)

    WoW, we had almost the same history told at a lecture of discrete mathematics - it appeared, that some time ago we had key lock boxes working in the same pattern in our faculty building (IT one ;D). Fortunately, they changed them to ones that reset after pushing 4 digits (;

  • Hamburger (unregistered) in reply to db48x

    Whether it's ethically questionable or not, no one is going to use it. There are 10,000 different combinations. Breaking into a 4-digit 10-key lockbox by trying every combination would average 5,000 tries, or 20,000 keypresses, using an easy algorithm of adding 1 each time.

    A maximally efficient algorithm (and I doubt there is one) could reduce this to exactly 1/4th, meaning you'd have 5,000 keypresses on average (5,000 tries, again, but only 1 keypress each time)... but you'd be reading each number off of a page full of 10,000 numbers. No one would do that, it would be far too easy to miss a number, lose your place, read the wrong line, press the wrong button. Any mistake at all would basically mean you'd have to start over or risk missing the opening combination. And you might have 1/4th the keypresses, but it wouldn't take you 1/4th the time, since the attempt to open it is the lengthy part. It's not worth the loss of the ability to remember what number you were on.

    So it's just a theoretical exercise, the practical implementation isn't useful at all.

  • BBT (unregistered) in reply to Frank
    Frank:
    Quite honestly, this is a ethically questionable code challenge.

    You're not only revealing how these lock boxes work (Which, yes, would be commonly available information), but you're announcing "to the world" that they're simple to break into, with a solution to how to do it.

    Why do I have issue with this? People selling their house have a realtor, who will use lockboxes. For the seller, there's no guarantee that others will use spin-wheel, combination, or push-button lockboxes, and the seller has no say on what will be employed.

    You're now telling people how to get a key for doors to houses for people who are selling for one reason or another. Most will not use this information in a negative manner, however, some douche out there will take this information (which might not have been apparent) as an invitation to start ripping people off.

    Think about it - you're selling your house. You're not home most of the time (Work), and neighbours are used to seeing people coming and going into your home. And then you find a website which is announcing a contest, for fun, on how to get a key for your house.

    Strike anyone else as questionable / bad idea? Tinfoil hat wearer I'm not, I just have issues with other people's ethics (Such as the dick who did this to a friend some months ago)

    The correct place to direct your anger would be with your realtor for using such an insecure system.

  • (cs) in reply to grizz
    grizz:
    It never fails to amaze me how often the guy who says "maybe this isn't such a good idea" gets ridiculed and scorned. The rational used to justify the abuse usually boils down to variations on the themes of "the bad guys already know all this anyway" and "security by ignorance never works; we're really empowering the masses by telling them about a vulnerability". I say bollocks to both arguments.

    (((rant snipped)))

    </rant>

    This may seem like a strident reaction to a fairly innocuous situation, but I'm really tired of people being mocked and scoffed at for daring to raise a question about the wisdom of doing something.

    Let the ad hominum attacks commence!

    That's ad hominem, you miserable cretin.
  • Anon (unregistered) in reply to rfoxmich
    rfoxmich:
    The easier way to attack a lock like this involves a sharp smack with a hammer. When I was house hunting it always seemed to me that these devices were quite flimsy in construction.

    ^This. The ones I've seen seem to be all plastic.

  • Chad (unregistered) in reply to Frank

    There are other technologies that are used now as well. They are relatively inexpensive to implement and are resuabe. These tech not only make it impossible to open with out having a user identifible pass key they track who opened it so if something happens there is a track back

  • Franz Kafka (unregistered) in reply to db48x
    db48x:
    It's not ethically questionable at all. It's far better to encourage people to think critically about the security measures that they employ than it is to try to hide this kind of information. Hiding information never works, those people who would abuse it already have it, while the rest of us need to be sure we understand how the technology around us works.

    Of course, the sad fact is that all locks are much easier to get past than the manufacturers claim. I'm sure there's an easier way to attack a lock like this than brute-forcing the combination, but it's an interesting programming problem nevertheless. There's a known algorithm for finding the shortest sequence when the attempts can overlap like this, but I can't quite think of the name…

    Look up bump keys - they're simple to make and only require that you know what shape key blank is used. With practice, you can open a door quickly enough that a casual observer would think you were using a real key

  • Victor (unregistered)

    Personally, I don't consider this lock box system flawed at all.

    Considering that repetitions are allowed, you have a total of 10^4 possible combinations. In the worst-case scenario, some dude would have to input 10000 numbers in a row to break into your house....

    IMO, a crowbar is more effective.

  • ClutchDude (unregistered) in reply to grizz
    grizz:
    It never fails to amaze me how often the guy who says "maybe this isn't such a good idea" gets ridiculed and scorned. The rational used to justify the abuse usually boils down to variations on the themes of "the bad guys already know all this anyway" and "security by ignorance never works; we're really empowering the masses by telling them about a vulnerability". I say bollocks to both arguments.

    It is almost certain that "the bad guys" do in fact already have the knowledge being discussed. The thing is, as is discussed in this thread, they usually also have other knowledge/tools that are more efficient; using this example, it's pretty unlikely a thief going to stand there keying in ~10K numbers rather than using a lock pick or a brick. The problem arises when some piece of knowledge lowers the bar for what determines a "bad guy". If you don't think there is a population of bored kids out there who see stuff like this and say, "Hey! I didn't know that's how those locks worked! Let's give it a try, just for kicks!" then you're a fool. Now, instead of just a (relatively) small number of actual criminals, the group of "bad guys" grows exponentially to include bored kids and casual vandals. And yes, I know that the chances of a bored kid having the patience to key in all 10K numbers approaches zero, but we also know that the lock will open long before exhausting the set of all possible combinations, especially with some of the other techniques already discussed in the thread.

    I also disagree with the "security by ignorance never works" argument. This website is a prime example of ignorance in action. Do you think most of the examples we see here everyday are the result of anything but ignorance or stupidity? The schmucks responsible for them certainly wouldn't have chosen to do some of the ridiculous things we all chuckle at if they'd known a better way. What's more, simply knowing that a thing is possible is often the biggest obstacle to getting something done. Would our hypothetical bored kid known about the limitations of these locks or how to use the De Bruijn sequence to brute force the key entries? Bloody unlikely, I think. However, the very sites that host these "hey, didja know that ..." type of discussions are often the same sites our bored little nascent troublemakers often hang out on. Just because "security by ignorance" doesn't ALWAYS work doesn't mean we need to do our best to ensure that it NEVER works.

    Finally, the "we're educating people to the problem" justification is complete and utter BS. How, precisely, to you think people are going to be educated? From reading about it on TDWTF? <sarc>Yeah; right!</sarc> They'll learn about it when their neighbors’ house is vandalized or they come home to find all their stuff gone and the police tell 'em that entry was gained by someone getting the key out of the lock box. Thanks, but that's not the way I want to be "educated".

    </rant>

    This may seem like a strident reaction to a fairly innocuous situation, but I'm really tired of people being mocked and scoffed at for daring to raise a question about the wisdom of doing something.

    Let the ad hominum attacks commence!

    First, it's ad hominem.

    sigh

    If a person cannot be bothered to properly educate themselves with their surroundings to at least some degree, don't expect much compassion from others. If they are content with knowing less-satisfactory about stuff, adjust expectations accordingly.

    IE-You use a pipe cleaner that eats away at your pipes. You then bitch about having to replace them. You got what you had coming.

  • anon (unregistered) in reply to db48x

    Agreed. This is no more ethically questionable than saying "you can break a glass window with a reasonably sized stone." And that would take a lot less time than brute forcing the key lock box.

  • Anonymous (unregistered) in reply to Frank

    I'd like to point out that this can also be used to open car doors with the combination locks on the door handles. Especially those with five buttons, in which each single button shares two numbers: (1|2) (3|4) (5|6) (7|8) (9|0).

  • grizz (unregistered) in reply to D-Coder

    Well played, D-Coder, well played!

    (Grizz frantically searches for his Snappy Comebacks for Dummies book. As usual, he'll find it tomorrow.)

  • EngleBart (unregistered)

    This reminds me of a brute force attack that a college friend used after a night of drinking.

    As he was stumbling across campus, he noticed a bike locked with a very unique lock. It had 5 levers, each of which had 3 positions. He quickly calculated that the exact number of possible combinations was 240 (remember, he had been drinking!) and sat down to brute force it. He said it only took him 2-3 minutes even with his fingers not following directions very well. So, he stole the lock! (remember yet again that he had been drinking) Hopefully, the bike owner used the bike before someone came by looking to steal the bike.

    :-( I had my bike stolen from a nearby bike stand, but they just cut the lock over a long holiday weekend. The brute-force-a-la-bolt-cutters algorithm.

  • PogoTex (unregistered)

    Many of these lockboxes have been replaced with electronic locks that require the real estate salesperson to physically place a RFID dongel near the box for it to unlock the box. The houses you mentioned here, many times have the simpler box, described here, requiring the entry of the code. Some agents give the code to trusted (perhaps unwisely) clients have access to those boxes.

  • Jason (unregistered) in reply to Frank

    Its not questionably ethical, it is patriotic. It is just like discussing any vulnerability. We need them because there are vulnerabilities and if we ignore them, we only get burned by ';DROP DATABASE;

    There are better locks out there - with fingerprint scanners or RSA tokens. The amount of liability is proportional to the risk and is balanced by the cost of defending/repair. While a worst-case is to burn the house down, a much more reasonable case is that someone would rip out all the copper pipes so you multiply the crime factor against the cost of copper pipes to determine your lock's cost.

    One rule not mentioned is you can't repeat the digit.

  • John (unregistered) in reply to Frank

    I think you may grossly underestimating the length of the resulting string.

    I am pretty sure it going to be on the order of thousands of digits.

  • (cs) in reply to Joris
    Joris:
    This should be it:

    0000100020003000400050006000700080009001 1001200130014001500160017001800190021002 2002300240025002600270028002900310032003 3003400350036003700380039004100420043004 4004500460047004800490051005200530054005 5005600570058005900610062006300640065006 6006700680069007100720073007400750076007 7007800790081008200830084008500860087008 8008900910092009300940095009600970098009 9010102010301040105010601070108010901110 1120113011401150116011701180119012101220 1230124012501260127012801290131013201330 1340135013601370138013901410142014301440 1450146014701480149015101520153015401550 1560157015801590161016201630164016501660 1670168016901710172017301740175017601770 1780179018101820183018401850186018701880 1890191019201930194019501960197019801990 2020302040205020602070208020902110212021 3021402150216021702180219022102220223022 4022502260227022802290231023202330234023 5023602370238023902410242024302440245024 6024702480249025102520253025402550256025 7025802590261026202630264026502660267026 8026902710272027302740275027602770278027 9028102820283028402850286028702880289029 1029202930294029502960297029802990303040 3050306030703080309031103120313031403150 3160317031803190321032203230324032503260 3270328032903310332033303340335033603370 3380339034103420343034403450346034703480 3490351035203530354035503560357035803590 3610362036303640365036603670368036903710 3720373037403750376037703780379038103820 3830384038503860387038803890391039203930 3940395039603970398039904040504060407040 8040904110412041304140415041604170418041 9042104220423042404250426042704280429043 1043204330434043504360437043804390441044 2044304440445044604470448044904510452045 3045404550456045704580459046104620463046 4046504660467046804690471047204730474047 5047604770478047904810482048304840485048 6048704880489049104920493049404950496049 7049804990505060507050805090511051205130 5140515051605170518051905210522052305240 5250526052705280529053105320533053405350 5360537053805390541054205430544054505460 5470548054905510552055305540555055605570 5580559056105620563056405650566056705680 5690571057205730574057505760577057805790 5810582058305840585058605870588058905910 5920593059405950596059705980599060607060 8060906110612061306140615061606170618061 9062106220623062406250626062706280629063 1063206330634063506360637063806390641064 2064306440645064606470648064906510652065 3065406550656065706580659066106620663066 4066506660667066806690671067206730674067 5067606770678067906810682068306840685068 6068706880689069106920693069406950696069 7069806990707080709071107120713071407150 7160717071807190721072207230724072507260 7270728072907310732073307340735073607370 7380739074107420743074407450746074707480 7490751075207530754075507560757075807590 7610762076307640765076607670768076907710 7720773077407750776077707780779078107820 7830784078507860787078807890791079207930 7940795079607970798079908080908110812081 3081408150816081708180819082108220823082 4082508260827082808290831083208330834083 5083608370838083908410842084308440845084 6084708480849085108520853085408550856085 7085808590861086208630864086508660867086 8086908710872087308740875087608770878087 9088108820883088408850886088708880889089 1089208930894089508960897089808990909110 9120913091409150916091709180919092109220 9230924092509260927092809290931093209330 9340935093609370938093909410942094309440 9450946094709480949095109520953095409550 9560957095809590961096209630964096509660 9670968096909710972097309740975097609770 9780979098109820983098409850986098709880 9890991099209930994099509960997099809991 1112111311141115111611171118111911221123 1124112511261127112811291132113311341135 1136113711381139114211431144114511461147 1148114911521153115411551156115711581159 1162116311641165116611671168116911721173 1174117511761177117811791182118311841185 1186118711881189119211931194119511961197 1198119912121312141215121612171218121912 2212231224122512261227122812291232123312 3412351236123712381239124212431244124512 4612471248124912521253125412551256125712 5812591262126312641265126612671268126912 7212731274127512761277127812791282128312 8412851286128712881289129212931294129512 9612971298129913131413151316131713181319 1322132313241325132613271328132913321333 1334133513361337133813391342134313441345 1346134713481349135213531354135513561357 1358135913621363136413651366136713681369 1372137313741375137613771378137913821383 1384138513861387138813891392139313941395 1396139713981399141415141614171418141914 2214231424142514261427142814291432143314 3414351436143714381439144214431444144514 4614471448144914521453145414551456145714 5814591462146314641465146614671468146914 7214731474147514761477147814791482148314 8414851486148714881489149214931494149514 9614971498149915151615171518151915221523 1524152515261527152815291532153315341535 1536153715381539154215431544154515461547 1548154915521553155415551556155715581559 1562156315641565156615671568156915721573 1574157515761577157815791582158315841585 1586158715881589159215931594159515961597 1598159916161716181619162216231624162516 2616271628162916321633163416351636163716 3816391642164316441645164616471648164916 5216531654165516561657165816591662166316 6416651666166716681669167216731674167516 7616771678167916821683168416851686168716 8816891692169316941695169616971698169917 1718171917221723172417251726172717281729 1732173317341735173617371738173917421743 1744174517461747174817491752175317541755 1756175717581759176217631764176517661767 1768176917721773177417751776177717781779 1782178317841785178617871788178917921793 1794179517961797179817991818191822182318 2418251826182718281829183218331834183518 3618371838183918421843184418451846184718 4818491852185318541855185618571858185918 6218631864186518661867186818691872187318 7418751876187718781879188218831884188518 8618871888188918921893189418951896189718 9818991919221923192419251926192719281929 1932193319341935193619371938193919421943 1944194519461947194819491952195319541955 1956195719581959196219631964196519661967 1968196919721973197419751976197719781979 1982198319841985198619871988198919921993 1994199519961997199819992222322242225222 6222722282229223322342235223622372238223 9224322442245224622472248224922532254225 5225622572258225922632264226522662267226 8226922732274227522762277227822792283228 4228522862287228822892293229422952296229 7229822992323242325232623272328232923332 3342335233623372338233923432344234523462 3472348234923532354235523562357235823592 3632364236523662367236823692373237423752 3762377237823792383238423852386238723882 3892393239423952396239723982399242425242 6242724282429243324342435243624372438243 9244324442445244624472448244924532454245 5245624572458245924632464246524662467246 8246924732474247524762477247824792483248 4248524862487248824892493249424952496249 7249824992525262527252825292533253425352 5362537253825392543254425452546254725482 5492553255425552556255725582559256325642 5652566256725682569257325742575257625772 5782579258325842585258625872588258925932 5942595259625972598259926262726282629263 3263426352636263726382639264326442645264 6264726482649265326542655265626572658265 9266326642665266626672668266926732674267 5267626772678267926832684268526862687268 8268926932694269526962697269826992727282 7292733273427352736273727382739274327442 7452746274727482749275327542755275627572 7582759276327642765276627672768276927732 7742775277627772778277927832784278527862 7872788278927932794279527962797279827992 8282928332834283528362837283828392843284 4284528462847284828492853285428552856285 7285828592863286428652866286728682869287 3287428752876287728782879288328842885288 6288728882889289328942895289628972898289 9292933293429352936293729382939294329442 9452946294729482949295329542955295629572 9582959296329642965296629672968296929732 9742975297629772978297929832984298529862 9872988298929932994299529962997299829993 3334333533363337333833393344334533463347 3348334933543355335633573358335933643365 3366336733683369337433753376337733783379 3384338533863387338833893394339533963397 3398339934343534363437343834393444344534 4634473448344934543455345634573458345934 6434653466346734683469347434753476347734 7834793484348534863487348834893494349534 9634973498349935353635373538353935443545 3546354735483549355435553556355735583559 3564356535663567356835693574357535763577 3578357935843585358635873588358935943595 3596359735983599363637363836393644364536 4636473648364936543655365636573658365936 6436653666366736683669367436753676367736 7836793684368536863687368836893694369536 9636973698369937373837393744374537463747 3748374937543755375637573758375937643765 3766376737683769377437753776377737783779 3784378537863787378837893794379537963797 3798379938383938443845384638473848384938 5438553856385738583859386438653866386738 6838693874387538763877387838793884388538 8638873888388938943895389638973898389939 3944394539463947394839493954395539563957 3958395939643965396639673968396939743975 3976397739783979398439853986398739883989 3994399539963997399839994444544464447444 8444944554456445744584459446544664467446 8446944754476447744784479448544864487448 8448944954496449744984499454546454745484 5494555455645574558455945654566456745684 5694575457645774578457945854586458745884 5894595459645974598459946464746484649465 5465646574658465946654666466746684669467 5467646774678467946854686468746884689469 5469646974698469947474847494755475647574 7584759476547664767476847694775477647774 7784779478547864787478847894795479647974 7984799484849485548564857485848594865486 6486748684869487548764877487848794885488 6488748884889489548964897489848994949554 9564957495849594965496649674968496949754 9764977497849794985498649874988498949954 9964997499849995555655575558555955665567 5568556955765577557855795586558755885589 5596559755985599565657565856595666566756 6856695676567756785679568656875688568956 9656975698569957575857595766576757685769 5776577757785779578657875788578957965797 5798579958585958665867586858695876587758 7858795886588758885889589658975898589959 5966596759685969597659775978597959865987 5988598959965997599859996666766686669667 7667866796687668866896697669866996767686 7696777677867796787678867896797679867996 8686968776878687968876888688968976898689 9696977697869796987698869896997699869997 7778777977887789779877997878797888788978 9878997979887989799879998888988998989999 000

    I have the same combination on my luggage!
  • Troy (unregistered)

    Wouldnt this be just a loop from 0 to 9999 zero padded to 4 digits?

  • Javier (unregistered)

    If I understood correctly, there are a couple of errors in the text:

    Taking it a step further, the sequence 4-8-2-9-5-1-4-5 would cover the codes 4-8-2-9 8-2-9-5 9-5-1-4 and 5-1-4-5. -> and 2-9-5-1.

    write a function that outputs a sequence numbers which cover all combinations within the sequence. -> to write a sequence is trivial, shouldn't it be "write the shortest sequence which covers all combinations"??.

Leave a comment on “The Key Lock Box”

Log In or post as a guest

Replying to comment #:

« Return to Article