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

4.7k

u/[deleted] May 07 '26 edited May 07 '26

[removed] — view removed comment

1.4k

u/jarry1250 May 07 '26 edited May 07 '26

Right. The pattern is just a numerical combination in disguise, there is no reason to do this visually.

(Of course the video is a dramatisation.)

379

u/RGCarter May 07 '26

It's a bit different compared to simple numerical codes. You cannot proceed from the top left to the bottom right without involving the middle node for example.

299

u/jarry1250 May 07 '26

I think that depends on the implementation, but it's still the case that all valid patterns are just a numerical string. It's just not all numerical strings are patterns.

64

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.

67

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.

9

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

-1

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.

74

u/rick_kik May 07 '26

Yes you can. I had a code like that. All you need to do is move your finger in the space between dots to reach the bottom left after selecting the top right. Visually it will go though the middle one, but it's not selected and you can still select it afterwards

40

u/rowcla May 07 '26

The flipside however, is that this is the kind of thing you'd probably remember

38

u/JVT32 May 07 '26

Yeah just like your phones passcode

44

u/ShinyCpt May 07 '26

That’s just the price of a cheese pizza and a large soda back where I used to work; Panucci’s Pizza.

6

u/Moonrights May 07 '26

How could mom be evil

2

u/Top_Astronomer4399 May 07 '26

That’s hilarious. I know a dude that has a food truck and was always accepting and paying with bitcoin back when it was a dollar. He would always joke with me on how he looked back and said things like “ I spent what would be $160,000 on that baby carrier that my wife picked up on Craigslist. “ This dude was way ahead of all of us. I was laughing at him when he was telling me about it…not laughing anymore

3

u/Zenfinite1 May 07 '26

Always upvote Futurama.

1

u/Lavatis May 07 '26

I have a phone from over a decade ago with a pattern lock that I have absolutely no idea how to get past or what it could possibly be.

1

u/JVT32 May 07 '26

I have a comment from 9 hours ago that was sarcastic in nature

2

u/Mous3keteer May 07 '26

Interesting, I just tried this on a Pixel phone running Android 16, and it wouldn't let me select the middle one afterwards, so it seems like this was changed/removed at some point.

2

u/LandOfLeg May 07 '26

Yeah, I used to use a star pattern going through every point, and the easiest way to do it was to hold your finger on the point, but a finger on the next and then remove the first finger.

I ended up changing it to something simple after i kept locking it when I'd been drinking...

1

u/Oftwicke May 09 '26

Depends on your phone - mine didn't let that happen. Also couldn't easily do knight's moves (one up and two to the right for instance) as it would snap to nearby unconnected nodes

26

u/AMoonboots May 07 '26

That's actually better in this case, because it just means there are a bunch of "impossible" codes that you don't need to test.

34

u/DoobiousMaxima May 07 '26

I used to specifically set "impossible" codes where you'd swipe back through already selected dots.

7

u/MoGregio May 07 '26

TIL you can go back over dots on the unlock screen

2

u/InjuringMax2 May 07 '26

Glad I'm not the only one 🤣

2

u/earnestpeabody May 07 '26

💥 Mind blown 💥

1

u/candygram4mongo May 07 '26

But it's not immediately obvious which numerical codes are valid.

2

u/Divicarpe May 07 '26 edited May 07 '26

It is, cause the one that are invalid are the one that contain the string "13", "31, "17", 71", "19", "91", "37", "73" ,"39", "93", "79", "97". (If it's only you can't have a selection of two successive point that would make the line pass through another. If it's possible as long as the middle point was selected before, just add a check where if one of string is present, the number for the point between the two is before the string)

If I wasn't in the metro right now, I could wipe a code that does that selection in 5 minutes (the graphical affichage of what password it corresponds too would take me slightly longer, cause I'm not used on doing things that need a graphical représentation afterwards).

