Solve the following problem:
Table shows the state transition table of an arbiter, which is a device controlling the use of a facility required by two users. The user xi requires the facility by setting the input bit xi to 1, and release it by returning the input to 0. It is assumed that if both users require the facility simultaneously, it will be granted to the user which did not use it last. When granted, the facility cannot be taken from a user before it releases the facility converting the input from 1 to 0. The following encoding of states is assumed in this table
1 q0 - the initial state,
2 q1 - the user x1 requires the facility,
3 q2 - the user x2 requires the facility,
4 q3 - the user released the facility, but there is no request from the other user. Compare the complexity of excitation functions and output functions for the realizations of this arbiter by D-flip-flops and JK-flip-flops.