Docsity

predicates in logics, Assignments of Mathematics

Toggle sidebar
bg1
CS-210 Discrete Mathematics
Problem Set Logic And Predicates
1. For the universe of all integers, let p(x), q(x), r(x), s(x) and t(x) be the following statements:
p(x) : xis even
q(x) : xis (exactly) divisible by 4
r(x) : xis (exactly) divisible by 5
s(x) : x > 0
t(x) : xis a perfect square
Write the following statements in symbolic form:
(a) At lease one integer is even.
(b) There exists a positive integer that is even.
(c) If x is even, then x is not divisible by 5.
(d) No even integer is divisible by 5.
(e) There exists an even integer divisible by 5.
(f) if xis even and xis a perfect square, then xis divisible by 4.
2. Consider the universe of all polygons with three or four sides, and define the following open state-
ments for this universe.
a(x) : all interior angles of xare equal
e(x) : xis an equilateral triangle
h(x) : all sides of xare equal
i(x) : xis an isosceles triangle
p(x) : xhas an interior angle that exceeds 180
q(x) : xis a quadrilateral
r(x) : xis a rectangle
s(x) : xis a square
t(x) : xis a triangle
Translate each of the following statements into an English sentence, and determine whether the
statement is true or false.
a) ∀x[q(x)⊕t(x)] b) ∀x[i(x)→e(x)]
c) ∃x[t(x)∧p(x)] d) ∀x[(a(x)∧t(x)) ↔e(x)]
e) ∃x[q(x)∧ ¬r(x)] f) ∃x[r(x)∧ ¬s(x)]
g) ∀x[h(x)→e(x)] h) ∀x[t(x)→ ¬p(x)]
i)∀x[s(x)↔(a(x)∧h(x))] j) ∀x[t(x)→(a(x)↔h(x))]
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download predicates in logics and more Assignments Mathematics in PDF only on Docsity!

CS-210 Discrete Mathematics

Problem Set Logic And Predicates

  1. For the universe of all integers, let p(x), q(x), r(x), s(x) and t(x) be the following statements:

p(x) : x is even q(x) : x is (exactly) divisible by 4 r(x) : x is (exactly) divisible by 5 s(x) : x > 0 t(x) : x is a perfect square

Write the following statements in symbolic form:

(a) At lease one integer is even.

(b) There exists a positive integer that is even.

(c) If x is even, then x is not divisible by 5.

(d) No even integer is divisible by 5.

(e) There exists an even integer divisible by 5.

(f) if x is even and x is a perfect square, then x is divisible by 4.

  1. Consider the universe of all polygons with three or four sides, and define the following open state- ments for this universe.

a(x) : all interior angles of x are equal e(x) : x is an equilateral triangle h(x) : all sides of x are equal i(x) : x is an isosceles triangle p(x) : x has an interior angle that exceeds 180 q(x) : x is a quadrilateral r(x) : x is a rectangle s(x) : x is a square t(x) : x is a triangle

Translate each of the following statements into an English sentence, and determine whether the statement is true or false.

a) ∀x [q(x) ⊕ t(x)] b) ∀x [i(x) → e(x)] c) ∃x [t(x) ∧ p(x)] d) ∀x [(a(x) ∧ t(x)) ↔ e(x)] e) ∃x [q(x) ∧ ¬r(x)] f ) ∃x [r(x) ∧ ¬s(x)] g) ∀x [h(x) → e(x)] h) ∀x [t(x) → ¬p(x)] i)∀x [s(x) ↔ (a(x) ∧ h(x))] j) ∀x [t(x) → (a(x) ↔ h(x))]

  1. Determine whether each of the following conditional statements is true or false:

(a) if 1 + 1 = 2 then 2 + 2 = 5

(b) if 1 + 1 = 3 then 2 + 2 = 4

(c) if monkeys can fly then 1 + 1 = 3

(d) if 1 + 1 = 2 then dogs can fly

  1. Write the contrapositive, converse and inverse of the statement “If P is a square, then P is a rectan- gle.” Are all the statements true?
  2. Show that [(P ∨ Q) ∧ (¬P ∨ R)](Q ∨ R) is a tautology using equivalence laws.
  3. Use truth table to establish whether the following statement forms a tautology or a contradiction or neither: ((Q ∧ R) ∧ (¬P ∧ Q)) ∧ ¬Q
  4. Use a Truth table to determine if the statements [P → (Q ∨ R)] ≡ [¬R → (P → Q)] is true.
  5. Show the following equivalences using using logical equivalence laws.

(a) Show that (P → R) ∨ (Q → R) ≡ (P ∧ Q) → R (b) Show that P ∧ (Q ∨ R) ≡ (P ∧ Q) ∨ (P ∧ R). (c) Show that ¬[¬[(P ∨ Q) ∧ R] ∨ ¬Q] ≡ Q ∧ R (d) Show that (P ∨ Q ∨ R) ∧ (P ∨ T ∨ ¬Q) ∧ (P ∨ ¬T ∨ R) ≡ P ∨ [R ∧ (T ∨ ¬Q)]

  1. Consider the propositional function M (x, y) =”x has sent an email to y”, and T (x, y) =”x has called y”.The predicate variables x, y take values in the UoD D={students in class }. Express the following statements using symbolic logic:

