How many permutations of the androids dot login system are possible? I know for a fact the solution to this lies in Discrete Math, specifically Permutations Without Repetition, If your answer doesn’t use permutations or combinations you are incorrect.
The length of passwords is between 4 and 9 dots, There are a total of 9 dots to permute though. so my initial equation is:
9P4+9P5+9P6+9P7+9P8+9P9
However, I know this equation is incomplete because it does not take into consideration all of the rules. Each dot is distinct because of is position so if you assign a number to each dot as follows:
123
456
789
The password “1397” is impossible, if you attempt to use this password you will in fact have entered in “1236987” because the numbers in-between are automatically selected. Another equation needs to be created to account for these limitations and then subtract off from my nPr equation above.
This link has a great video of someone using the android login. It also goes into greater detail into the rules. The math on that page is completely incorrect, he is not even close to a real solution.
This is only a partial answer. The only relevant starting dots are 1, 2, and 5. For dots 1 and 2, you can generate a pattern equivalent to starting at any of the other dots (other than 5) with a simple rotation transformation. This means if you can enumerate all the patterns starting at 1 and 2 you can count all the patterns starting at any number other than 5 by multiplying by 4.
The paths starting at 5 are a different case. You can count all of them by counting all the paths that start with 5->1 and 5->2 and multiplying by 4 since you again can generate all the other possible paths with a simple rotation transformation.
So, a way to enumerate the paths would be…
(All paths starting at 1 + all paths starting at 2 + all paths starting with 5->1 + all paths starting with 5->2) * 4
Again, the numbering system, for easy reference:
For this first move:
From 1 -> 2, 4, 5, 6 and 8 are accessible.
From 2 -> 1, 3, 4, 5, 6, 7, and 9 are accessible (basically just not 8 or itself).
From 5 -> 1, 2, 3, 4, 6, 7, 8, and 9 are accessible.
For moves after that it gets really interesting.
For example, 1537 is a valid password. 1539 is not.
Here succinctly, are the rules:
No dot may be part of the path twice. If a dot is not part of the path and it is exactly crossed over by a transition, it becomes part of the path between the source dot and destination dot.
Here are some sample paths:
This program:
Generates an answer of 389112.
It also validates my previous intuitions: