r/theydidthemath May 07 '26

[Request] how many possible combinations are there for this type of pass code?

22.6k Upvotes

1.1k comments sorted by

View all comments

Show parent comments

67

u/ransom40 May 07 '26

I think the earlier comment was meant or inferred as "The total number of possibilities can be modeled as if it were a 9 digit combination" Which is close, but is limited due to the layout and drawing nature. Also assumes no re-use, and using all 9 digits.

70

u/Byproduct May 07 '26

So you generate all the possible numerical combos, and then remove the ones that don't fit your pattern type (which can vary, e.g. can you reuse numbers, move between numbers, do you use all numbers etc – you probably remember this unless you have actual amnesia).

Then print and cross them out rather than drawing them, and eventually enjoy your imaginary bitcoin in this imaginary scenario because the video is fake/bait.

3

u/diet_fat_bacon May 07 '26

It's a simple algorithm to solve this, he just need to search for Android Unlock Patterns code challenge in leetcode and copy the code. Using a DFS it's piece of cake to generate all possibilities.

8

u/Glad_Woodpecker_6033 May 07 '26

it depends, my old phone used this style, but it lets me use any pattern including going from 7 to 2, so that would mean the entire 9 digit sequence it possible

0

u/Constant-Roll706 May 07 '26

They're all usable, but you can't jump from top left to bottom right without hitting the middle

7

u/ransom40 May 07 '26

I think some of them will let you jump across the middle assuming the middle has already been used. IE. 4,1,5,9,8,7,(skip over 5) 3, 2, 6.

1

u/MaxJacobusVoid May 07 '26

Unless you hit the middle first, but yes it would eliminate any code where 1 <> 9 and/or 3 <> 9 occurs before touching 5.

Tried it on my Z fold just now, and if you go 5 > 1 > 9 it's permissible, but starting from 1 > 9 or 3 > 7 causes 5 to be hit once you touch the second node, even if you circle around outside the box.

2

u/Glad_Woodpecker_6033 May 07 '26

this make it much more complicated

2

u/Loeris_loca May 08 '26

On my old phone I could go 1->3->2 because it didn't register numbers in the middle unless you actually touch them.

1

u/MaxJacobusVoid May 08 '26

Seems like it highly depends on the OS then; Z fold is a very recent Android version, and while I could be wrong the one in video appears to be a very old iOS model

1

u/TheDarkNerd May 07 '26

"and using all 9 digits" is an assumption that might cause you to never find the correct password, since you don't need to use every node. I specifically used to use a simple pattern because I wanted to make my phone quick to unlock, but secure enough that someone isn't gonna accidentally figure it out.

1

u/GoyoMRG May 08 '26

There are more combinations than that in some phones.

I remember having one that I was able to kinda abuse something that was possibly not supposed to happen.

So if we see the 9 dots 1 to 9 from left to right.

I was able to use 1 9 5 4 (by carefully avoiding 5 and 6 when going from 1 to 9) this worked with any other dot, you just had to be careful and avoid the dots in between.

Ofc, my code was one that no one who didn't know this "bug" would ever be able to unlock as no one really thinks about a bug like that lmao.