(a) There are atleast two students in class such that one student has sent other an email and the second student has called the first student.

(b) There are some students in class who have emailed everyone.

  1. Determine the truth value of each of these statements if the UoD for each variable consists of all real numbers.

(a) ∃x∀y(y 6 = 0xy = 1)

  1. Suppose a software system has 9 components {A, B, C, D, E, F, G, H, I}. Each component has either exactly one of the two types of bugs (Bug 1 and Bug 2) or has no bug (is clean). We want to identify which components have Bug 1 or Bug 2 or is clean. Findings are summarized as follows.

(a) Let P (x) be the predicate that component x has Bug 1, let Q(x) be the predicate that component x has Bug 2 and let R(x) be the predicate that component x is clean. Translate each of the below findings in terms of the predicates P (x), Q(x) and R(x). i. E and H do not have the same bug.

ii. If G has Bug 1 then all components have Bug 1.

iii. If E has Bug 1 then H has Bug 1 too.

iv. if C has Bug 1 then D and F do not have Bug 1.

v. if either E or H has Bug 1 then I does not have Bug 2.

vi. At least 4 components have Bug 1.

vii. If A has either bug then all components have Bug 2.

viii. A and F are not in the same category.

ix. B has Bug 2.

x. At least one of C and G have the same bug as B.

xi. Exactly 2 components have Bug 2.

xii. If I has bug 2 then at least one D, F and A have Bug 2 too.

xiii. If E or G have bug 2 then all components have either Bug 1 or Bug 2. (b) Determine, using the above findings, which components have Bug 1, which ones have Bug 2 and which are clean.

Hint: First determine which components have Bug 1 then determine which ones have Bug 2 and then list the clean ones.

  1. Express the following propositions into predicate logic. Make up predicates as you need. State what each predicate means. Also state the universe of discourse for that predicate.

(a) “Anyone who completes all homework assignments will pass this course.”

(b) “Not everyone likes to do the homework.”

(c) “There is one class that all of my friends have taken.”

(d) “No student failed Logic, but at least one student failed History.”

  1. Suppose the following two propositions are both False.
  • If the student has passed Calculus then he is registered for Discrete Math.
  • The student has not passed Programming.

Determine the truth values of the following propositions. Just list the truth values. black

(a) The student has passed Programming and he is registered for Discrete Math. (b) The student has passed Calculus and he has passed Programming.

(c) The student is not registered for Discrete Math or he has passed Programming. (d) If the student is not registered for Discrete Math then the student has not passed Calculus.

(e) If the student is registered for Discrete Math then he has passed Programming. (f) If the student has not passed Calculus the he is not registered for Discrete Math.

(g) If the student is registered for Discrete Math then he has passed Calculus. (h) The student has passed Programming if and only if he has passed Calculus.

(i) The student has passed Programming or he has passed Calculus but not both. (j) The student has passed Programming or he has passed Calculus or he is registered for Discrete Math.

  1. Let A, B and C be propositions. Using truth table show that the following is a logical equivalence.

(¬A ∨ B) ∧ (¬B ∨ C) ∧ (¬C ∨ A) ∧ (¬A ∨ ¬B ∨ ¬C) ≡ (¬A ∧ ¬B ∧ ¬C).

  1. Use Truth tables to see if the following statements are true :

(a) P → (Q ∧ R) ≡ (Q → P ) ∧ (P → R)

(b) (P ∨ Q) → R ≡ [(P → R) ∧ (Q → R)]

(c) [P → (Q ∨ R)] ≡ [¬R → (P → Q)]

  1. Complete the following truth table:

p q r ︷ ︸︸s ︷ p → (q → r)

︷ ︸︸^ t ︷ (p → q) → (p → r) s → t

  1. Let p(x, y), q(x, y) and r(x, y) represents three open statements, with the replacement for variables x, y chosen from some prescribed universe(s). What is the negation of the following statement?

∀x∃y [(p(x, y) ∧ q(x, y)) → r(x, y)] Show all the steps.

  1. Determine which of the following sentences are propositions and write the truth values of those that are.

(a) Sun rounds about the Earth.

(b) Does Sun round about Earth?

(c) 81 > 78

(d) 7 is less than − 11

(e) x < 17

(f) if z = 3 then z + 5 = 8

  1. Let P,Q and R be the following propositions:
    • P: You get sick.
    • Q: You miss the exam.
    • R: You pass the course.

Write the following compound propositions as English sentences.

(a) P Q

(b) R ⇐⇒ ¬Q

(c) Q¬R

(d) P ∨ Q ∨ R

(e) (P ¬R) ∨ (Q¬R)

(f) (P ∧ Q) ∨ (¬Q ∧ R)

  1. Propositions p,q,r and s are as follows: p: ”I shall finish my coursework assignment.” q: ”I shall work for forty hours this week.” r: ”I shall pass Discrete Maths.” s: ”I like Discrete Maths.”

Write each sentence in symbols:

(a) I shall not finish my coursework assignment

