A second-order cellular automaton is a type of reversible cellular automaton (CA) invented by Edward Fredkin where the state of a cell at time t depends not only on its neighborhood at time t − 1, but also on its state at time t − 2.
In general, the evolution rule for a second-order automaton may be described as a function f that maps the neighborhood of a cell to a permutation on the states of the automaton. In each time step t, for each cell c of the automaton, this function is applied to the neighborhood of c to give a permutation σc. Then, this permutation σc is applied to the state of cell c at time t − 1, and the result is the state of the cell at time t + 1. In this way, the configuration of the automaton at each time step is computed from two previous time steps: the immediately previous step determines the permutations that are applied to the cells, and the time step before that one gives the states on which these permutations operate.
The reversed time dynamics of a second-order automaton may be described by another second-order automaton with the same neighborhood, in which the function g mapping neighborhoods to permutations gives the inverse permutation to f. That is, on each possible neighborhood N, f(N) and g(N) should be inverse permutations. With this reverse rule, the automaton described by function g correctly computes the configuration at time t − 1 from the configurations at time t and t + 1. Because every second-order automaton can be reversed in this way, it follows that they are all reversible cellular automata, regardless of which function f is chosen to determine the automaton rule.