The Android unlock pattern has 9 dots on the screen organized in a 3×3 matrix. To unlock the phone a so called pattern has to be drawn on the screen, which means connecting certain points in a certain order. So how many valid patterns are there? For this let’s first observe the rules of pattern drawing:

at minimum 4 dots have to be used at maximum 9 dots can be used one dot can be used only once the order in which the dots are connected matters (thus making it a directed graph) dots are connected with a straight line meaning that all points on the path of the line get connected The last rule introduces some conditional connection paths. When connecting two points with a straight line it is valid only if there is no unused point in the way. For example: you cannot connect points 1 and 3 unless point 2 is already is used. So by default drawing a line from 1 to 3 will result in the pattern 1→2→3. However if point 2 is used the transition 1→3 becomes valid, such as in 2→1→3, making a previously invalid transition valid (1→3).

Also what some people seem to omit is that connecting points in a slight diagonal is possible (especially on Android 4, since the dots became smaller) such as 2→7.

## Question

## jasen

The Android unlock patternThe Android unlock pattern has 9 dots on the screen organized in a 3×3 matrix. To unlock the phone a so called pattern has to be drawn on the screen, which means connecting certain points in a certain order.

So how many valid patterns are there?For this let’s first observe the rules of pattern drawing:at minimum 4 dots have to be used

at maximum 9 dots can be used

one dot can be used only once

the order in which the dots are connected matters (thus making it a directed graph)

dots are connected with a straight line meaning that all points on the path of the line get connected

The last rule introduces some conditional connection paths. When connecting two points with a straight line it is valid only if there is no unused point in the way. For example: you cannot connect points 1 and 3 unless point 2 is already is used. So by default drawing a line from 1 to 3 will result in the pattern 1→2→3. However if point 2 is used the transition 1→3 becomes valid, such as in 2→1→3, making a previously invalid transition valid (1→3).

Also what some people seem to omit is that connecting points in a slight diagonal is possible (especially on Android 4, since the dots became smaller) such as 2→7.

## Link to comment

## Share on other sites

## 2 answers to this question

## Recommended Posts

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.