Given FSM has an input x, and an output z. During four consecutive clock pulses, a sequence of four values of the x signal is applied. Derive a state table for the FSM that produces z = 1 when it detects that either the sequence 1001 or 0111 has been applied; otherwise, z = 0. After the fourth clock pulse, the machine ahs to be again in the reset state, ready for the next sequence.