We're given a programming environment in which it is possible to introduce new logical variables and issue logical commands with operations AND, OR and NOT, such as A = (X AND Y) OR Z. However, TRUE and FALSE are not defined, so that it is NOT allowed to write A = X OR TRUE.
At the beginning, we are given three logical variables X, Y and Z, initialized to arbitrary values. We need to make a list of logical commands that in total contains AT MOST TWO operations NOT, so that after the commands are executed the variables X, Y and Z contain their respective negations.
I have tried several times to solve this using these ideas:
- Some random logic expressions based on common negation of three given variables
- Try to find out when the value of some negation is true based on number of true and false values.
None of these worked for me...
NOTE: I'm not sure if this task is solvable, but even if it has no solution, that has to be proved as well