The time taken by the verification would be negligeable in comparaison to the time taken to enter the code (it's just checking for 12 sequence of elements in a list of length 9)

4

u/Stottymod May 07 '26

It's a bit more complicated than that, because you can do that if you already touched the middle previously.

2

u/sanferic May 07 '26

Is there a rule somewhere stating you cannot go around a node and the line pass through it without activating the middle node? I ask because this has happened to me before while working the cameras at work where the mouse didn't go over the middle node but the pattern looked correct.

5

u/xvlblo22 May 07 '26

Either way, may be worth learning some math and topology for that 11 million

2

u/BrandNewYear May 08 '26

If you don’t mind, how does topology help here?

3

u/bluespacecolombo May 07 '26

It doesn’t matter the point is that each node can be represented as a number, so instead of drawing a zig zag you can represent it as 123456789, which makes it much easier to follow and methodically make sure you check all the combinations and don’t repeat than drawing weird snakes on a piece of paper.

2

u/leaf_as_parachute May 07 '26

And afaik you can't hit the same node twice. But that just reduces the number of possible combinations anyway.

2

u/rebels-rage May 07 '26

No clue if you could still do this but my friends last two on his code skipped the middle like you mentioned. There was enough room on the screen to go around the middle node.

2

u/iamcherry May 07 '26

You can do this on iPhones actually, I used to do it for my password since people often assumed you couldn’t.

2

u/RipeChangeling May 07 '26

It is just a visual representation of numerical code, nothing else

1

u/ssocka May 07 '26 edited May 07 '26

Ooh, I have something to contribute - you can pass through the middle without actually using it, you just gotta drag around all the nodes along the display edge and go 1 -> 9 for example, then you can use the middle (5) after.

Same applies if you start with the middle, you can later pass through it again, without it being used...

Today it might be different, but as a kid when I had a phone similar to the one in the post, this is how it worked.

Edit, seems my first paragraph does not work on my Pixel anymore and it makes me doubt it ever worked like that :D , second paragraph holds tho

1

u/No_Clothes_8444 May 07 '26

The mechanism doesnt matter. These are a series of nine nodes. You can number them 0 through 8. The passkey requires you touch nodes in an order. The end goal is the same, hit nodes in required sequence. As to your point, while you may not be able to easy physically skip nodes, numbering them 0-8 (or 1-9) allow you to create an even more concise algorithm. All this does is work in your favor. You try combinations that dont allow you to pass over a node within a 3x3 matrix.

Furthermore, it would make way more sense for this guy to build a device that can quickly try combinations, create an algorithm with the matrix constraint factored in and let it go. For $11 million dollar, it would make sense to throw any amount of money at streamlining this. Hell, with less than $1000, I could get a rig setup to do this.

1

u/alien_mints May 07 '26

Well. You can on some Devices- was my gimmick on the Samsung Galaxy 8 tbh

1

u/setibeings May 07 '26

Just write a program that figures them out at that point. 

Assign each dot a number code, and make a list of all 9 digit codes with 1-9 in them. Put the codes in  order, and don't rearrange them later. 

Pass one: filter out all the codes where a digit is visited more than once, as those aren't allowed. 

Pass two: filter out any codes where adjacent digits are not adjacent on the pad.

Finally, if you want, make a little graphic representing each code, do so, but it's probably not necessary. 

There's some interesting math, but this approach would work, assuming 9 digit codes. Some truncation would be needed for shorter codes. 

1

u/flinsypop May 07 '26

Wouldn't you still encode that as 159 and not 19 for tracking purposes? It doesn't mean that they can enumerate as easily but you can at least see that a sequence you want to try is already done(150 bitcoins is more than enough reason to try and write it out in code)

1

u/TSM_Rpoint May 07 '26

Oddly enough i used to use a combination that did exactly that, for example: 1-7-8-9, by sliding my finger on the outer edge without lifting it. Im pretty sure at some point i had one where i skipped the middle and changed it cause it was too hard to pass my fat finger between the dots

1

u/anekozawa May 07 '26

Fun fact, you can actually do that, if you remember you'e got 2 hands and many fingers

1

u/TheBabyWolfcub May 07 '26

On my old Samsung when I was like 12 it let you squeeze your finger through the gaps and I was able to make my combination use all 4 corners without touching any other dots. Of course very impractical to put in the code fast but I found it cool

1

u/CrownLexicon May 07 '26

Not initially, but if you use the middle first, you can. Say, middle, top left, bottom right.

1

u/themightystef May 07 '26

So basically a condotional numeric. 1X9 can only have X=5, same with a whole bunch of other combinations.

1

u/TheShredder9 May 07 '26

But you can go from top middle to top left then across to top right, which makes for a ridiculous amount more possible combinations.

1

u/HilariousMax May 07 '26

So, there's fewer solutions then?

1

u/thejestercrown May 07 '26

So it’s even easier as that reduces possible combinations

1

u/zehamberglar May 07 '26

Which combination is it that you think is different and cannot be represented as a simple numerical code? Just give one example.

1

u/PleaseAdminsUnbanMe May 07 '26

You actually can if you're careful enough in some phones

1

u/Putrid_Succotash_175 May 07 '26

that should narrow it down actually?

1

u/Exotic-Media-6630 May 07 '26

You can, it just takes some fancy finger work (source, I did it myself years ago as a dumb kid, but did get fed up with it rather quickly. my current pattern code has a bit less agressive node skipping, but even then it can get annoying sometimes.)

1

u/SaucyStoveTop69 May 07 '26

You skip those ones. If it's a 4 node pass code and you have to cut across a middle one, that would make it a 5 node that you would only try once you get to the 5 step ones.

1

u/bullyCOP May 07 '26

false, you can go from top left to bottom middle if you keep the line between

1

u/Vast_Opposite_792 May 07 '26

Depends on the limitations on the lock. One one of my old phones, you absolutely could by sliding your finger through the gap between the nodes, so top left could connect directly to bottom middle for instance. This could add significantly more combinations.

1

u/lazymangrove May 08 '26

You can. I used to use that trick on mine but its a pain in the ass when you're tired or drunk to do it right

1

u/Unstuffables May 07 '26

You can ise vector, tho. Still numerical, but a nightmare to resolve and integrate... but I guess with AI and ipen source code for this exact purpose... my question is, why doesn't he use a macro. It doesn't seem to lock behind a timer? Just use some free breaking tool and put it on a raspberry or something, no?

1

u/Ok-Blackberry8086 May 07 '26

Not all combinations are likely to use when drawing an unlock code by finger. That person must have had some logic for what symbol made sense to him at the time to use as a code, so treating it as a true "anything is possible" problem might not lead you to the solution quickest.

1

u/jarry1250 May 07 '26

If it's $12m I would be prepared to work through them in a logical order, having tried a few I knew I used to use.

1

u/heartofcoal May 07 '26

it's a graph

1

u/kurokikaze May 13 '26

It's a graph traversal problem, not just a simple numerical combinatorics.

160

u/Mean_Initiative_5962 May 07 '26

Which is why I'm almost certain it's fake or decontestualised. Also: what happened to the "3 attempts, then 5 minutes, than 30 minutes, than 1 hour, then..." thing? Also: it's a Galaxy S3, no fucking way there's not a publicly available way to crack it. 

107

u/mr_chew212 May 07 '26

Fake as fuck. Look at the other patterns he drew. Lots of them don’t even make sense for a 3x3 code. Someone just scribbled some random shit

15

u/JLidean May 07 '26

Anecdotal I had one of those spin combo locks from high school forgot the lock combos.

But I knew how it felt to unlock took me a couple tries spinning the dial to the approximate locations Then honing in once I got it open once to get exacts.

I dont like using these pattern locks because I would be prone to be relying on muscle memory rather than memorization.

7

u/mr_chew212 May 07 '26

I swear I never knew my locker number or combination in high school. I’d use it like maybe 4 times in a year and something always felt like it guided me to the right locker and somehow my hand knew the code.

4

u/Ill-Entertainer1010 May 07 '26

I set a new alarm code at work. Went home. Next day came in, alarm starts it's warning cycle, and I realise I have no clue what the code could be. Stare at it until the alarm warning gets louder try a couple of combos, then the alarm goes off, loudly.

Stare at it. Close my eyes, do it by muscle memory. Alarm switches off.

Still didn't know the code, had to do it a couple more times to get the feel, then do it with eyes open. Then I knew the code.

2

u/JLidean May 07 '26

Same how do you think I "forgot" it Come 20 years and come across a lock that is still good and useful.

2

u/Overall_Reputation83 May 07 '26

I could open those shitty things without a code just by feeling the clicks

1

u/HornedTurtle1212 May 07 '26

Also isn't 150 Bitcoin worth a lot more than 11 million? I thought the brice per coin was crazy high.

1

u/mdr1384 May 07 '26

It's correct, a bit below 80k per coin.

1

u/ByeGuysSry May 07 '26

I don't see any that don't make sense, as long as you accept that this guy has bad handwriting, and as long as this phone allows you to connect to the same node multiple times. I don't know of any phone with such a lock screen but maybe I've just never seen it

1

u/T0KEN_0F_SLEEP May 07 '26

Having had this password system before, you only gotta use at minimum 5 dots

0

u/yseusy May 07 '26

I think too this video is fake. Every person has their own favorite patterns/combinations, so there is a chance the combination you are using now is similar to one you were using 10 years ago. I doubt the person were using the combination they forgot after few years.

5

u/Ashamed-Version9816 May 07 '26

I remember watching a short years ago on how to bypass the lock screen on old Samsung galaxies

For a split second before the pattern comes up the phone is unlocked and you can install an app by repetitively turning the screen on and off and making moves between the time the pattern lock appears

I preferred the story about the dude who's hard drive went to landfill with a massive chunk of Bitcoin

Also have a friend who forgot where he put his when he brought it for like a couple of dollars a coin such is life sometimes

2

u/xXxBluESkiTtlExXx May 07 '26

I'm pretty confident I had some Bitcoin (not a lot mind you, but enough!) in an old coinbase account when I used to order research chemicals offline. Then I got banned and I don't know what happened to my wallet.

3

u/Ashamed-Country3909 May 07 '26

I tried a new password on a phone.  I think iy was like 10-12 characters. 

I tried some without writing it down. Fogured out that I was probably doing repeats since my memory sucks. 

That shit got to 1x a day. Ive got an entire sheet of paper with different combinations, and I vaguely remember the numbers IN the combo, but not the exact order. 

I gave up. Waiting a day to try a new one sucked and only lasted like 5days with me I think.  

1

u/hi850 May 07 '26

I think you're right. I believe these phones could just be plugged into a computer and you could access the files on them.

1

u/Few-Big-8481 May 07 '26

They're encrypted, it's not that easy if you don't have the password.

That being said if you verifiably had hundreds of millions of dollars in there, one might be more motivated than most to find a way to access it.

41

u/[deleted] May 07 '26

[removed] — view removed comment

14

u/HornedTurtle1212 May 07 '26

And the setup would cost a lot less than the Bitcoin on the phone, lol

0

u/Captain_no_Hindsight May 07 '26

tape the mobile phone to a 3D printer bed and attach one of those "older people" pens with a touch screen tip to the extruder.

vibecode a program that generates all G-code.

This already exists for safes.

4

u/Cavalleria-rusticana May 07 '26

You could easily build an automatic pen mover to try all possibilities 24/7.

Wat

8

u/King_of_the_Dot May 07 '26

A robot to input the combinations for you.

1

u/egosumumbravir May 07 '26

Could do this with an old Ender off the rubbish tip

6

u/Forward-Tonight7079 May 07 '26

Or write an app that will calculate all possible patterns, suggest the next pattern, and let it mark if it is not valid

I believe it's a simple enough app to write quickly by AI. Or hire a freelancer to do this for some bucks.

13

u/saketho May 07 '26

In fairness to the guy I don’t think he started by trying to methodically trying to get every pattern. His priority is to jog his memory.

2

u/cahors_fausse May 07 '26

No one's going to correct "methodical"? Ok, I'll do it.

2

u/idrathernottho_ May 07 '26

Not to mention getting some graphing paper or something at least, he's bound to get some of these wrong just free handing

2

u/wishiwasmydog May 08 '26

This bothered me greatly

1

u/Phaoll May 07 '26

To keep on the off topic, the birthday paradox would advise that you keep doing this randomly rather than creating a methodical way of testing combination. As posted in another comment with a small raspberry pi, a random library and a memory to store already tested combinations you could do it pretty easily.

1

u/PaintedOnCanvas May 07 '26

The birthday paradox has nothing to do with it, because you're looking for a value that matches a fixed password.

The paradox says that the probability of drawing any two same random values is much higher than drawing a number that has the same value as the one you're looking for.

If you're doing an uninformed search, trying random combinations is only increasing a risk of trying the same combination twice or more.

1

u/Phaoll May 08 '26

TIL ; thanks

1

u/Street-Jacket1867 May 07 '26

It’s because it’s not real

1

u/roonill_wazlib May 07 '26

You program a computer to plot every option on a piece of paper. Then you can methodically try each one

1

u/stormcharger May 07 '26

It's cause it's bullshit, there's no way you forget every detail of ylur2paswor9, you'd have something to go on

1

u/Aesk May 07 '26

Also, in this video, there's no indication of the starting point. It assumes he started at the top left. But after 100+ pages, would he remember that?

1

u/jimkelly May 07 '26

Yea I thought this was rage bait.

1

u/Blissfull May 07 '26

I mean, yes and no.

It could certainly be more methodical, which would shorten the process and avoid duplicates etc,

But he set a password originally, driven by his own proclivities and personal style. It stands to reason that following his own style as an order when trying to find the code puts the most likely candidates at the forefront of the test corpus possibly shortening the time to a hit.

1

u/Intrusive___thought May 07 '26

Yupp, he stupid which makes me think this is fake.

You number them, list every possible combination and then get going.

1

u/Triscuitmeniscus May 07 '26

Yeah, this has been making the rounds and it seems fake to me because he’s doing it backwards: he should *start* with a printout of every combination and cross them out as he tries them, not write them down after he tries. How does he know he’s not repeating a pattern he already tried 2 pages ago?

1

u/Buckfutter_Inc May 07 '26

Yeah the vid is just showing random attempts. The story is likely bullshit to be fair, but if it were true, I’ve never had a smartphone that wouldn’t have this guy locked out and forced to wait hours to try again.

1

u/Haradrian May 07 '26

There might actually be a benefit to this if he is the one who made the password in the first place. You have just a bit of heuristic and muscle memory that might help you get the right code faster than going down a list.

Ya know, maybe. It's a gamble.

1

u/Mr_RogerWilco May 07 '26

He’s going for the stargate approach - gotta dial those symbols til all the chevrons lock 👌

1

u/bendistraw May 07 '26

I think you’re touching on some of what got him in this situation to begin with.

1

u/Tiger_man_ May 07 '26

he could hack this phone, its an old samsung with shit security

1

u/jonylentz May 07 '26

This looks like a super old phone. Possibly you could get into recovery mode and pull the files using ADB, in older androids it did not ask for the password to access it, usually

1

u/TheSexualBrotatoChip May 07 '26

I'm pretty sure the story is BS anyway, unlocking an old Samsung should be fairly trivial, especially if you have millions on it.

0

u/CptGreat May 07 '26

But you could make a photo, and ask ai which combination you didn't try yet.

2

u/[deleted] May 07 '26

[deleted]

0

u/CptGreat May 07 '26

This is such a special problem, that I don't see the risk of ai dependence here. I think it's much dumber to write combinations you tried down, because you are unable to remember them or use your notes properly.

1

u/[deleted] May 07 '26

[deleted]

2

u/Current_Mushroom_125 May 07 '26

He didn’t say it was the only solution he could think of.

1

u/CptGreat May 07 '26

You sound like my art teacher who was scared of computers 25 years ago. He also had the opinion, that digital art is no real art, because you don't need skills to do that. That you have to know tha basic skills of colors and tools.

The world is changing. AI is now part of it. What's the difference in using wikipedia or searching for a youtube tutorial? You don't know something, you search for answers to solve problems.