Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

G H Patel College of Engineering & Technology, V V Nagar A.Y.2021-22: EVEN SEMESTER 102040405: Discrete Mathematics Assignment 4: Logic

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

G H PATEL COLLEGE OF ENGINEERING & TECHNOLOGY, V V NAGAR

A.Y.2021-22: EVEN SEMESTER


102040405: DISCRETE MATHEMATICS
Assignment 4: Logic

1. Let 𝑝 and 𝑞 be the propositions


𝑝: You drive over 65 miles per hour.
𝑞: You get a speeding ticket.
Write these propositions using 𝑝 and 𝑞 and logical connectives.
( a ) You do not drive over 65 miles per hour.
( b ) You drive over 65 miles per hour, but you do not get a speeding ticket.
( c ) You will get a speeding ticket if you drive over 65 miles per hour.
( d ) If you do not drive over 65 miles per hour, then you will not get a speeding ticket.
( e ) Driving over 65 miles per hour is sufficient for getting a speeding ticket.
( f ) You get a speeding ticket, but you do not drive over 65 miles per hour.
( g ) Whenever you get a speeding ticket, you are driving over 65 miles per hour.

2. Let 𝑝, 𝑞 and 𝑟 be the propositions


𝑝: You get an 𝐴 on the final exam.
𝑞: You do every exercise in this book.
𝑟: You get an 𝐴 in this class.
Write these propositions using 𝑝, 𝑞 and 𝑟 and logical connectives.
( a ) You get an 𝐴 in this class, but you do not do every exercise in this book.
( b ) You get an 𝐴 on the final, you do every exercise in this book, and you get an 𝐴 in this
class.
( c ) To get an 𝐴 in this class, it is necessary for you to get an 𝐴 on the final.
( d ) You get an 𝐴 on the final, but you don’t do every exercise in this book; nevertheless
you get an 𝐴 in this class.
( e ) Getting an 𝐴 on the final and doing every exercise in this book is sufficient for getting
an 𝐴 in this class.
( f ) You will get an 𝐴 in this class if and only if you either do every exercise in this book
or you get an 𝐴 on the final.
3. Let Let 𝑝, 𝑞 and 𝑟 be the propositions
𝑝: You have the flu.
𝑞: You miss the final examination.
𝑟: You pass the course.
Express each of these propositions as an English sentence.
(𝑎) 𝑝 → 𝑞 (𝑏) ¬𝑞 → 𝑟 (𝑐) 𝑞 → ¬𝑟
(𝑑) 𝑝⋁𝑞⋁𝑟 (𝑒) (𝑝 → ¬𝑟)⋁(𝑞 → ¬𝑟) (𝑓) (𝑝⋀𝑞)⋁(¬𝑞⋀𝑟)

4. Determine whether the following statements are true or false.


( a ) 1 + 1 = 3 if and only if monkeys can fly.
( b ) 0 > 1 if and only if 2 > 1.
( c ) If 1 + 1 = 3, then 2 + 2 = 4.
( d ) If 2 + 2 = 4, then 1 + 2 = 3.

5. For each of these sentences, determine whether an “inclusive or” or an “exclusive or” is
intended.
( a ) Coffee or tea comes with dinner.
( b ) A password must have at least three digits or be at least eight characters long.
( c ) Experience with C++ or Java is required.
( d ) Lunch includes soup or salad.
( e ) The prerequisite for the course is a course in number theory or a course in
cryptography.
( f ) School is closed if more than 2 feet of snow falls or if the wind chill is below −100.
6. Write each of these sentences in the form “if 𝑝, then 𝑞" in English.
( a ) Willy gets caught whenever he cheats.
( b ) Getting elected follows from knowing the right people.
( c ) It snows whenever the wind blows from the northeast.
( d ) That you get the job implies that you had the best credentials.
( e ) It is necessary to have a valid password to log on to the server.
( f ) You will reach the summit unless you begin your climb too late.

