Discrete-math 1

1a

Prove or disprove: (AB)(BA)A¬BF(AB)(BA)
A B AB BA A¬B F
0 0 1 1 1 1
0 1 1 0 0 0
1 0 0 1 1 1
1 1 1 1 1 1
(AB)(BA)A¬B

1b

Prove or disprove: pq¬q¬p
p q pq ¬q¬p
0 0 1 1
0 1 1 1
1 0 0 0
1 1 1 1
pq¬q¬p

1c

Prove or disprove: (pq)(¬q¬p) is a tautologyF(pq)(¬q¬p)
p q pq ¬q¬p F
0 0 1 1 1
0 1 0 0 1
1 0 0 0 1
1 1 1 1 1
Ftautology

1d

Prove or disprove: (pq)(pr)p(qr)F(pq)(pr)Gp(qr)
p q r pq pr qr F G
0 0 0 0 0 0 0 0
0 0 1 0 1 1 0 0
0 1 0 1 0 1 0 0
0 1 1 1 1 1 1 0
(pq)(pr)p(qr)

2a

Prove: ¬(pq)(p¬q)(q¬p)¬(pq)¬((pq)(qp))¬((¬pq)(¬qp))¬(¬pq)¬(¬qp)(p¬q)(q¬p)

2b

Prove: (¬p(q¬r))(pq)p(q¬r)(¬p(q¬r))(pq)(p(q¬r))(pq)p((q¬r)(pq))p(q(¬rp))(pq)(p(¬rp))(pq)(p¬r)p(q¬r)

2c

Prove: ¬(pq)p¬q¬(pq)¬(¬pq)p¬q

3a

  1. If Eran is tired, he is upset.
  2. When Eran is not upset, he is not tired.
AEran is tiredBEran is upset1. AB¬AB2. ¬B¬AB¬A¬AB1.2.

3b

  1. If Eyal is happy, Anat is tall; and if Anat is tall, Haggai is cute.
  2. If Eyal is happy, Haggai is cute.
AEyal is happyBAnat is tallCHaggai is cute1. (AB)(BC)2. AC
A B C AB BC 1. 2.
0 1 0 1 0 0 1
1.2.

3c

  1. If I am vegan, then I eat quinoa and do not eat shawarma.
  2. I do not eat quinoa only if I am not vegan, and I also do not eat shawarma
    if I am vegan.
AI am veganBI eat quinoaCI eat shawarma1. (AB)(A¬C)2. (¬B¬A)(A¬C)Conditional law: AB¬B¬A1.2.

4

The next exercise deals with cards that have a symbol on both sides—an English
letter on one side and a natural number on the other. Four cards are placed on the
table, showing the symbols A, P, 2, and 3. Which cards should be flipped to check
the statement ”If there is one of the letters AEIOU on one side of the card, then on
the other side, there is an even number”? Justify well (why the cards you suggested
need to be flipped, and why the other cards do not need to be checked).

AThere is a letter A,E,I,O or U on the one side of the cardBThere is an even number on the other side of the cardStatement: FAB
  1. If there is a letter A on one side, then on the other is a natural number. If it's even, the statement holds, if not, the statement is false, thus we have to flip this card.
  2. If there is a letter P on one side, then on the other is a natural number, if it's odd, the statement holds, if it's even, the statement still holds, thus we don't have to flip that card.
  3. If there is a number 2 on one side, then on the other is a letter. If it's one of A,E,I,O or U, the statement holds, if it's not, the statement still holds, thus we don't have to flip this card.
  4. If there is a number 3 on one side, then on the other is a letter. If it's not one of A,E,I,O or U, the statement holds, if it is, the statement is false, thus we have to flip this card.
CIf there is a letter A on one side of the card, then there is an even number on the otherDIf there is a number 3 on one side of the card, then there is a letter A,E,I,O or U on the otherF(C¬D) or in other words, (¬CD)¬F We have to flip the card with a letter A and the card with a number 3

5a

  1. If I am tired or hungry, then I am irritable.
  2. If I am not irritable, then I am not tired.
    Conclusion: I am tired if and only if I am irritable.
AI am tiredBI am hungryCI am irritable1. (AB)C2. ¬C¬AConclusion: (1.2.)(AC)
A B C 1. 2. 1.2. AC Conclusion
0 1 1 1 1 1 0 0
Conclusion is incorrect
Alternative proof:
If I am irritable, I can just be hungry, but not tired. Contradiction with the conclusion.Conclusion is incorrect

5b

  1. If the sun is shining, then all the roosters are crowing.
  2. If my rooster, Kuki, is crowing, then the sun is shining.
    Conclusion: The sun shines if and only if all the roosters are crowing
AThe sun is shiningBAll the roosters are crowingCMy rooster, Kuki, is crowingObvious implication: BC1. AB2. CAConclusion: (1.2.)(AB)Lines that are crossed out are contradictions to the obvious implication,and thus do not affect the result
A B C 1. 2. 1.2. AB Conclusion
0 0 0 1 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 1 1 0 0
0 1 1 1 0 0 0 1
1 0 0 0 1 0 0 1
1 0 1 0 1 0 0 1
1 1 0 1 1 1 1 1
1 1 1 1 1 1 1 1
Conclusion is correct
Alternative proof:
If all the roosters are crowing, then my rooster Kuki is crowing, then the sun is shining.Conclusion is correct

Let p, q be two statements such that the statement p → q has the value ”true.” In
this case, we say that p is a sufficient condition for q, and q is a necessary condition
for p. Formalize each of the following sections using appropriate predicates. In all
sections, the ”world” is the natural numbers; there is no need to state this.

Let us define the predicates:P(N)number N is primeE(N)number is evenG(N,M)N>MD(N,M)MN (the  character is a "divides" relation, in this case "M divides N")

6a

For every natural number n, the statement ”the number n is prime” is a sufficient condition for ”the number n is odd.”

N:P(N)¬E(N)

6b

For every natural number n, the statement ”the number n is prime and greater than 2” is a sufficient and necessary condition for ”the number n is odd.”

N:(P(N)G(N,2))¬E(N)

6c

For every natural number n, the statement ”the number n is divisible by 4” is a sufficient condition for ”the number n is even.”

N:D(N,4)E(N)

6d

For every natural number n, the statement ”the number n is even” is a necessary condition for ”the number n is divisible by 4.”

N:D(N,4)E(N)