Screen Combination
On Android, there is an option to have your password as a pattern. The pattern is a continuous line that connects the dots of a square grid together, subjected to the following rules:
The pattern drawn is directional: Drawing the same pattern in the opposite direction is considered a pattern distinct from the former.
Let be the number of distinct patterns possible on a grid of size and which lights up dots.
As an example:
Find the value of .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
My solution involves a recursive function that navigates the search tree, enumerating all patterns. This function will navigate the pattern such that only 1 additional dot is lit before calling itself again, to prevent double counting.
I welcome other solutions with different methods and languages ^-^
Anyways here's my script: