login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A282425 The maximum number of steps Langton's ant can make confined to an n X n grid. 1
0, 5, 16, 45, 84, 163, 260 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(8) >= 338, a(9) >= 397, a(10) >= 502.
From Rok Cestnik, Aug 25 2017: (Start)
We are looking for the combination of grid configuration, ant orientation and ant position that yields the maximal number of steps before the ant leaves the grid. We consider all possible grid configurations and ant positions, but since the ant may move forward and backwards in time (see third considered symmetry below) we deduce that the maximal solution will always have the ant start from the edge of the grid.
For the sake of solution presentation, we consider these rules: at a white cell turn left, at a black cell turn right (vice versa results in the same behavior, just mirrored). Some cells might not get visited in a solution; therefore they are unconstrained, and we color then gray. We also take into consideration some symmetries of the ant to avoid presenting several maximal solutions that are just transformations of a single solution. That said, it is not impossible that two fundamentally different configurations would both have the same maximal number of steps.
Considered symmetries of the ant:
1. rotational symmetry, e.g., we consider that the configuration
+-----+-----+-----+ +-----+-----+-----+
| | |BBBBB| | | |BBBBB| |
| v |BBBBB| | | |BBBBB| <-- |
| |BBBBB| | | |BBBBB| |
+-----+-----+-----+ +-----+-----+-----+
|BBBBB| | | is |BBBBB| |BBBBB|
|BBBBB| | | equivalent |BBBBB| |BBBBB|
|BBBBB| | | to |BBBBB| |BBBBB|
+-----+-----+-----+ +-----+-----+-----+
| |BBBBB|BBBBB| |BBBBB| | |
| |BBBBB|BBBBB| |BBBBB| | |
| |BBBBB|BBBBB| |BBBBB| | |
+-----+-----+-----+ +-----+-----+-----+
.
2. mirror symmetry combined with color inversion, e.g., we consider that the configuration
+-----+-----+-----+ +-----+-----+-----+
| |BBBBB| | |BBBBB| |BBBBB|
| |BBBBB| <-- | |B-->B| |BBBBB|
| |BBBBB| | |BBBBB| |BBBBB|
+-----+-----+-----+ +-----+-----+-----+
|BBBBB| |BBBBB| is | |BBBBB| |
|BBBBB| |BBBBB| equivalent | |BBBBB| |
|BBBBB| |BBBBB| to | |BBBBB| |
+-----+-----+-----+ +-----+-----+-----+
|BBBBB| | | |BBBBB|BBBBB| |
|BBBBB| | | |BBBBB|BBBBB| |
|BBBBB| | | |BBBBB|BBBBB| |
+-----+-----+-----+ +-----+-----+-----+
.
3. reversing the arrow of time combined with inverting the color of the cell on which the ant is located and turning the ant according to the color of its (now inverted) cell (with the chosen rules, if white turn left, if black turn right), e.g., the configuration
+-----+-----+-----+ +-----+-----+-----+
|BBBBB| |BBBBB| |BBBBB|BBBBB|BBBBB|
|B-->B| |BBBBB| |BBBBB|BBBBB|BBBBB|
|BBBBB| |BBBBB| |BBBBB|BBBBB|BBBBB|
+-----+-----+-----+ +-----+-----+-----+
| |BBBBB| | will end |BBBBB|BBBBB|BBBBB|
| |BBBBB| | in state |BBBBB|BBBBB|BBBBB|
| |BBBBB| | |BBBBB|BBBBB|BBBBB|
+-----+-----+-----+ +-----+-----+-----+
|BBBBB|BBBBB| | | | |BBBBB|
|BBBBB|BBBBB| | | <-- | |BBBBB|
|BBBBB|BBBBB| | | | |BBBBB|
+-----+-----+-----+ +-----+-----+-----+
.
and
.
+-----+-----+-----+ +-----+-----+-----+
|BBBBB|BBBBB|BBBBB| | | |BBBBB|
|BBBBB|BBBBB|BBBBB| | ^ | |BBBBB|
|BBBBB|BBBBB|BBBBB| | | | |BBBBB|
+-----+-----+-----+ +-----+-----+-----+
|BBBBB|BBBBB|BBBBB| will end | |BBBBB| |
|BBBBB|BBBBB|BBBBB| in state | |BBBBB| |
|BBBBB|BBBBB|BBBBB| | |BBBBB| |
+-----+-----+-----+ +-----+-----+-----+
|BBBBB| |BBBBB| |BBBBB|BBBBB| |
|BB^BB| |BBBBB| |BBBBB|BBBBB| |
|BB|BB| |BBBBB| |BBBBB|BBBBB| |
+-----+-----+-----+ +-----+-----+-----+
.
hence
.
+-----+-----+-----+ +-----+-----+-----+
|BBBBB| |BBBBB| |BBBBB|BBBBB|BBBBB|
|B-->B| |BBBBB| |BBBBB|BBBBB|BBBBB|
|BBBBB| |BBBBB| |BBBBB|BBBBB|BBBBB|
+-----+-----+-----+ +-----+-----+-----+
| |BBBBB| | is |BBBBB|BBBBB|BBBBB|
| |BBBBB| | equivalent |BBBBB|BBBBB|BBBBB|
| |BBBBB| | to |BBBBB|BBBBB|BBBBB|
+-----+-----+-----+ +-----+-----+-----+
|BBBBB|BBBBB| | |BBBBB| |BBBBB|
|BBBBB|BBBBB| | |BB^BB| |BBBBB|
|BBBBB|BBBBB| | |BB|BB| |BBBBB|
+-----+-----+-----+ +-----+-----+-----+
(End)
Due to the ant's complex nature, its trajectory is hard to predict; therefore, an exhaustive search through the possible grid configurations must be performed, making this sequence computationally demanding.
LINKS
Rok Cestnik, Solution for n = 2
Rok Cestnik, Solution for n = 3
Rok Cestnik, Solution for n = 4
Rok Cestnik, Solution for n = 5
Rok Cestnik, Solution for n = 6
Rok Cestnik, Solution for n = 7
Wikipedia, Langton's ant
CROSSREFS
Sequence in context: A300961 A270134 A269754 * A185003 A189390 A099327
KEYWORD
nonn,hard,more
AUTHOR
Rok Cestnik, Feb 14 2017
EXTENSIONS
a(7) from Rok Cestnik, Aug 12 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 07:42 EDT 2024. Contains 371905 sequences. (Running on oeis4.)