Problem 1970. Kaggle: Reverse Game of Life - Periods of Oscillators
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
-
1 Comment
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.
Solution Comments
Show commentsProblem Recent Solvers21
Suggested Problems
-
Given two arrays, find the maximum overlap
1497 Solvers
-
Make a run-length companion vector
638 Solvers
-
187 Solvers
-
326 Solvers
-
262 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!