Mid Term Test of Discrete Structure in Computer Science without Answer Key
Mid Term Test of Discrete Structure in Computer Science without Answer Key
Hafizabad
Answer: a) p ∨ ¬p
Which of the following is a tautology?
(De Morgan's laws state: ¬(p ∨ q) = (¬p ∧ ¬q) and ¬(p ∧ q) = (¬p ∨ ¬q).)
Answer: c) Both a and b
Which logical connective is true only when both inputs are true?
Answer: a) Conjunction
(Conjunction (AND) is true only when both inputs are true.)
Answer: a) ¬, ∧, ∨, →
The priority of logical connectives is evaluated in the order:
(Negation (¬) has the highest priority, followed by conjunction (∧), disjunction (∨), and
implication (→).)
Answer: a) ∀x(P(x))
Which of the following is an example of a universal quantifier?
Answer: a) ¬p ∨ q
The implication p → q is logically equivalent to:
4. Which logical connective is true only when both inputs are true?
a) Conjunction
b) Disjunction
c) Implication
d) Biconditional
b) ∨,∧,¬,→
a) ¬,∧,∨,→
c) ∧,∨,→,¬
d) →,∨,∧,¬
10. What is the truth value of ∃ x (P(x)) if P(x) is false for all x?
a) True
b) False
c) Undefined
d) None of the above
3. Discuss in detail: Valid and invalid arguments. Provide examples for both.
4. Explain and illustrate: How to prove and disprove universal and existential
statements using examples.
5. Number Theory Application: Demonstrate how propositional logic is used to solve
a number theory problem, such as proving divisibility.