7. Write each of these propositions in the form “𝑝 if and only if 𝑞" in English.
( a ) For you to win the contest it is necessary and sufficient that you have the only winning
ticket.
( b ) If you watch television your mind will decay, and conversely.
( c ) The trains run late on exactly those days when I take it.
( d ) For you to get an 𝐴 in this course, it is necessary and sufficient that you learn how to
solve discrete mathematics problems.
8. State the converse, contrapositive and inverse of each of these conditional statements.
( a ) If it snows tonight, then I will stay at home.
( b ) I come to class whenever there is going to be a quiz.
( c ) A positive integer is a prime only if it has no divisors other than 1 and itself.
( d ) I go to the beach whenever it is a sunny summer day.

9. How many rows appear in a truth table for each of these compound propositions?
(𝑎) 𝑝 → ¬𝑝 (𝑏) (𝑝 → 𝑟)⋁(¬𝑠 → ¬𝑡)⋁(¬𝑢 → 𝑣) (𝑐) (𝑝⋁¬𝑡)⋀(𝑝⋁¬𝑠)

10. Construct a truth table for each of these compound propositions.


(𝑎) (𝑝 ⊕ 𝑞) → (𝑝 ⊕ ¬𝑞) (𝑏) (𝑝⋀𝑞) → (𝑝⋁𝑞)
11. Find the bitwise 𝑂𝑅, bitwise 𝐴𝑁𝐷, and bitwise 𝑋𝑂𝑅 of each of these pairs of bit strings.
(𝑎) 101 1110, 010 0001 (𝑏) 00 0111 0001, 10 0100 1000

12. Evaluate each of these expressions.


(𝑎) (0 1111 ⋀ 1 0101) ⋁ 0 1000 (𝑏) (0 1010 ⊕ 1 1011) ⊕ 0 1000

13. Use a truth table to verify the De Morgan’s law ¬(𝑝 ⋀ 𝑞) = ¬𝑝 ⋁¬𝑞.

14. Show that each of these conditional statements is a tautology without using truth tables.
(𝑎) (𝑝 ⋀ 𝑞) → (𝑝 → 𝑞) (𝑏) [(𝑝 ⋁ 𝑞)⋀(𝑝 → 𝑟)⋀(𝑞 → 𝑟)] → 𝑟
15. Show that each of the following pairs of compound propositions are logically equivalent.
(𝑎) ¬(𝑝 ⊕ 𝑞), 𝑝↔𝑞 (𝑏) ¬𝑝 → (𝑞 → 𝑟), 𝑞 → (𝑝 ⋁ 𝑟)

16. Show that each of the following pairs of compound propositions are not logically
equivalent.
(𝑎) (𝑝 ⋀ 𝑞) → 𝑟, (𝑝 → 𝑟) ⋀ (𝑞 → 𝑟) (𝑏) (𝑝 → 𝑞) → 𝑟, 𝑝 → (𝑞 → 𝑟)
17. Find the dual of each of these compound propositions.
(𝑎) 𝑝 ⋀ (𝑞 ⋁ (𝑟 ⋀ 𝑇)) ( 𝑏 ) (𝑝 ⋁ 𝐹) ⋀ (𝑞 ⋁ 𝑇)

18. Let 𝑃(𝑥) be the statement “𝑐 can speak Russian” and let 𝑄(𝑥) be the statement “𝑥 knows
𝐶 + +". Express each of the following sentences in terms of 𝑃(𝑥), 𝑄(𝑥), quantifiers, and
logical connectives. The domain for quantifiers consists of all students at your school.
( a ) There is a student at your school who can speak Russian and who knows 𝐶 + +.
( b ) There is a student at your school who can speak Russian but doesn’t know 𝐶 + +.
( c ) Every student at your school either can speak Russian or knows 𝐶 + +.
( d ) No student at your school can speak Russian or knows 𝐶 + +.

19. Let 𝑃(𝑥) be the statement “𝑥 = 𝑥 2 “. If the domain consists of the integers, what are the
truth values?
(𝑎) 𝑃(0) (𝑏) 𝑃(1) (𝑐) 𝑃(2)
(𝑑) 𝑃(−1) (𝑒) ∃𝑥 𝑃(𝑥) (𝑓) ∀𝑥 𝑃(𝑥)
(𝑔) ∃𝑥 ¬𝑃(𝑥) (ℎ) ∀𝑥 ¬𝑃(𝑥)

