There is a truth table for a logical function of the three arguments F (A, B, C) .

It is known that the function takes a true value only for two sets of argument values, and these two sets are located in the truth table in a row one after another. Combinations of argument values ​​in a truth table are arranged from top to bottom in lexicographical order.

Next, the column of logical function values ​​was shifted up by 6 positions and it was found that another logical function G (A, B, C) , given by the resulting values ​​after the shift, takes the true value for combinations of arguments, each of which is opposite to one of the combinations, for which was true function F (A, B, C) . (opposite - inverted)

It is required to find function F.

I do not really understand how you can determine the truth of two adjacent sets of the first function, could you explain how to act here? I will be very grateful.

    1 answer 1

    6 up is the same as 2 down. Therefore, it is necessary to find the number x, such that the sets {x&7, (x+1)&7} and {(x+2)&7, (x+3)&7} contain opposite numbers. Since a shift of 2 does not change the last bit, the order must be changed:

     x & 7 = ~(x+3) & 7 (x+1) & 7 = ~(x+2) & 7 

    Replace ~t & 7 with (7-t) & 7 (module 8, and 8-1 = 7):

     x & 7 = (7-x-3) & 7 (x+1) & 7 = (7-x-2) & 7 
     x & 7 = (4-x) & 7 (x+1) & 7 = (5-x) & 7 

    Get rid of +1

     x & 7 = (4-x) & 7 x & 7 = (4-x) & 7 

    It turned out one equation

     x & 7 = (4-x) & 7 

    Its solutions are x = 4-x and x == 4-x + 8 , i.e. 2 and 6.

    Returning to the function:

     f(2) = f(3) = f(0,1,0) = f(0,1,1) = 1 g(4) = g(5) = g(1,0,0) = g(1,0,1) = 1 
     f(6) = f(7) = f(1,1,0) = f(1,1,1) = 1 g(0) = g(1) = g(0,0,0) = g(0,0,1) = 1 

    In theory, the solutions are 2. But if we recall the original condition and remove the cyclicity, we get only the second solution.

    However, if cycling is removed, then the second solution is generally the only potential one, since the units in any other rows would simply disappear.

    So there are still two solutions.