Kaggle's Conway's Reverse Game of Life contest inspires this Period of Life challenge. The kaggle contest runs from Oct-14-2013 thru Mar-02-2014. References: Game of Life at Wolfram. Wiki Life.
1. Any live cell with fewer than two live neighbors dies, as if caused by under-population. 2. Any live cell with two or three live neighbors lives on to the next generation. 3. Any live cell with more than three live neighbors dies, as if by overcrowding. 4. Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction. 5. No wrap around. Beyond edge is zero. Eight Neighbors.
Determine the period of life for a given binary matrix. A stable configuration, Still Life, has a cycle of 1.
Input: M , an [m,n] array
Output: N, Period of Life cycle (Period <11)
Examples: A few matrices of varying periods
N=1 N=2 N=3 Caterer
0000 00000 0000000000
0110 00000 0001000000
0110 01110 0100011110
0000 00000 0100010000
00000 0100000000
0000100000
0011000000
0000000000
Additional References: Oscillators, Still Life
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers27
Suggested Problems
-
Renaming a field in a structure array
1581 Solvers
-
Find matching string from a list of strings
275 Solvers
-
Back to basics 25 - Valid variable names
339 Solvers
-
Implement simple rotation cypher
1098 Solvers
-
Eliminate Polysyllabics: Long live short words!
156 Solvers
More from this Author306
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
I recommend seeing this: https://en.wikipedia.org/wiki/Oscillator_(cellular_automaton)
In this problem, all he wants is how many steps are necessary for the automaton to repeat itself.