20. Suppose that the domain of the propositional function 𝑃(𝑥) consists of the integers
1, 2, 3, 4, 5. Express these statements without using quantifiers, instead using only
negations, disjunctions, and conjunctions.
(𝑎) ∃𝑥 𝑃(𝑥) (𝑏) ∀𝑥 𝑃(𝑥)
(𝑐) ¬∃𝑥 𝑃(𝑥) (𝑑) ¬∀𝑥 𝑃(𝑥)
(𝑒) ∀𝑥 ((𝑥 ≠ 3) → 𝑃(𝑥)) ⋁ ∃𝑥 𝑃(𝑥)
21. Suppose that the domain of the propositional function 𝑃(𝑥) consists of the integers
−5, −3, −1, 1, 3, 5. Express these statements without using quantifiers, instead using only
negations, disjunctions, and conjunctions.
(𝑐) ∀𝑥 ((𝑥 ≠ 1) → 𝑃(𝑥)) (𝑑) ∃𝑥 ((𝑥 ≥ 0) ⋀ 𝑃(𝑥))
(𝑒) ∃𝑥 (¬𝑃(𝑥)) ⋀ ∀𝑥 ((𝑥 < 0) → 𝑃(𝑥))

22. Show that ∀𝑥 𝑃(𝑥) ⋁ ∀𝑥 𝑄(𝑥) and ∀𝑥 (𝑃(𝑥) ⋁ 𝑄(𝑥)) are not logically equivalent.

23. Show that ∃𝑥 𝑃(𝑥) ⋀ ∃𝑥 𝑄(𝑥) and ∃𝑥 (𝑃(𝑥) ⋀ 𝑄(𝑥)) are not logically equivalent.

24. If the domain consists of all the integers, what are the truth values of these statements?
(𝑎) ∃ ! 𝑥 (𝑥 > 1) (𝑏) ∃ ! 𝑥 (𝑥 2 = 1)
(𝑐) ∃ ! 𝑥 (𝑥 + 3 = 2𝑥) (𝑑) ∃ ! 𝑥 (𝑥 = 𝑥 + 1)

25. What are the truth values of these statements?


(𝑎) ∃ ! 𝑥 𝑃(𝑥) → ∃𝑥 𝑃(𝑥) (𝑏) ∀𝑥 𝑃(𝑥) → ∃ ! 𝑥 𝑃(𝑥)
(𝑐) ∃ ! 𝑥 ¬𝑃(𝑥) → ¬∀𝑥 𝑃(𝑥)

26. Write our ∃ ! 𝑥 𝑃(𝑥), where the domain consists of the integers 1, 2, and 3, in terms of
negations, conjunctions, and disjunctions.
27. Let 𝑃(𝑥), 𝑄(𝑥), and 𝑅(𝑥) be the statements “𝑥 is a professor”, “𝑥 is ignorant”, and “𝑥 is
vain”, respectively. Express each of these statements using quantifiers; logical connectives;
and 𝑃(𝑥), 𝑄(𝑥), and 𝑅(𝑥), where the domain consists of all people.
( a ) No professors are ignorant. ( b ) All ignorant people are vain.
( c ) No professors are vain. ( d ) Does ( c ) follow from ( a ) and ( b ) ?

28. Let 𝑃(𝑥), 𝑄(𝑥), 𝑅(𝑥) and 𝑆(𝑥) be the statements “𝑥 is a baby”, “𝑥 is logical”, “𝑥 is able to
manage a crocodile”, and “𝑥 is despised”, respectively. Express each of these statements
using quantifiers; logical connectives; and 𝑃(𝑥), 𝑄(𝑥), 𝑅(𝑥) and 𝑆(𝑥), where the domain
consists of all people.
( a ) Babies are illogical.
( b ) Nobody is despised who can manage a crocodile.
( c ) Illogical persons are despised.
( d ) Babies cannot manage crocodiles.
( e ) Does ( d ) follow from ( a ), ( b ) and ( c )?

