0% found this document useful (0 votes)
54 views

Mid Term Test of Discrete Structure in Computer Science without Answer Key

Uploaded by

Assad Leo
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

Mid Term Test of Discrete Structure in Computer Science without Answer Key

Uploaded by

Assad Leo
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Mid Term Test for Discrete Structures in Computer Science RIPHAH College

Hafizabad

Answer: a) p ∨ ¬p
 Which of the following is a tautology?

(This is the law of excluded middle, which is always true.)

 What is the negation of ∀x(P(x))?


Answer: b) ∃x(¬P(x))
(The negation of "for all" (∀) is "there exists" (∃), and negating P(x) gives ¬P(x).)

 Which of the following represents De Morgan's law?

(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.)

 What is the truth value of p → q, when p is false and q is true?


Answer: a) True
(In an implication, if the antecedent (p) is false, the entire implication is true regardless of the
truth value of q.)

 A statement that is always false is called a:


Answer: b) Contradiction
(A contradiction is a statement that is always false, regardless of the truth values of its
components.)

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?

(∀x means "for all x", representing a universal quantifier.)

Answer: a) ¬p ∨ q
 The implication p → q is logically equivalent to:

(An implication p → q is logically equivalent to ¬p ∨ q, meaning "not p or q".)

 What is the truth value of ∃x(P(x)) if P(x) is false for all x?


Answer: b) False
(The existential quantifier (∃x) means "there exists some x for which P(x) is true". If P(x) is
false for all x, the statement is false.)
Multiple Choice Questions (MCQs)

1. Which of the following is a tautology?


a) p∨¬p
b) p∧¬p
c) p→¬p
d) ¬p∨¬p
2. What is the negation of ∀x(P(x))
a) ∀x(¬P(x))
b) ∃x(¬P(x))
c) ¬(∀xP(x))
d) P(x)∨¬P(x)P(x)

3. Which of the following represents De Morgan's law?


a) ¬(p∨q)=(¬p∧¬q)
b) ¬(p∧q)=(¬p∨¬q)
c) Both a and b
d) None of the above

4. Which logical connective is true only when both inputs are true?
a) Conjunction
b) Disjunction
c) Implication
d) Biconditional

5. What is the truth value of p → q, when p is false and q is true?


a) True
b) False
c) Undefined
d) None of the above

6. A statement that is always false is called a:


a) Tautology
b) Contradiction
c) Proposition
d) Logical equivalence

7. The priority of logical connectives is evaluated in the order:

b) ∨,∧,¬,→
a) ¬,∧,∨,→

c) ∧,∨,→,¬
d) →,∨,∧,¬

8. Which of the following is an example of a universal quantifier?


a) ∀x(P(x))
b) ∃x(P(x))
c) P(x)∧Q(x)P(x)
d) P(x)∨Q(x)P(x)

9. The implication p→q is logically equivalent to:


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

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

Short Answer Questions

1. Define a proposition with an example.


2. State and prove De Morgan's laws for two propositions.

4. Write the truth table for p ∨ q


3. Explain the difference between a tautology and a contradiction with examples.

5. What is the negation of ∃ x (P (x) ∧ Q (x))?


6. Explain the concept of logical equivalence with an example.
7. How do logical quantifiers differ from each other? Provide examples.
8. Define a predicate and give an example of a quantified statement.
9. What is the contrapositive of p → q ? Is it logically equivalent to the original
statement?
10. Explain the precedence of logical operators with an example.

Long Answer Questions


1. Prove or disprove: ∀ x (¬ P(x) is logically equivalent to ¬
2. Construct and explain: The truth table for (p ∧ q)→(¬p ∨ q)
(∃ x ( P (x))).

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.

You might also like