How to simplify the logical expression (~x Ʌ ~y Ʌ ~z) V (x Ʌ ~y) V (z Ʌ ~y)?

Asked

Viewed 5,514 times

-1

I came across the following question of logic in a leveling test that I did not know how to solve... could someone explain me the reasoning of the question?

Whereas x, y and z are simple propositions and ~x, ~y and ~z, respectively, their negations, the compound proposition of (~x Ʌ ~y Ʌ ~z) V (x Ʌ ~y) V (z Ʌ ~y) is equivalent to:

a) x V z.

b) ~x.

c) ~y.

d) and Ʌ ~z.

Caption:

  • Ʌ: Conjunction symbol ("and"/ "and")
  • V: Disjunction symbol ("or" / "or")

2 answers

5


Given the expression and considering the properties of Boolean algebra:

= (~x * ~y * ~z) + (x * ~y) + (z * ~y)

Simplifying the rating with the operator and as being * and or as being +

By the distributive property of multiplication, we can put the common term into evidence:

= ~y * ((~x * ~z) + x + z)

Given the equivalence of Morgan, where ~a * ~b = ~(a + b), one has:

= ~y * (~(x + z) + (x + z))

It is known that a + ~a = 1, for any a, then:

= ~y * 1

It is known that a * 1 = a, for any a, then:

= ~y

Therefore, (~x Ʌ ~y Ʌ ~z) V (x Ʌ ~y) V (z Ʌ ~y) is equivalent to ~y.

If you’re not a fan of algebra, you can analyze the 8 different input possibilities by calculating the output to build a Map of Karnaugh and, from the map, simplify its expression.

  • And in the end, y was useless. hehe

  • 1

    @Rogeriosantos or better, only he serves xD

1

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:

  1. if !y e z -> enters the C3, no matter the value of x, because the condition does not ask for it
  2. If !y e x -> enters C2, no matter the value of x, because the condition does not ask for it
  3. If !y e !x e !y -> enters the C1 if y or x = true, enters one of the previous options.
  4. 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.

  • 1

    What if y is positive? There is guarantee that the return of the expression will be false?

  • There is no guarantee, but the question is what is equivalent to that condition, ie if you write all that or just ~y, it will be the same thing, y positive is another story.. hehe

  • 1

    If it is "another story", then it may not be equivalent. To be equivalent the return must be the same for the same entry. Just apply the rules of Boole algebra and simplify the expression.

  • No, look at the expression: (~x Ʌ ~y Ʌ ~z) V (x Ʌ ~y) V (z Ʌ ~y) there is no y positive, the y positive is indifferent to it. if y is positive it will not meet the expression in either case, then it returns false, then it is wrong.

  • 1

    Could you clarify better what you meant by "there is no y positive"? The term ~y means inverted value of y; if the entrance y is 1, ~y will be 0; if y for 0, ~y will be 1.

  • 1

    For the record, I denied the answer because, although the answer is correct, it does not demonstrate the analysis that proves the equivalence between expressions. As widely used in the denial demonstration process, hundreds of successful cases do not prove the veracity of a statement, but only one case of denial suffices to prove otherwise. That is, it shows that the expression is equivalent in one case does not demonstrate equivalence in all cases.

  • I don’t think you understand the question.

  • Why do you think that? Could you clarify?

  • I edited the answer

Show 4 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.