Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Can you crack the combination lock?

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
8,415
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Dec 9, 2011

The sequence 11221 contains all 2-digit combinations using the numbers 1 and 2.

Can you find a sequence that contains all the 3-digit combinations using the numbers 1, 2, and 3. What is the shortest such sequence?

Can you find a sequence that contains all the 4-digit combinations using the numbers 1, 2, 3, and 4. What is the shortest such sequence?

Then, can you break this lock? By which I mean, find the shortest sequence containing all 4-digit combinations using the numbers 0 to 9. The sequence is 10003 digits long (yes I misspoke in the video!)

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 2 dislikes

Link to this comment:

Share to:

Uploader Comments (singingbanana)

  • What?! I recognize this face! Hello from a Numberphile's viewer. Definitely subscribing.

  • @Gytax0 Hello!

  • so every combination in the sequence must be unique?

  • @tonix1993 Yup If possible.

  • 3 digits - 111222333112233123

    4 digits - 111122223333444411122233344411­2233441234

    5 digits -11111222223333344444555551111­222233334444555511122233344455­5112233445512345

  • @Goldy1337 You've missed a few.

Top Comments

see all

All Comments (195)

Sign In or Sign Up now to post a comment!
  • @singingbanana A FEW?!!?!? HE MISSED TONS!

  • So the lock is a "bad" lock because, once you have punched correct numbers in sequence, punching incorrect ones doesn't make you start all over. Unfortunately, you must use the same approach on all future openings. The advantage of the normal "brute force" approach is that you get the correct combination when you are successful and you can use it over and over again.

    Cool.

  • @ThBearsFriend because people dont get hung up on the notation when everyone including you understand what problem is asking for.

  • Remarkably, there are, at time of writing, 189 comments - and not a single one has mentioned the fact that you have used the word "combination" when you should have used the word "permutation"!!!

  • @yuitry1 check out the last 5 digits for 5

  • 33322211121223113123213233133 for three digits

  • @Goldy1337 132 missed in 3 1224 missed in 4 and 12354 missed in 5

  • I don't know what just happened

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more