In: Computer Science
Q1.Which of the following are propositions?
(a) The Apple Macintosh is a 256-bit computer.
(b) Why are you here?
(c) 8 + 10 = 12
Q2.Construct truth tables for each of the following compound propositions. What do you notice about the results?
(a) p∨(¬p⋏q)
(b) p∨q
Q3.For the following multiple choice question, pick one choice (1. A tautology; 2. A contradiction; 3. Neither) for each compound proposition.
For the following multiple choice question, pick one choice by circling it (you may have to give some explanations.)
Q4. Match the term on the left to the number of the matching expression on the right.
(a) converse of Q ଠS
(b) a tautology
(c) a contradiction 1. ¬Q àS
(d) equivalent to Q àS 2. ¬S v S ^ S
(e) inverse of Q à¬S
(f) contrapositive of QàS
Q5.Is this a valid argument?
Q6. For each of the premise-conclusion pairs below, give a valid step-by-step argument (proof) along with the name of the inference rule used in each step.
Premise: {p v q, q àr, p ^ s àt, ¬r,¬q àu ^ s}, conclusion:t.
Q7.Use the truth table to verify the following statement:
¬ (p ∨¬q) ∨(¬p ∧¬q) ≡ p
Q8.Let Q(n) be the predicate “n2≤ 49.”
Write Q(3), Q(−3), Q(5), Q(−5), Q(8), and Q(−8) and indicate which of these statements are true and which are false.
Q9.In 1–2, write a negation (¬) for each statement.
1.∃x ∈R, if x2≥ 1 then x ≤ 0.
PS: A composite number is a positive integer which is not prime (i.e., which has factors other than 1 and itself).
Q1)Answer: (a) Apple Macintosh is a 256-bit computer.
(c) 8+10=12
Q2) Truth table for (a) p∨(¬p⋏q)
p | q | ¬p | ¬p⋏q | p∨(¬p⋏q) |
0 | 0 | 1 | 0 | 0 |
0 | 1 | 1 | 1 | 1 |
1 | 0 | 0 | 0 | 1 |
1 | 1 | 0 | 0 | 1 |
Truth table for (b) p∨q
p | q | p∨q |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
0 | 1 | 1 |
comparing the above two truth-table we found out that results of p∨q & p∨(¬p⋏q) are equal
i.e p∨q = p∨(¬p⋏q)
Q3) p ⋏(¬p) truth table
p | ¬p | p ⋏(¬p) |
0 | 1 | 0 |
1 | 0 | 0 |
Hence, p ⋏(¬p) is contratiction as all the output is 0's or False
---p ⋏(¬q) truth table
p | q | p ⋏(¬q) |
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 1 |
1 | 1 | 0 |
Hence,p ⋏(¬q) is contigency as some are False and one is True
Q4) b <---------- 2
f <------------- 1
Q5) Yes it is!
Q7)¬ (p ∨¬q) ∨(¬p ∧¬q) ≡ p
p | q | ¬ (p ∨¬q) | (¬p ∧¬q) | ¬ (p ∨¬q) ∨(¬p ∧¬q) |
T | T | F | F | F |
T | F | F | F | F |
F | T | T | F | T |
F | F | F | T | T |
¬ (p ∨¬q) ∨(¬p ∧¬q) ≡ p which is not true actually it is inverse of p or ¬p
Q8) Q(3),Q(-3),Q(5),Q(-5) are True
and Q(8),Q(-8) are False
Q9)n=0