Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Problem 1970. Kaggle: Reverse Game of Life - Periods of Oscillators

Created by Richard Zapor

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

Tags

Problem Group

Solution Statistics

6 correct solutions 3 incorrect solutions
Last solution submitted on Jun 30, 2014