DS practise questions, Exercises of Discrete Mathematics

It has numerous questions related to basics of discrete mathematics whi

Typology: Exercises

2020/2021

Uploaded on 06/14/2023

sameed-ansar
sameed-ansar 🇵🇰

1 document

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Math 55: Discrete Mathematics
UC Berkeley, Fall 2011
Homework # 1, due Wedneday, January 25
1.1.10 Let pand qbe the propositions “The election is decided” and “The
votes have been counted,” respectively. Express each of these compound
propositions as English sentences.
a) ¬p: The election is not (yet) decided.
b) pq: The election is decided or the votes have been counted.
c) ¬pq: The votes have been counted but the election is not (yet)
decided.
d) qp: If the votes are counted then the election is decided.
e) ¬q ¬ p: The election is not decided unless the votes have
been counted.
f) ¬p ¬ q: The votes have not been counted unless the election
has been decided. This is equivalent to proposition d).
g) pq: The election is decided if and only if the votes have been
counted.
h) ¬q(¬pq) : The votes have not been counted, or they have
been counted but the election is not (yet) decided.
1.1.18 Determine whether each of these conditional statements is true or
false.
a) If 1 + 1 = 3, then unicorns exist.
This statement is true because FFhas the truth value T.
b) If 1 + 1 = 3, then dogs can fly.
This statement is true because FFhas the truth value T.
c) If 1+1+2, then dogs can fly.
This statement is false because TFhas the truth value F.
d) If 2+2+4, then 1 + 2 = 3.
This statement is true because TThas the truth value T.
1
pf3
pf4
pf5
pf8

Partial preview of the text

Download DS practise questions and more Exercises Discrete Mathematics in PDF only on Docsity!

Math 55: Discrete Mathematics

UC Berkeley, Fall 2011

Homework # 1, due Wedneday, January 25

1.1. 10 Let p and q be the propositions “The election is decided” and “The votes have been counted,” respectively. Express each of these compound propositions as English sentences.

a) ¬ p : The election is not (yet) decided. b) p ∨ q : The election is decided or the votes have been counted. c) ¬ p ∧ q : The votes have been counted but the election is not (yet) decided. d) q → p : If the votes are counted then the election is decided. e) ¬ q → ¬ p : The election is not decided unless the votes have been counted. f) ¬ p → ¬ q : The votes have not been counted unless the election has been decided. This is equivalent to proposition d). g) p ↔ q : The election is decided if and only if the votes have been counted. h) ¬ q ∨ (¬ p ∧ q) : The votes have not been counted, or they have been counted but the election is not (yet) decided.

1.1. 18 Determine whether each of these conditional statements is true or false.

a) If 1 + 1 = 3, then unicorns exist. This statement is true because F → F has the truth value T. b) If 1 + 1 = 3, then dogs can fly. This statement is true because F → F has the truth value T. c) If 1 + 1 + 2, then dogs can fly. This statement is false because T → F has the truth value F. d) If 2 + 2 + 4, then 1 + 2 = 3. This statement is true because T → T has the truth value T.

1.1. 26 Write each of these propositions in the form “p if and only if q” in English.

a) For you to get an A in this course, it is necessary and sufficient that you learn how to solve discrete mathematics problems. You get an A in this course if and only if you learn how to solve discrete mathematics problems. b) If you read the newspaper every day, you will be informed, and conversely. You will be informed if and only if you read the newspaper every day. c) It rains if it is a weekend day, and it is a weekend day if it rains. It rains if and only it is a weekend day (that’s unfortunate indeed). d) You can see the wizard only if the wizard is not in, and the wizard is not in only if you can see him. You can see the wizard if and only if he is not in.

1.1. 38 Construct a truth table for ((p → q) → r) → s.

p q p → q r (p → q) → r s ((p → q) → r) → s T T T T T T T T T T T T F F T T T F F T T T T T F F F T T F F T T T T T F F T T F F T F F F T T T T F F F T F F F T T T T T T F T T T T F F F T T F F T T F T T F F F T F F T T T T T F F T T T F F F F T F F T T F F T F F F T

1.2. 34 Five friends have access to a chat room. Is it possible to determine who is chatting if the following information is known? Either Kevin or Heather, or both, are chatting. Either Randy or Vijay, but not both, are chatting. If Abby is chatting, so is Randy. Vijay and Kevin are

1.3. 40 Find a compound proposition involving the propositional variables p, q and r that is true when p and q are true and r is false but false otherwise. The compound proposition (p ∧ q) ∧ ¬ r has the desired property, since a conjunction is true if and only if its two constituents are true.

1.3. 63 Show how the solution of a given 4 × 4 Sudoku puzzle can be found by solving a satisfiability problem. Let p(i, j, n) denote the proposition asserting that the cell in row i and column j has the value n. In analogy to the formulas derived on page 33, we assert that every row contains all four numbers 1, 2 , 3 and 4,

∧^4

i=

∧^4

n=

∨^4

j=

p(i, j, n),

every column contains all four numbers 1, 2 , 3 and 4,

∧^4

j=

∧^4

n=

∨^4

i=

p(i, j, n),

and each of the four 2×2-blocks contains all four numbers 1, 2 , 3 and 4,

∧^1

r=

∧^1

s=

∧^4

n=

∨^2

i=

∨^2

j=

p(2r + i, 2 s + j, n).

Finally, we need to assert that no cell contains more than one number, and this is done just like in the last bullet on page 33.