(b) I don’t like Discrete Maths but I shall finish my coursework assignment.

(c) If I finish my coursework assignment,I shall pass Discrete Maths.

(d) I shall pass maths only if i work for forty hours this week and finish my coursework assignment.

  1. Show the following equivalences using equivalence laws.

(a) (Q ∨ R)P ≡ (QP ) ∧ (RP )

(b) (P ∧ (¬(¬P ∨ Q))) ∨ (P ∧ Q) ≡ P

(c) (P ∨ Q ∨ R) ∧ (P ∨ T ∨ ¬Q) ∧ (P ∨ ¬T ∨ R) ≡ P ∨ [R ∧ (T ∨ ¬Q)] (P ∨ Q ∨ R) ∧ (P ∨ T ∨ ¬Q) ∧ (P ∨ ¬T ∨ R)

  1. Construct a truth table for (¬(¬P ∨ Q) ∧ R)(P ∨ S)
  2. Determine the truth value of the statement ∃x∀y(x ≤ y^2 ) if the UoD for the variables is:

(a) the positive real numbers

(b) the integers

(c) the nonzero real numbers

  1. Let p and q be the propositions.
    • p : “The election is decided”
    • q : “The votes have been counted.

Express each of these compound propositions as English sentences.

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

(b) Translate the statement ∀x∃y(x < y)

(c) Translate the statement ∀x∀y∃z(xy = z)

(d) Translate the statement

∀x∀y(((x ≥ 0) ∧ (y < 0)) → (x − y > 0))

  1. Translate the following quantifiers from English to Logical expressions

(a) “Something is not in the right place“

(b) “All tools are in the correct place and are in excellent condition“

(c) “Everything is in the correct place and in excellent condition“

(d) “Nothing is in the correct place and is in excellent condition.“

  1. Express each of these statements using predicates, quantifiers, logical connectives, and mathematical operators where the domain consists of all integers.

(a) The product of two negative integers is positive. (b) The average of two positive integers is positive. (c) The difference of two negative integers is not necessarily negative. (d) The absolute value of the sum of two integers does not exceed the sum of the absolute values of these integers.

  1. Translate each of these nested quantifications into an English statement that expresses a mathemat- ical fact. The domain in each case consists of all real numbers.

(a) ∃x∀y(xy = y) (b) ∀x∀y((x < 0) ∧ (y < 0)) → (xy > 0) (c) ∃x∃y((x^2 > y) ∧ (x < y))

  1. Suppose there’s a class consisting of few students and consider the following open statements c(x): Student x is in class. j(x): Student x is a junior. s(x): Student x is a senior. g(x): Student x is a graduate student. p(x): Student x is a physics major. e(x): Student x is an electrical engineering major. m(x): Student x is a mathematics major. Write each of the following statements in terms of quantifiers and open statements c(x), j(x), s(x), g(x 0 , p m(x), a) There is a mathematics major in class who is a junior. b) There is a senior in the class who is not a mathematics major. c) Every student isn the class is majoring in mathematics or physics. d) No graduate student in the class is a physics major. e) Every senior is in class that is majoring in either physics or electrical engineering.
  2. Let p(n) , q(n) represent the open statements p(n): n is odd q(n): n^2 is odd for the universe of all the integers. Which of the following statements are logically equivalent to each other? a) If the square of an integer is odd, then the integer is odd. b) ∀n[p(n) is necessary for q(n)] c) The square of an odd integer is odd d)There are some integers whose squares are odd. e) Given an integer whose square is odd, that integer is likewise odd f) ∀n[¬p(x) → ¬q(n)] g) ∀n[p(n) is sufficient for q(n)]
  3. Let p(x) , qx), and r(x) denote the following open statements. p(x): x^2 − 8 x + 15 = 0 q(x): x is odd r(x): x > 0 For the universe of all the integers, determine the truth or falsity of each of the followings statements. If a statement is false, give a counter example. a) ∀x[p(x) → q(x)] b) ∀x[q(x) → p(x)] c) ∃x[p(x) → q(x)] d) ∃x[q(x) → p(x)] e) ∃x[r(x) → p(x)] f) ∀x[¬q(x) → ¬p(x)] g) ∃x[p(x) → (q(x) ∧ r(x))] h) ∀x[(p(x) ∨ q(x)) → r(x)]
  4. Write the negation of each of the following true statements. For parts (a) and (b) the universe consists of all the integers; for part (c) and (d) the universe comprises of all read numbers. a) for all integers n, if n is not (exactly) divisible by 2, then n is odd.

b) If k, m, n are integers where k-m and m-n are odd, then k-n is even. c) If x is real number where x^2 > 16, then x < −4 or x > 4. d) For all real numbers, if |x − 3 | < 7, then − 4 < x < 10.

SOLUTION

a) There exists an integer n such that n is not divisible by 2 but n is even(that is, not odd). b) There exist integers k, m, n such that k − m and m − n are odd, and k − n is odd. c) For some real number x, x^2 > 16 but − 4 ≤ x ≤ 4 (that is, − 4 ≤ x and x ≤ 4) d) There exists a real number x such that |x − 3 | < 7 and either x ≤ −4 or x ≥ 10.