Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

CS-210 Homework 1

Taha Amir Student ID: 21100332


September 15, 2018

1 Problem 1
Collaborated with 21100173 Waleed Imran Hashmi

(a) ∃ [p(x)]
(b) ∃ [s(x) ∧ p(x)]

(c) ∀ [p(x) → ¬ r(x)]


(d) ∀ [p(x) ∧ ¬ r(x)]

2 Problem 2
Collaborated with 21100173 Waleed Imran Hashmi
(a) For all 3 and 4 sided polygons, a polygon is either a quadrilateral or a triangle but never both. True
(b) For all p3 and 4 sided polygons, if a polygon is an isosceles triangle, then it is an equilateral triangle.
False

(c) For some 3 and 4 sided polygons,a polygon is a triangle and has an interior angle that exceeds 180
degree. False
(d) For all 3 and 4 sided polygons, a polygon is a triangle and all interior angles are equal only if the
polygon is an equilateral triangle. False.

(e) For some 3 and 4 sided polygons, a polygon is a quadrilateral and not a rectangle. True
(f) For some 3 and 4 sided polygons, a polygon is a rectangle and is not a square. True
(g) For all 3 and 4 sided polygons,if all sides are equal, then the polygon is an equilateral triangle. False

(h) For all 3 and 4 sided polygons,if polygon is a triangle then the interior angles does not exceed 180.
True
(i) For all 3 and 4 sided polygons, only if the polygon is a square then all interior angles are equal and all
sides are equal. False
(j) For all 3 and 4 sided polygons, if the polygon is a triangle then all interior angles are equal only if all
sides are equal. True

1
3 Problem 3
Collaborated with 21100173 Waleed Imran Hashmi
(a) False
(b) True
(c) True
(d) False

4 Problem 4
Collaborated with 21100173 Waleed Imran Hashmi
(a) If P is a rectangle, then P is a square(converse,False)
(b) If P is not a rectangle, then P is not a square(contrapositive,True)
(c) If P is not a square, then P is not a rectangle(inverse,True)

5 Problem 7
Collaborated with 21100173 Waleed Imran Hashmi

Table 1: [P→(Q∨R)] ≡ [¬R → (P→Q)]


Case Shortfall(kW) Solar cells required
P Q R Q∨R P→(Q∨R) ¬R P→Q ¬R→(P→Q)
0 0 0 0 1 1 1 1
0 0 1 1 1 0 0 1
0 1 0 1 1 1 1 1
0 1 1 1 1 0 1 1
1 0 0 0 0 1 0 0
1 0 1 1 1 0 0 1
1 1 0 1 1 1 1 1
1 1 1 1 1 0 1 1

6 Problem 8
Collaborated with 21100173 Waleed Imran Hashmi
(a) Left side
(¬P∨R) ∨ (¬Q∨R)
R ∨ (¬P∨¬Q)
R ∨ ¬(P∧Q)
¬(P∧Q) ∨ R
(P∧Q) → R

(b) Left side


(P∧Q) ∨ (P∧R)

(c) left side

2
7 Problem 12
Collaborated with 21100173 Waleed Imran Hashmi

(a) False, 1,-1

(b) False x=3


(c) True
(d) False x=1

(e) False x=1

8 Problem 13
Collaborated with 21100173 Waleed Imran Hashmi

(a) ∃x → ∀y P(x,y)
∃x ∃y → P(x,y)

(b) ∃x → ∃y (P(x,y) ∨ Q(x,y))


∃x ∀y →((P(x,y) ∨ Q(x,y))
∃x ∀y (¬P(x,y) ∧ ¬ Q(x,y))

(c) ∃x(¬∀y P(x,y) ∧ ¬ ∃y Q(x,y))


∃x (∃y ¬ P(x,y) ∨ ∀y Q(x,y))//
(d) ¬ ∃x ∃ y ¬ P(x,y) ∧ ¬ ∀x∀y Q(x,y))
∀x∀y P(x,y) ∨ ∃x∃y ¬ Q(x,y)//

You might also like