I promise I won't look

Computer Science Level 4

Android's lock screen feature allows people to protect their phones by joining points on a grid to make a pattern. Let \(L\) be the size of the longest possible length of the pattern that can be drawn on an android phone with a \(3 \times 3\) pattern lock. If the grid is spaced equally by one unit what is \(L \sqrt{31} \) rounded to the nearest integer?

The rules for drawing a pattern are:

  • You can only use a point once

  • You cannot "jump" a point if it is in between the two points and is part of the line that satisfies the first two points. Ie You cannot go from 1 to 9 without also hitting 5. But you can go directly from 2 to 9 without including any other point.

  • ONCE a point is "taken", it may THEN be skipped. A point cannot be skipped "in transit" only if it hasn't already been taken.

To fully understand the rules,it is best to try them out on a real phone.

Details and Assumptions

  • The points are equally spaced vertically and horizontally by one unit.

  • If it had been a \(2 \times 2\) grid, \(L\) would be \( 1 + 2 \sqrt{2} \).

Image Credits - stackoverflow, banadia.de

Problem Loading...

Note Loading...

Set Loading...