# How did he get the order of code?

During the showoff of Ray Breslin's (Sylvester Stallone) first attempt to break-through a jail in the movie Escape Plan., how did he get the order of the jail door code?

He could only know what numbers have been used. So how did he open the jail door in a single try?

• Well, it's a movie :-) These things are never followed-through and solved with all necesary details. The same applies for the way they measured latitude and longitude. There were many mistakes and unresolved technical details there as well. Aug 26, 2020 at 16:38

According to a synopsis on IMDB...he has the numbers but guesses the order.

Over the next few days Ray takes note of the guards' routines. At least once a day the two guards who monitor the isolation area leave their post for a seven minute smoke break. The guards bring Ray his lunch which consists of, most importantly, a carton of chocolate milk. He dissects the cardboard milk carton and extracts a transparent plastic sheet from the label. The following day, when he's escorted out of his cell, he secretly applies the plastic film over the keypad which accesses his cell. The guard punches in the 4-digit access code, leaving his fingerprints on the film. Ray sneaks the film from the keypad, stuffs it in the bible, guesses the access code from the fingerprints and waits for the right moment to escape.

The actual dialogue is..

With the four numbers it's just a numbers game to identify the correct sequence.

There also an indication that he at least gets a glance at the keypad as the numbers are being identified.

If he has, say, the last two then his odds of getting it right first time are only 50/50.

Additionally, we only see the successful attempt...it doesn't necessarily mean there was only one...he states that he was unobserved for 7 minutes every day. So he had an opportunity to test other combinations.

• Not really explains how.
– A J
Oct 6, 2016 at 10:33
• Sure it does...he guesses. It's not logical I'll agree but it's a movie! Guess I'll have to watch it to see if there are any other clues. Oct 6, 2016 at 10:34
• @Paulie_D but in the movie, He surely says and memories the right code directly ! the code is 5348!! there are too many possibles for 4 digit number ! guess no possible! I will wait for few days to get a better answer ! if i dont get any! i will mark this, correct!! Oct 6, 2016 at 11:30
• If i remember my math correctly - a 4 digit code for which you know the four numbers AND each digit is only used once (all tropes in a movie you just have to accept) is actually only 24 combinations - though I might be remembering the wrong formula. Personally, I have long given up seeking explanations for things like this (the code in national treasure for instance) in movies - you just have to either have your disbelief willingly suspended or not.
– user37503
Oct 6, 2016 at 18:41

With a 4-digit code, the number of possible combinations is 4 * 3 * 2 * 1, or 24. The odds are small that he'd get it right on the first shot (roughly 5%), but he could surely have taken an educated guess based on the movement of the guards' hands time after time. Taking that into consideration, I'd say it's within the realm of possibility that he got it on the first shot, or at least within a few tries.