4. Determine which of the following functions are equivalent:
$f_1(A, B, C, D) = AC + BD + A\bar{B}D$
$f_2(A, B, C, D) = A\bar{B}D + AB + A\bar{B}C$
$f_3(A, B, C, D) = BD + A\bar{B}D + ACD + ABC$
$f_4(A, B, C, D) = AC + ABCD + A\bar{B}D + BCD$
$f_5(A, B, C, D) = (B + \bar{D})(A + B)(A + \bar{C})$
5. Design a 3-bit counter that counts the following sequence: 0,2,6,7,5,1,0 etc. Make the next
state for the unwanted state \"don't cares\". There is no external input. Use T flip-flops and
obtain the expressions using SOP.