29. Let 𝑃(𝑥), 𝑄(𝑥) and 𝑅(𝑥) be the statements “𝑥 is a clear explanation”, “𝑥 is satisfactory”,
and “𝑥 is an excuse”, respectively. Suppose that the domain for 𝑥 consists of all English
text. Express each of these statements using quantifiers; logical connectives; and
𝑃(𝑥), 𝑄(𝑥), and 𝑅(𝑥).
( a ) All clear explanations are satisfactory.
( b ) Some excuses are unsatisfactory.
( c ) Some excuses are not clear explanations.
( d ) Does ( c ) follow from ( a ) and ( b )?
30. Let 𝐹(𝑥, 𝑦) be the statement “𝑥 can fool 𝑦”, where the domain consists of all people in the
world. Use quantifiers to express each of these statements.
( a ) Everybody can fool Fred.
( b ) Evelyn can fool everybody.
( c ) Everybody can fool somebody.
( d ) There is no one who can fool everybody.
( e ) Everyone can be fooled by somebody.
( f ) No one can fool both Fred and Jerry.
( g ) Nancy can fool exactly two people.
( h ) There is exactly one person whom everybody can fool.
( i ) No one can fool himself or herself.
( j ) There is someone who can fool exactly one person besides himself or herself.

31. Let 𝑆(𝑥) be the predicate “𝑥 is a student”, 𝐹(𝑥) the predicate “𝑥 is a faculty member”, and
𝐴(𝑥, 𝑦) the predicate “𝑥 has asked 𝑦 a question”, where the domain consists of all people
associated with your school. Use quantifiers to express each of these statements.
( a ) Lois has asked Professor Michaels a question.
( b ) Every student has asked Professor Gross a question.
( c ) Every faculty member has either asked Professor Miller a question or been asked a
question by Professor Miller.
( d ) Some student has not asked any faculty member a question.
( e ) There is a faculty member who has never been asked a question by a student.
( f ) Some student has asked every faculty member a question.
( g ) There is a faculty member who has asked every other faculty member a question.
( h ) Some student has never been asked a question by a faculty member.

32. Express each of these statements using mathematical and logical operators, predicates, and
quantifiers, where the domain consists of all integers.
( a ) The sum of two negative integers is negative.
( b ) The difference of two positive integers is not necessarily positive.
( c ) The sum of the squares of two integers is greater than or equal to the square of their
sum.
( d ) The difference of a real number and itself is zero.
( e ) The absolute value of the sum of two integers does not exceed the sum of the absolute
values of these integers.
( f ) Every positive integer if the sum of the squares of four integers.
( g ) There is a positive integer that is not the sum of three squares.

33. Let 𝑄(𝑥, 𝑦) be the statement “𝑥 + 𝑦 = 𝑥 − 𝑦”. If the domain for both variables consists of
all integers, what are the truth values?
(𝑎) 𝑄(1, 1) (𝑏) 𝑄(2, 0) (𝑐) ∀𝑦 𝑄(1, 𝑦)
(𝑑) ∃𝑥 𝑄(𝑥, 2) (𝑒) ∃𝑥∃𝑦 𝑄(𝑥, 𝑦) (𝑓) ∀𝑥∃𝑦 𝑄(𝑥, 𝑦)
(𝑔) ∃𝑦∀𝑥 𝑄(𝑥, 𝑦) (ℎ) ∀𝑦∃𝑥 𝑄(𝑥, 𝑦) (𝑖) ∀𝑥∀𝑦 𝑄(𝑥, 𝑦)

34. Determine the truth value of each of these statements if 𝑚, 𝑛 are integers and 𝑥, 𝑦 are real
numbers.
(𝑎) ∃𝑛∀𝑚 (𝑛 < 𝑚2 ) (𝑏) ∀𝑛∃𝑚 (𝑛 + 𝑚 = 0)
(𝑐) ∃𝑛∃𝑚 (𝑛2 + 𝑚2 = 6) (𝑑) ∃𝑛∃𝑚 (𝑛 + 𝑚 = 4 ⋀ 𝑛 − 𝑚 = 2)
(𝑒) ∀𝑥∃𝑦 (𝑥 = 𝑦 2 ) (𝑓) ∃𝑥∃𝑦 (𝑥 + 2𝑦 = 2 ⋀ 2𝑥 + 4𝑦 = 5)
(𝑔) ∃𝑥∀𝑦 (𝑦 ≠ 0 → 𝑥𝑦 = 1) (ℎ) ∀𝑥∀𝑦∃𝑧 (𝑧 = (𝑥 + 𝑦)⁄2)

