COMSATS University, Islamabad
Islamabad Campus
Department of Computer Science
Practice Assignment 01: PROPOSITIONAL LOGIC
Objectives: The objective of this assignment is to:
1. Learn how to symbolize complex propositions
2. Learn the process of translating an English sentence(e.g. system specification) into a logical expression
3. Learn how to determine the truth-value of complex propositions
4. Learn how to simplifying Statement Forms using Laws of Logic
5. Learn how to prove or disprove logical equivalence of Statement Forms.
6. Create and interpret truth tables for both propositions.
7. Learn how to determine whether system specifications are consistent or not
FALL 2025 Page 1
Question # 1
Determine whether each sentence is a proposition or not.
Sentence Proposition Reason
Yes No
2+5 = 19
Waiter, will you serve the nuts – I mean, would you serve the guest the
nuts?
For some positive integer n, 19340 = n*17
Audrey Meadows was the original “Alice” in “The Honeymooners”.
Peel me a grape.
The line “play it again, Sam” occurs in the movie “Casablanca.”
Every integer greater than 4 is the sum of two primes
The difference of two primes
Question # 2
Given that proposition p is false, proposition q is true, and proposition r is false, determine whether each
compound statement is true or false (Write T for true and F for False in the specified cell)
Proposition Truth Value
p∨q
~p ∨ ~q
~p ∨ q
~p ∨ ~(q ^ r)
~(p ∨ q) ^(~p ∨ r)
(p ∨ ~r) ^~((q ∨ r) ↔ ~(r ∨ p))
~p ∨ ~(q ^ r) →(~p ∨ q)
(q ∨ ~r) ⊕((p ^ r))
Question # 3
The following proposition uses the English connective “or”. Determine from the context whether “or” is intended
to be used in the inclusive or exclusive sense.
i. “Tonight, I will stay home or go out to a movie.”
ANSWER IN THIS BOX
ii. “If you fail to make a payment on time or fail to pay the amount due, you will incur a penalty.”
ANSWER IN THIS BOX
iii. “If I can’t schedule the airline flight or if I can’t get a hotel room, then I can’t go on the trip.”
ANSWER IN THIS BOX
iv. “Maryam has one or two brothers.”
FALL 2025 Page 2
ANSWER IN THIS BOX
v. “If you do not wear a shirt or do not wear shoes, then you will be denied service in the restaurant.”
ANSWER IN THIS BOX
Question # 4
Formulate the symbolic expression in words using
p: Today is Monday
q: It is raining
r : It is hot
Proposition In words
(Expression)
~p ^ (q v r)
~( p v q) ^r
(p ^ q) ^ ~(r v p)
( p ^ q) v~r
Question # 5
Let x,y, and z be any real numbers. Represent each sentence symbolically, where p: x < y , q: y < z, and r: x< z.
Proposition (Expression) In symbolic form
(x ≥ y) or (y < z)
( y≥ z ) or (x ≥ z)
(x ≥ y) and [(y < z) or (z >
x)]
(x< y) or [(y ≥ z) or (z > x)]
Question # 6
a) Restate each proposition in the form “if p then q”
FALL 2025 Page 3
1. Javed will pass the Discrete Structure exam if he studies hard. [q if p]
ANSWER IN THIS BOX
2. Ayesha may graduate if she passes 133 credit hours. [q if p]
ANSWER IN THIS BOX
3. A necessary condition for Farid to buy a computer is that he obtained $2000. [a necessary condition for p is q]
ANSWER IN THIS BOX
4. A sufficient condition for Kiran to take the algorithm course is that she pass discrete structure. [a sufficient
condition for q is p]
ANSWER IN THIS BOX
5. When better cars are built, Buick will build them. [q whenever p]
ANSWER IN THIS BOX
6. The audience will go to sleep if the chairperson gives the lecture. [q if p]
ANSWER IN THIS BOX
7. The program is readable only if it is well structured. [p only if q]
ANSWER IN THIS BOX
b) Write converse, inverse, and contrapositive of each proposition given in part (a)
ANSWER IN THIS BOX
1. If Javed studies hard, then he will pass the discrete mathematics exam
Converse
[ q → p]
Inverse
[~p → ~q]
Contrapositive [ ~q → ~p]
FALL 2025 Page 4
2. If Ayesha passes 133 credit hours, then she may graduate.
converse
inverse
contrapositive
3.
converse
inverse
contrapositive
4.
converse
inverse
contrapositive
5.
converse
inverse
contrapositive
6.
converse
inverse
contrapositive
Question # 7
Construct the truth table of each proposition
1. ~(p ^ q) v(~q v r)
p q r ~q (p ^ q) ~(p ^ q) (~q v ~(p ^ q) v(~q v r)
r)
F F F
F F T
F T F
F T T
T F F
T F T
T T F
T T T
2. (p^q) ^(~p v r)
p q r ~P (p ^ q) (~P v r) (p^q) ^(~p v r)
F F F
F F T
F T F
FALL 2025 Page 5
F T T
T F F
T F T
T T F
T T T
3. ~(p ^ q) v(r v ~p)
p q r ~P (p ^ q) ~(p ^ q) (r v ~p) ~(p ^ q) v(r v ~p)
F F F
F F T
F T F
F T T
T F F
T F T
T T F
T T T
Question # 8
Let
w: “You can use the wireless network in COMSATS University,”
d: “You pay the semester fee,”
s: “You are a subscriber to the service.”
a) Translate the following statement form into English
w ( d s)
ANSWER IN THIS BOX
b) Construct a “Truth Table” for the compound proposition given in part (a)
ANSWER IN THIS BOX
w d s (d s) w ( d s)
F F F
F F T
F T F
FALL 2025 Page 6
F T T
T F F
T F T
T T F
T T T
Question # 9
Let
p = “The message is scanned for viruses”
q = “The message was sent from an unknown system”
a) Express the following system specifications in propositional logic using the symbols ∼,∨, ∧, → , and
the propositions provided
i. “The message is scanned for viruses whenever the message was sent from an unknown system.”
ANSWER IN THIS BOX
ii. “The message was sent from an unknown system but it was not scanned for viruses.”
ANSWER IN THIS BOX
iii. “It is necessary to scan the message for viruses whenever it was sent from an unknown system.”
ANSWER IN THIS BOX
iv. “When a message is not sent from an unknown system it is not scanned for viruses.”
ANSWER IN THIS BOX
b) Construct a Truth Table for each of the above compound propositions (i.e. given in part a).
ANSWER IN THIS BOX
Question # 10
Let
s = "The router can send packets to the edge system";
a = "The router supports the new address space";
r = "The latest software release is installed."
Determine the “truth value” of above propositions so that the following system specifications must be
consistent(i.e., all given statements form must be true simultaneously).
.
“The router can send packets to the edge system only if it supports the new address space. For the router to
support the new address space it is necessary that the latest software release be installed. The router can send
FALL 2025 Page 7
packets to the edge system if the latest software release is installed, The router does not support the new address
space.”
ANSWER IN THIS BOX
Question # 11
Rehan and Ashraf are working as software engineer and System Analyst respectively in a software house. Both
are working on a same system software for which Rehan gather following system specifications. Ashraf analyze
these system specifications. After analyzing these specifications he said to Rehan: These system specifications
are not consistent. Prove or disprove Ashraf claim.
“The system is in multiuser state if and only if it is operating normally. If the system is operating normally,
the kernel is functioning. The kernel is not functioning or the system is in interrupt mode. If the system is not
in multiuser state, then it is in interrupt mode. The system is not in interrupt mode.”
ANSWER IN THIS BOX
FALL 2025 Page 8
Question # 12
i. Prove that ~[r ∨ (q ∧ (~r →~p))] ≡ ~r ∧ (p∨ ~q) by using a truth table.
ANSWER IN THIS BOX
ii. Prove that ~[r ∨ (q ∧ (~r →~p))] ≡ ~r ∧ (p∨ ~q) by using a series of logical equivalences.
ANSWER IN THIS BOX
Question # 13
a) Show that each of these conditional statements is a tautology by using truth tables.
a) (p ∧ q) → p
b) p → (p ∨ q)
c) ~p → (p → q)
d) (p ∧ q) → (p → q)
e) ~(p → q) → p
f ) ~(p → q)→~q
b) Show that each of above conditional statements is a tautology using Laws of Logic
FALL 2025 Page 9
A Word to the Student
Tell me and I will forget.
Show me and I will remember.
Involve me and I will understand
- Confucius
A few Suggestions for Learning Discrete Mathematics
• Read a few sections before each class (course outline is uploaded; you can see the section
that is to be taught in class). You might not fully understand the material, but you’ll follow
it far better when your instructor discusses it in class. In addition, you will be able to ask
more questions in class and answer more questions.
• Whenever you study the book, make sure you have a pencil and enough paper to write
down definitions, theorems, and proofs, and to do the exercises.
• Return to review the material taught in class later in the same day. Read actively; do not
just read as if it was a novel or a newspaper. Write down the definitions, theorems, and
properties in your own words, without looking in your notes or the book. Good note taking
and writing aid retention. Re-write the examples, proofs, and exercise done in class, all in
your own words. If you find them to challenging, study them again and try again; continue
until you succeed.
• Always study the relevant section in the text and do the examples there; then do the exercise
at the end of the section. Don’t skip steps or write over previous step; this way you will
progress logically, and you can locate and correct your errors. If you can’t solve a problem
because it involves a new term, formula, or some property, then re study the relevant
portion of the section and try again. Don’t assume that you will be able to do every problem
the first time you try it. Remember, practice is the only way to success.
A Final Word
Mathematics is no more difficult than any other subject. If you have the motivation ( for motivation
we will see how mathematics solves our daily life problems), and patience to learn and do the
work, then you will enjoy the beauty and power of discrete mathematics; you will see that discrete
mathematics is really fun.
Keep in mind that learning mathematics is a step-by-step process. Practice regularly and
systematically; review earlier chapter/topics every week, since things must be fresh in your mind
to apply and build on them. In this way, you will enjoy the subject, feel confident, and explore
more. The name of the game is practice, so practice, practice, practice.
FALL 2025 Page 10