Skip to content

A Java program that uses DFS to generate all the possible patterns on a traditional 3x3 Android lock screen

License

Notifications You must be signed in to change notification settings

psyclone20/Android-Pattern-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android Pattern Generator

A Java program that uses DFS to generate all the possible patterns on a traditional 3x3 Android lock screen.

A valid pattern must satisfy the following constraints: (source)

  • Must connect at least four dots.
  • All dots in the pattern must be distinct.
  • If the line segment connecting any two consecutive dots in the pattern passes through any other dots, those other dots must have previously been in the pattern.

Output

The program generates all the possible 389,112 patterns and creates 2 files:

  • sequential.txt that contains the patterns arranged sequentially
  • shuffled.txt that contains the patterns arranged randomly

For reference, the numbers in the output are mapped to the points as:

0     1     2


3     4     5


6     7     8

Sample 1 Sample 2 Sample 3