Construct a state and output table for the state machine represented by Figure 5.27. Show that the number of states can be reduced. Derive the next state and output logic to implement the reduced state machine using (a) a minimal number of D flip-flops, and (b) the ‘one-hot' D flip-flop method. What are the relative advantages of each method? How has the reduction in the number of states helped in each case?