Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
170 views

Discrete Math Lab 1 With Answer

This document discusses logic and proofs. It provides examples of propositions and their truth values. It defines logical connectives like conjunction, disjunction, implication, biconditional, and their truth tables. Examples are given of determining the truth value of compound propositions using truth tables. The concepts of negation, converse, contrapositive, and inverse of conditional statements are explained. Truth tables are constructed for various compound propositions.

Uploaded by

Mizoo Mahmoud
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
170 views

Discrete Math Lab 1 With Answer

This document discusses logic and proofs. It provides examples of propositions and their truth values. It defines logical connectives like conjunction, disjunction, implication, biconditional, and their truth tables. Examples are given of determining the truth value of compound propositions using truth tables. The concepts of negation, converse, contrapositive, and inverse of conditional statements are explained. Truth tables are constructed for various compound propositions.

Uploaded by

Mizoo Mahmoud
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Discrete Math

Ch1: Logic and Proofs


Lab 1

Eng. Fatma Hossam


1) Which of these sentences are propositions?
What are the truth values of those that are
propositions?

a) Cairo is the capital of Egypt. “True”


b) 2 + 3 = 5. “True”
c) 5 + 7 = 10. “False”
d) x + 2 = 11. “Not proposition”
e) Answer this question. “Not proposition”

2
Compound Propositions, constructed from logical connectives and other propositions

Conjunction (AND) (∧) Disjunction (Inclusive or) (∨)


p q p∧q p q p∨q
T T T T T T
T F F T F T
F T F F T T
F F F F F F

Exclusive or(XOR) (⊕) Implication (if, then ) (→)


p q p→q
p q p⊕q
T T T
T T F
T F F
T F T
F T T
F T T
F F T
F F F
p q p↔q
T T T
Biconditional (if and only if) (↔) T F F
F T F
3
F F T
4
Truth table for Truth table for Truth table for
1 proposition 2 propositions 3 propositions
(2^1=2 rows) (2^2=4 rows) (2^3=8 rows)
P P Q P Q R
T T T T T T
F T F T T F
F T T F T
F F T F F
F T T
F T F
F F T
F F F
P Q R S
T T T T
T T T F
T T F T
T T F F
T F T T
Truth table for T F T F
4 propositions
T F F T
(2^4=16 rows)
T F F F
F T T T
F T T F
F T F T
F T F F
F F T T
F F T F
F F F T
F F F F
5) What is the negation(¬) of each of these
propositions? P ¬P

T F

F T
a) Mai has an MP3 player.
“Mai does not have an MP3 player”
b) There is no pollution in New Jersey.
“There is pollution in New Jersey”
c) 2 + 1 = 3. “2 + 1 not equal 3”
d) The summer in Italy is hot and sunny.
“The summer in Italy is not hot and sunny”

7
8) Suppose that
Smartphone A has 256 MB RAM and 32 GB ROM, and the resolution of its
camera is 8 MP;
Smartphone B has 288 MB RAM and 64 GB ROM, and the resolution of its
camera is 4 MP;
Smartphone C has 128 MB RAM and 32 GB ROM, and the resolution
of its camera is 5 MP.
Determine the truth value(T/F) of each of these propositions.

a) Smartphone B has the most RAM of these three smartphones.


b) Smartphone C has more ROM or a higher resolution camera than
Smartphone B.
c) Smartphone B has more RAM, more ROM, and a higher resolution
camera than Smartphone A.
d) If Smartphone B has more RAM and more ROM than Smartphone C,
then it also has a higher resolution camera.
e) Smartphone A has more RAM than Smartphone B if and only if
Smartphone B has more RAM than Smartphone A.
Assignment 8
13) Let p and q be the propositions
p: It is below freezing.
q: It is snowing.
Write these propositions using p and q and logical connectives
(including negations).

a) It is below freezing and snowing. “p ∧ q”


b) It is below freezing but not snowing. “p ∧ ¬q”
c) It is not below freezing and it is not snowing. “¬p ∧ ¬q”
d) It is either snowing or below freezing. “p ∨ q”
e) If it is below freezing, it is also snowing. “p → q”
f ) Either it is below freezing or it is snowing, but it is not
snowing if it is below freezing. “(p ∨ q)∧ (p → ¬q)”
g) That it is below freezing is necessary and sufficient for it
to be snowing. “p ↔ q”
9
10) Let p and q be the propositions
p: I bought a lottery ticket this week.
Assignment
q: I won the million dollar jackpot.
Express each of these propositions as an English sentence.

a) ¬p “I didn’t buy a lottery ticket this week.”

b) p ∨ q “I bought a lottery ticket this week OR I won the million dollar jackpot.”

c) p → q “if I bought a lottery ticket this week, then I won the million dollar jackpot. ”
d) p ∧ q
e) p ↔ q “I bought a lottery ticket this week if and only if I won the million dollar jackpot”
f ) ¬p → ¬q “if I didn’t buy a lottery ticket this week, then I didn’t win the million dollar jackpot”
g) ¬p ∧ ¬q
h) ¬p ∨ (p ∧ q)
“I didn’t buy a lottery ticket this week OR I bought a lottery ticket this week AND I won the
million dollar jackpot “ 10
18) Determine whether these bi-conditionals are
true or false.

a) 2 + 2 = 4 if and only if 1 + 1 = 2. “T ↔T = T”
b) 1 + 1 = 2 if and only if 2 + 3 = 4. “T ↔F = F”
c) 1 + 1 = 3 if and only if monkeys can fly. “F ↔ F= T”
d) 0 > 1 if and only if 2 > 1. “F ↔ T = F”

p q p↔q
T T T
T F F
F T F
F F T
11
21) For each of these sentences, determine whether
an inclusive or, or an exclusive.

a) Coffee or tea comes with dinner. “Exclusive or”


b) A password must have at least three digits or be at least eight
characters long. “Inclusive or”
c) The prerequisite for the course is a course in number theory or
a course in cryptography.
d) You can pay using U.S. dollars or euros.

Inclusive OR Exclusive OR
p q p∨q p q p⊕q
T T T T T F c and d, Assignment
T F T T F T
F T T F T T
F F F F F F 12
29) State the converse, contrapositive, and inverse of
each of these conditional statements.
q →p ,is the converse of p →q
¬q → ¬p ,is the contrapositive of p →q
¬p → ¬q ,is the inverse of p →q

a) If it snows today, I will ski tomorrow.


“converse: if I will ski tomorrow, it snows today “
“contra-positive: if I won’t ski tomorrow, then it doesn’t snow today “
“inverse: If it doesn’t snow today, then I will not ski tomorrow ”

b) I come to class whenever there is going to be a


quiz.

B, Assignment
13
14
33) Construct a truth table for each of these
compound propositions.

a) p ∧ ¬p
b) p ∨ ¬p
c) (p ∨ ¬q) → q
d) (p ∨ q) → (p ∧ q)
e) (p → q) ↔ (¬q → ¬p)
f ) (p → q) → (q → p)

E and F
Assignment
15
a) p ∧ ¬p b) p ∨ ¬p
p ¬p p ∧ ¬p P ¬p p ∨ ¬p
T F F T F T
F T F F T T

c) (p ∨ ¬q) → q
p q ¬q p ∨ ¬q (p ∨ ¬q) → q
T T F T T
T F T T F
F T F F T
F F T T F

d) (p ∨ q) → (p ∧ q)
p q p∨q p∧q (p ∨ q) → (p ∧ q)
T T T T T
T F T F F
F T T F F
F F F F T 16

You might also like