35. Suppose the domain of the propositional function 𝑃(𝑥, 𝑦) consists of the pairs 𝑥 and 𝑦,
where 𝑥 is 1, 2, or 3 and 𝑦 is 1, 2, or 3. Write out these propositions using disjunctions and
conjunctions.
(𝑎) ∀𝑥∀𝑦 𝑃(𝑥, 𝑦) (𝑏) ∃𝑥∃𝑦 𝑃(𝑥, 𝑦)
(𝑐) ∃𝑥∀𝑦 𝑃(𝑥, 𝑦) (𝑑) ∀𝑦∃𝑥 𝑃(𝑥, 𝑦)

36. Rewrite each of these statements so that negation appears only within predicates (that is, so
that no negation is outside a quantifier or an expression involving logical connectives.)
(𝑎) ¬∃𝑦 (∃𝑥 𝑅(𝑥, 𝑦) ⋁ ∀𝑥 𝑆(𝑥, 𝑦)) (𝑏) ¬𝑦 (∀𝑥∃𝑧 𝑇(𝑥, 𝑦, 𝑧) ⋀ ∃𝑥∀𝑧 𝑈(𝑥, 𝑦, 𝑧))
37. Express the negations of each of these statements so that all negation symbols immediately
precede predicates.
(𝑎) ∀𝑥∃𝑦 (𝑃(𝑥, 𝑦) → 𝑄(𝑥, 𝑦)) (𝑏) ∃𝑥∃𝑦 (𝑄(𝑥, 𝑦) ↔ 𝑄(𝑦, 𝑥))
(𝑐) ∀𝑦∃𝑥∃𝑧 (𝑇(𝑥, 𝑦, 𝑧)⋁ 𝑄(𝑥, 𝑦) )

38. Find a counterexample, if possible, to these universally quantified statements, where the
domain for all variables consists of all integers.
(𝑎) ∀𝑥∃𝑦 (𝑦 2 = 𝑥) (𝑏) ∀𝑥∃𝑦 (𝑦 2 − 𝑥 < 100) (𝑐) ∀𝑥∀𝑦 (𝑥 2 ≠ 𝑦 3 )

39. Use quantifiers to express the distributive laws of multiplication over addition for real
numbers.

40. Determine the truth value of


(𝑎) ∀𝑥∃𝑦 (𝑥𝑦 = 1) (𝑏) ∃𝑥∀𝑦 (𝑥 ≤ 𝑦 2 )
if the domain for the variables consists of
( a ) the nonzero real numbers.
( b ) the nonzero integers.
( c ) the positive real numbers.

41. What rule of inference is used in each of these arguments?


( a ) If it snows today, the university will close. The university is not closed today.
Therefore, it did not snow today.
( b ) It is either hotter than 100 degrees today or the pollution is dangerous. It is less than
100 degrees outside today. Therefore, the pollution is dangerous.
( c ) If I work all night on this homework, then I can answer all the exercises. If I answer
all the exercises, I will understand the material. Therefore, if I work all night on this
homework, then I will understand this material.
( d ) Steve will work at a computer company this summer. Therefore, this summer Steve
will work at a computer company or he will enjoy the holidays.
42. For each of these sets of premises, what relevant conclusion or conclusions can be drawn?
Explain the rules of inference used to obtain each conclusion from the premises.
( a ) “Every computer science major has a personal computer.” “Ralph does not have a
personal computer.” “Ann has a personal computer.”
( b ) “If I take the day off, it either rains or snows.” “I took Tuesday off or I took Thursday
off.” “It was sunny on Tuesday.” “It did not snow on Thursday.”
( c ) “All foods that are healthy to eat do not taste good.” “Tofu is healthy to eat.” “You
only eat what tastes good.” “You do not eat Tofu.” “Cheeseburgers are not healthy to
eat.”
( d ) “I am either dreaming or hallucinating.” “I am not dreaming.” “If I am hallucinating, I
see elephants running down the road.”
( e ) “All insects have six legs.” “Dragonflies are insects.” “Spiders do not have six legs.”
“Spiders eat dragonflies.”

43. Show that the argument form with premises (𝑝⋀𝑡) → (𝑟⋁𝑠), 𝑞 → (𝑢⋀𝑡), 𝑢 → 𝑝, and ¬𝑠
and conclusion 𝑞 → 𝑟 is valid.

