State Transitions Suppose the following description of state transitions From state 0 - if you see a 0, go to state 0; if you see a 1, go to state 1 From state 1 - if you see a 0, go back to state 0; if you see a 1, go to state 2 If you get to state 2, then stay in state 2 no matter what you see. The above set of transitions can be described as 0 0 -> 0 0 1 -> 1 1 0 -> 0 1 1 -> 2 2 0 -> 2 2 1 -> 2 We can then represent this as a matrix where the element at [0;0] has a value of 0, at [0;1] has a value of 1 and so forth m:(0 1 0 2 2 2) We can now apply this state transition matrix over a sequence of inputs. m\ will produce the sequence of transitions and m/ will result in just the final state i:0 0 0 1 0 1 1 0 0 0 1 0 1 0 m\i 0 0 0 1 0 1 2 2 2 2 2 2 2 2 m/i 2 m': will calculate the state transitions for each pair of values in the input, i[1]->i[0] i[2]->i[1] i[3]->i[2] i[4]->i[3] and so forth. This operation is useful when we have overlapping pairs of inputs and states, or we can use it with just 1 input and 1 starting state i 0 0 0 1 0 1 1 0 0 0 1 0 1 0 m':i 0 0 0 1 0 2 1 0 0 0 1 0 1 m':0 2 ,2 m':1 2 ,2