Reply c) ~y.
Let’s call with the 'til' negative and without positive, to facilitate understanding.
If observed, if y is negative (~y) will satisfy in at least one of the other propositions, independent of the 'polarity' of x and 'z'.
That is, if ~y, doesn’t matter the rest as it will meet one of the 3, then it is equivalent.
EDIT
Explaining it better. the question refers to equivalence, i.e., which condition does exactly the same thing as the other.
In the matter (~x Ʌ ~y Ʌ ~z) V (x Ʌ ~y) V (z Ʌ ~y
), bringing to the programming would be :
var x, y, z :bool; //vamos pensar em true como natural e false como ~(inevrsão)
If we take over! y (~y) the expression below will be exactly the same, better speaking, it will only enter the if exactly in the same condition (if y is true, does not enter, because in the function below tbm will not enter)
// c1 c2 c3
if((!x && !y && !z) || (x && !y) || (z && !y)) {
//faça alguma coisa
}
Soon:
- if
!y e z
-> enters the C3, no matter the value of x, because the condition does not ask for it
- If
!y e x
-> enters C2, no matter the value of x, because the condition does not ask for it
- If
!y e !x e !y
-> enters the C1 if y
or x = true
, enters one of the previous options.
- if
y
-> regardless of x ou z
, because no condition meets this value would fall in the else
.
So if we look up, if ! y no matter the value of the other 2, the expression, will be true, as well as, if y, the expression will be false, regardless of x or y.
Completion:
if(!y)
has the same result as if((!x && !y && !z) || (x && !y) || (z && !y))
, soon c) ~y
, for (~y)
will have the same result as ( (~x Ʌ ~y Ʌ ~z) V (x Ʌ ~y) V (z Ʌ ~y))
equals.
Y
positive, changes whether or not it meets the condition, but the question is one condition that equates to another, and the y
does not exist in this context.
And in the end, y was useless. hehe
– Rogerio Santos
@Rogeriosantos or better, only he serves xD
– Woss