44. For each of these arguments, explain which rules of inference are used for each step.
( a ) “Doug, a student in this class, knows how to write programs in JAVA. Everyone who
knows how to write programs in JAVA can get a high-paying job. Therefore,
someone in this class can get a high-paying job.”
( b ) “Somebody in this class enjoys whale watching. Every person who enjoys whale
watching cares about ocean pollution. Therefore, there is a person in this class who
cares about ocean pollution.”
( c ) “Each of five roommates, Melissa, Aaron, Ralph, Veneesha and Keeshawn, has taken
a course in discrete mathematics. Every student who has taken a course in discrete
mathematics can take a course in algorithms. Therefore, all five roommates can take a
course in algorithms next year.
45. For each of these arguments, determine whether the argument is correct or incorrect and
explain why.
( a ) Every computer science major takes discrete mathematics course. Natasha is taking
discrete mathematics course. Therefore, Natasha is a computer science major.
( b ) All parrots like fruit. My pet bird is not a parrot. Therefore, my pet bird does not like
fruit.
( c ) A convertible car is fun to drive. Isaac’s car is not a convertible. Therefore, Isaac’s car
is not fun to drive.

46. Determine whether each of these arguments is valid. If an argument is correct, what rule of
inference is being used? If it is not, what logical error occurs?
( a ) If 𝑛 is a real number such that 𝑛 > 1, then 𝑛2 > 1. Suppose that 𝑛2 > 1. Then 𝑛 > 1.
( b ) If 𝑛 is a real number with 𝑛 > 3, then 𝑛2 > 9. Suppose that 𝑛2 ≤ 9. Then 𝑛 ≤ 3.
( c ) If 𝑛 is a real number with 𝑛 > 2, then 𝑛2 > 4. Suppose that 𝑛 ≤ 2. Then 𝑛2 ≤ 4.

47. Identify the error or errors in this argument that shows that if ∃𝑥 𝑃(𝑥) ⋀ ∃𝑥 𝑄(𝑥) is true
then ∃𝑥 (𝑃(𝑥) ⋀ 𝑄(𝑥)) is true.
∃𝑥 𝑃(𝑥) ⋀ ∃𝑥 𝑄(𝑥) Premise
∃𝑥 𝑃(𝑥) Simplification
𝑃(𝑐) Existential instantiation
∃𝑥 𝑄(𝑥) Simplification
𝑄(𝑐) Existential instantiation
𝑃(𝑐) ⋀ 𝑄(𝑐) Conjunction
∃𝑥 (𝑃(𝑥) ⋀ 𝑄(𝑥)) Existential generalization

48. Identify the error or errors in this argument that shows that if ∀𝑥 (𝑃(𝑥) ⋁ 𝑄(𝑥)) is true
then ∀𝑥 𝑃(𝑥) ⋁ ∀𝑥 𝑄(𝑥) is true.
∀𝑥 (𝑃(𝑥) ⋁ 𝑄(𝑥)) Premise
𝑃(𝑐) ⋁ 𝑄(𝑐) Universal Instantiation
𝑃(𝑐) Simplification
∀𝑥 𝑃(𝑥) Universal generalization
𝑄(𝑐) Simplification
∀𝑥 𝑄(𝑥) Universal generalization
∀𝑥 𝑃(𝑥) ⋁ ∀𝑥 𝑄(𝑥) Conjunction

49. Use resolution to show the hypotheses “It is not raining or Yvette has her umbrella.”,
“Yvette does not have her umbrella or she does not get wet”, and “It is raining or Yvette
does not get wet” imply that “Yvette does not get wet.”

50. Consider the following two assumptions:


1. Logic is difficult or not many students like logic.
2. If mathematics is easy, then logic is not difficult.
Determine whether each of the following are valid conclusions of these assumptions:
( a ) That mathematics is not easy, if many students like logic.
( b ) That not many students like logic, if mathematics is not easy.
( c ) That mathematics is not easy or logic is difficult.
( d ) That logic is not difficult or mathematics is not easy.
( e ) That if not many students like logic, then either mathematics is not easy or logic is not
difficult.

You might also like