1.4. 14 Determine the truth value of each of these statements if the domain consists of all real numbers.

a) ∃ x (x^3 = −1) : This statement is true because x = −1 satisfies x^3 = −1. b) ∃ x (x^4 < x^2 ) : This statement is true because x = 1/2 satisfies x^4 < x^2. c) ∀ x ((−x)^2 = x^2 : This statement is true because the square of a real number is equal to the square of its negative. d) ∀ x ((2x > x) : This statement is false because x = −1 does not satistfy 2x > x.

1.4. 28 Translate each of these statements into logical expressions using pred- icates, quantifiers and logical connectives. Let C(x) denote the predi- cate “x is in the correct place”, let E(x) denote the predicate “x is in excellent condition”, and let T (x) denote the predicate “x is a tool”. and suppose that the domain consists of all tools.

a) Something is not in the correct place. ∃ x ¬ C(x). b) All tools are in the correct place and are in excellent condition. ∀ x ( T (x) → (C(x) ∧ E(x)). c) Everything is in the correct place and is in excellent condition. ∀ x (C(x) ∧ E(x). d) Nothing is in the correct place and is in excellent condition. ∀ x ¬(C(x) ∧ E(x)). e) One of your tools is not in the correct place, but is in excellent condition. ( ∃ x (¬ C(x) ∧ E(x)) ) ∧ ∀ y ((¬ C(y) ∧ E(y)) → (x = y)).

1.4. 32 Express each of these statements using quantifiers. Then form the negation of the statement so that no negation is to the left of a quan- tifier. Next, express the negation in simple English.

a) All dogs have fleas. We write this statement as ∀ x (D(x) → F (x)) or ∀ x (¬ D(x) ∧ F (x)). Its negation is ∃ x (D(x) ∨ ¬ F (x)), and in English it translates into “There is a dog that does not have fleas”. b) There is a horse that can add. We write this statement as ∃ x (H(x) ∧ A(x)). Its negation is ∀ x (¬H(x) ∨ ¬A(x)) or, equivalently, ∀ x (H(x) → ¬A(x)). In English: “no horse can add”. c) Every koala can climb. We write this statement as ∀ x (K(x) → C(x)). Similar to a), its negation is ∃ x (K(x) ∨ ¬ C(x)). In English: “there is a koala that cannot climb”. d) No monkey can speak French. We write this statement as ∀ x (M (x) → ¬F (x)) or ∀ x (¬M (x)∨ ¬F (x)). Its negation is ∃ x (M (x) ∧ F (x)). In English: There is a monkey who can speak French. e) There exists a pig that can swim and catch fish. We write this statement as ∃ x (P (x)∧S(x)∧F (x))). Its negation

i) No one can fool himself or herself. ¬ ∃ x F (x, x) j) There is someone who can fool exactly one person besides himself or herself. ∃x ∃y

F (x, y) ∧ (∀z (F (x, z) → y = z))

1.5. 20 Express each of these mathematical statements using predicates, quan- tifiers, logical connectives, and mathematical operators, where the do- main consists of all integers.

a) The product of two negative integers is positive. ∀ m ∀ n (((m < 0) ∧ (n < 0)) → (mn > 0)) b) The average of two positive integers is positive. ∀ m ∀ n (((m > 0) ∧ (n > 0)) → ( m+ 2 n> 0)) c) The difference of two negative integers is not necessarily negative. ∃ m ∃ n ((m < 0) ∧ (n < 0) ∧ ¬ (m − n < 0)) d) The absolute value of the sum of two integers does not exceed the sum of the absolute values of the integers. ∀ m ∀n ( |m + n| ≤ |m| + |n| )

1.6. 5 Use rules of inference to show that the hypotheses “Randy works hard”, “If Randy works hard, then he is a dull boy” and “If Randy is a dull boy, then he will not get the job” imply the conclusion “Randy will not get the job”. By applying Modus Ponens to the first two hypotheses, we infer “Randy is a dull boy”. We then apply Modus Ponens that that statement and to the third hypothesis to conclude that “Randy will not get the job”.

1.6. 16 For each of these arguments determine whether the argument is correct or incorrect and explain why.

a) Everyone enrolled in the university has lived in a dormitory. Mia has never lived in a dormitory. Therefore, Mia is not enrolled in the university. The argument is correct. It is an application of universal modus tollens. b) A convertible car is fun to drive. Isaac’s car is not a convertible. Therefore, Isaac’s car is not fun to drive. The argument is not correct. It is an instance of the fallacy of denying the hypothesis. c) Quincy likes all action movies. Quincy likes the movie Eight Men Out. Therefore, Eight Men Out is an action movie.

This argument is not correct. It’s a variant of the fallacy of affirming the conclusion. Indeed, it is quite possible that Quincy likes also some movies that are not action movies. d) All lobstermen set a least a dozen traps. Hamilton is a lobster- man. Therefore, Hamilton sets at least a dozen traps. This argu- ment is correct. It is an application of universal instantiation.

1.6. 20 Determine whether these are valid arguments.

a) If x is a positive real number then x^2 is a positive real number. Therefore, if a^2 is positive, where a is a real number, then a is a positive real number. This argument is not valid. Take a = −1 for a counterexample. b) If x^2 6 = 0, where x is a real number, then x 6 = 0. Let a be a real number with a^2 6 = 0, then a 6 = 0. This argument is valid. It is an application of universal instanti- ation.