0% found this document useful (0 votes)
62 views

Discrete Mathematics Assignment-01

This document discusses propositional logic and provides examples of evaluating logical statements involving connectives like conjunction, disjunction, conditional, biconditional. It translates English statements into their logical symbol equivalents and determines whether the statements are true or false.

Uploaded by

Rayhan Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views

Discrete Mathematics Assignment-01

This document discusses propositional logic and provides examples of evaluating logical statements involving connectives like conjunction, disjunction, conditional, biconditional. It translates English statements into their logical symbol equivalents and determines whether the statements are true or false.

Uploaded by

Rayhan Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

1.

1 Propositional Logic (Page-13)

6. Here,
Smartphone A, RAM = 256MB, ROM = 32GB, Camera Resolution = 8MP.
Smartphone B, RAM = 288MB, ROM = 64GB, Camera Resolution = 4MP.
Smartphone C, RAM = 128MB, ROM = 32GB, Camera Resolution = 5MP.
a) Smartphone B has the most RAM of these three smartphones. True
b) Smartphone C has more ROM or a higher resolution camera than Smartphone B.
True
c) Smartphone B has more RAM, more ROM, and a higher resolution camera than
Smartphone A. False
d) If Smartphone B has more RAM and more ROM than Smartphone C, then it also has
a higher resolution camera. False
e) Smartphone A has more RAM than Smartphone B if and only if Smartphone B has
more RAM than Smartphone A. False

7. Here,
Acme Computer’s,
Annual revenue = 138 billion dollars
Net profit = 8 billion dollars
Nadir Software’s,
Annual revenue = 87 billion dollars
Net profit = 5 billion dollars
Quixote Media’s,
Annual revenue = 111 billion dollars
Net profit = 13 billion dollars
a) Quixote Media had the largest annual revenue. FALSE
b) Nadir Software had the lowest net profit and Acme Computer had the largest annual
revenue. TRUE
c) Acme Computer had the largest net profit or Quixote Media had the largest net profit.
TRUE
d) If Quixote Media had the smallest net profit, then Acme Computer had the largest
annual revenue. TRUE
e) Nadir Software had the smallest net profit if and only if Acme Computer had the
largest annual revenue. TRUE
11. Given that,
p: It is below freezing.
q: It is snowing.
a) It is below freezing and snowing. Writing this proposition using logical
connectives/Translation: p  q
b) It is below freezing but not snowing. Translation: p  q
c) It is not below freezing and it is not snowing. Translation: p  q
d) It is either snowing or below freezing (or both). Translation: p  q
e) If it is below freezing, it is also snowing. Translation: p  q
f) Either it is below freezing or it is snowing, but it is not snowing if it is below freezing.
Translation: (p  q)  (p  q)
g) That it is below freezing is necessary and sufficient for it to be snowing. Translation:
pq

13. Given,
p: You drive over 65 miles per hour.
q: You get a speeding ticket.
a) You do not drive over 65 miles per hour. Translation: p
b) You drive over 65 miles per hour, but you do not get a speeding ticket. Translation:
p  q
c) You will get a speeding ticket if you drive over 65 miles per hour. Translation: p  q
d) If you do not drive over 65 miles per hour, then you will not get a speeding ticket.
Translation: p  q
e) Driving over 65 miles per hour is sufficient for getting a speeding ticket. Translation:
pq
f) You get a speeding ticket, but you do not drive over 65 miles per hour. Translation:
q  p
g) Whenever you get a speeding ticket, you are driving over 65 miles per hour.
Translation: q  p
15. The given propositions are following:
p: Grizzly bears have been seen in the area.
q: Hiking is safe on the trail.
r: Berries are ripe along the trail.
a) Berries are ripe along the trail, but grizzly bears have not been seen in the area.
Translation: r  p
b) Grizzly bears have not been seen in the area and hiking on the trail is safe, but berries
are ripe along the trail. Translation: p  q  r
c) If berries are ripe along the trail, hiking is safe if and only if grizzly bears have not
been seen in the area. Translation: r  (q  p)
d) It is not safe to hike on the trail, but grizzly bears have not been seen in the area and
the berries along the trail are ripe. Translation: q  p  r
e) For hiking on the trail to be safe, it is necessary but not sufficient that berries not be
ripe along the trail and for grizzly bears not to have been seen in the area. Translation:
q  (r  p)
f) Hiking is not safe on the trail whenever grizzly bears have been seen in the area and
berries are ripe along the trail. Translation: (p  r)  q

16. Let's evaluate each biconditional statement:


a) 2 + 2 = 4 if and only if 1 + 1 = 2.
 Both statements are true, as basic arithmetic verifies them.
 True if and only if True.
 Therefore, this biconditional is true.
b) 1 + 1 = 2 if and only if 2 + 3 = 4.
 1 + 1 = 2 is true.
 2 + 3 = 5 which is not equal to 4.
 True if and only if False.
 Therefore, this biconditional is false.
c) 1 + 1 = 3 if and only if monkeys can fly.
 1 + 1 = 3 is false.
 The statement about monkeys is generally considered false.
 False if and only if False.
 Therefore, this biconditional is true, because both sides are false.
d) 0 > 1 if and only if 2 > 1.
 0 > 1 is false.
 2 > 1 is true.
 False if and only if True.
 Therefore, this biconditional is false.

17. Let's evaluate each conditional statement:


a) If 1 + 1 = 2, then 2 + 2 = 5.
 1 + 1 = 2 is true.
 However, 2 + 2 = 5 is false.
 True premise does not imply true conclusion.
 Therefore, this conditional statement is false.
b) If 1 + 1 = 3, then 2 + 2 = 4.
 1 + 1 = 3 is false.
 2 + 2 = 4 is true.
 False premise implies true conclusion.
 Therefore, this conditional statement is true.
c) If 1 + 1 = 3, then 2 + 2 = 5.
 1 + 1 = 3 is false.
 2 + 2 = 5 is false.
 False premise does not imply false conclusion.
 Therefore, this conditional statement is true.
d) If monkeys can fly, then 1 + 1 = 3.
 The premise "monkeys can fly" is false.
 1 + 1 = 3 is false.
 False premise does not imply anything about the truth of the conclusion.
 Therefore, this conditional statement is true.
[From: Answers to Odd-Numbered Exercises — a) False b) True c) True d) True]
18. Let's evaluate each conditional statement:
a) If 1 + 1 = 3, then unicorns exist.
 The premise 1 + 1 = 3 is false.
 The statement "unicorns exist" is considered false in reality.
 False premise does not imply false conclusion.
 Therefore, this conditional statement is true.
b) If 1 + 1 = 3, then dogs can fly.
 The premise 1 + 1 = 3 is false.
 The statement "dogs can fly" is considered false in reality.
 False premise does not imply false conclusion.
 Therefore, this conditional statement is true.
c) If 1 + 1 = 2, then dogs can fly.
 The premise 1 + 1 = 2 is true.
 The statement "dogs can fly" is considered false in reality.
 True premise does not imply false conclusion.
 Therefore, this conditional statement is false.
d) If 2 + 2 = 4, then 1 + 2 = 3.
 Both the premise and the conclusion are true.
 True premise implies true conclusion.
 Therefore, this conditional statement is true.

21. When the logical connective "or" is an inclusive disjunction, it means that either
one or both of the statements are true. In contrast, when "or" is an exclusive disjunction, it
means that only one of the statements can be true, but not both.
Let's analyze the sentences:
Book ChatGPT Gemini
a) Inclusive or: It is a) To take discrete a) To take discrete
allowable to take discrete mathematics, you must have mathematics, you must have
mathematics if you have had taken calculus or a course in taken calculus or a course in
calculus or computer computer science. computer science.
science, or both.
Exclusive or: It is allowable Inclusive or: You must have Inclusive Or: You need to
to take discrete mathematics taken calculus, or you must have taken both calculus and
if you have had calculus or have taken a course in computer science, or at least
computer science, but not if computer science, or you one of them.
you have had both. must have taken both. Exclusive Or: You can only
Most likely the inclusive or Exclusive or: You must have have taken calculus or
is intended. taken calculus, or you must computer science, not both.
have taken a course in Intended Meaning: This is
computer science, but not likely an inclusive or. Most
both. universities require at least
Intended meaning: It seems one of these prerequisites,
that the intended meaning is not both necessarily.
an inclusive or, suggesting
that having taken either
calculus or a course in
computer science is
sufficient for taking discrete
mathematics.
b) Inclusive or: You can b) When you buy a new car b) When you buy a new car
take the rebate, or you can from Acme Motor from Acme Motor
get a low-interest loan, or Company, you get $2000 Company, you get $2000
you can get both the rebate back in cash or a 2% car back in cash or a 2% car
and a low-interest loan. loan. loan.
Exclusive or: You can take
the rebate, or you can get a Inclusive or: You get $2000 Inclusive Or: You get both
low-interest loan, but you back in cash, or you get a the cash and the 2% loan
cannot get both the rebate 2% car loan, or you get both. (unlikely).
and a low-interest loan. Exclusive or: You get $2000 Exclusive Or: You get either
Most likely the exclusive or back in cash, or you get a the cash or the 2% loan, but
is intended. 2% car loan, but not both. not both.
Intended meaning: The Intended Meaning: This is
intended meaning seems to likely an exclusive or. The
be an exclusive or, offer is one or the other, not
suggesting that the buyer both.
can choose either the
cashback offer or the 2% car
loan, but not both.
c) Inclusive or: You can c) Dinner for two includes c) Dinner for two includes
order two items from two items from column A or two items from column A or
column A and none from three items from column B. three items from column B.
column B, or three items
from column B and none Inclusive or: You can Inclusive Or: You can
from column A, or five choose two items from choose both two items from
items including two from column A, or you can A and three items from B for
column A and three from choose three items from your dinner.
column B. column B, or you can Exclusive Or: You can
Exclusive or: You can order choose a combination of choose either two items
two items from column A or items from both columns. from A or three items from
three items from column B, Exclusive or: You can B, but not both.
but not both. choose two items from Intended Meaning: This is
Almost certainly the column A, or you can likely an inclusive or. The
exclusive or is intended. choose three items from menu allows you to choose
column B, but not both. from various combinations,
Intended meaning: It's likely not just one option.
that the intended meaning is
an exclusive or, implying
that you can only choose
items from one column, not
both.
d) Inclusive or: More than 2 d) School is closed if more d) School is closed if more
feet of snow or windchill than 2 feet of snow falls or if than 2 feet of snow falls or if
below −100, or both, will the wind chill is below -100. the wind chill is below
close school. −100.
Exclusive or: More than 2 Inclusive or: School is
feet of snow or windchill closed if more than 2 feet of Inclusive Or: School closes
below −100, but not both, snow falls, or school is if both conditions happen
will close school. closed if the wind chill is (unlikely) or if at least one
Certainly, the inclusive or is below -100, or school is happens.
intended. closed if both conditions are Exclusive Or: School closes
met. if only one of the conditions
Exclusive or: School is occurs, not both.
closed if more than 2 feet of Intended Meaning: This is
snow falls, or school is likely an inclusive or.
closed if the wind chill is School is more likely to
below -100, but not both. close if any of the severe
Intended meaning: The weather conditions occur.
intended meaning is an
inclusive or, suggesting that
either condition is sufficient
for the school to be closed.

22. Let's express each statement in the form "if p, then q" in English:
a) If you want to get promoted, then you need to wash the boss’s car. (Necessary
condition)
b) If there are winds from the south, then there will be a spring thaw.
(Implication)
c) If you bought the computer less than a year ago, then the warranty is good.
(Sufficient condition)
d) If Willy cheats, then he gets caught. (Cause and effect)
e) If you pay a subscription fee, then you can access the website. (Necessary
condition)
f) If you know the right people, then you will get elected. (Implication)
g) If Carol is on a boat, then she gets seasick. (Cause and effect)
25. Let's express each proposition in the form "p if and only if q" in English:
a) You buy an ice cream cone if and only if it is hot outside.
b) You win the contest if and only if you hold the only winning ticket.
c) You get promoted if and only if you have connections.
d) Your mind will decay if and only if you watch television.
e) The train runs late if and only if it is a day, I take the train.

27. Let's state the converse, contrapositive, and inverse of each conditional statement:
a) If it snows today, I will ski tomorrow.
 Converse: “I will ski tomorrow only if it snows today.”
 Contrapositive: “If I do not ski tomorrow, then it will not have snowed today.”
 Inverse: “If it does not snow today, then I will not ski tomorrow.”
b) I come to class whenever there is going to be a quiz.
 Converse: “If I come to class, then there will be a quiz.”
 Contrapositive: “If I do not come to class, then there will not be a quiz.”
 Inverse: “If there is not going to be a quiz, then I don’t come to class.”
c) A positive integer is a prime only if it has no divisors other than 1 and itself.
 Converse: “A positive integer is a prime if it has no divisors other than 1 and
itself.”
 Contrapositive: “If a positive integer has a divisor other than 1 and itself, then
it is not prime.”
 Inverse: “If a positive integer is not prime, then it has a divisor other than 1
and itself.”
[From: Answers to Odd-Numbered Exercises —
a) Converse: “I will ski tomorrow only if it snows today.”
Contrapositive: “If I do not ski tomorrow, then it will not have snowed today.”
Inverse: “If it does not snow today, then I will not ski tomorrow.”
b) Converse: “If I come to class, then there will be a quiz.”
Contrapositive: “If I do not come to class, then there will not be a quiz.”
Inverse: “If there is not going to be a quiz, then I don’t come to class.”
c) Converse: “A positive integer is a prime if it has no divisors other than 1 and itself.”
Contrapositive: “If a positive integer has a divisor other than 1 and itself, then it is not
prime.”
Inverse: “If a positive integer is not prime, then it has a divisor other than 1 and
itself.”]
40. Given compound proposition, (p  q)  (q  r)  (r  p)
i. When, p, q and r are all true:
 Here, p, q and r all are false.
 Therefore, p  q, q  r and r  p are all true.
 Consequently, their conjunction (p  q)  (q  r)  (r  p) is true as well.
ii. When, p, q and r are all false:
 Here, p, q and r all are true.
 Therefore, p  q, q  r and r  p are all true.
 Consequently, their conjunction (p  q)  (q  r)  (r  p) is true as well.
Otherwise, if p, q and r do not have the same truth value, at least one of the disjuncts in each
conjunction p  q, q  r and r  p will be false making the entire conjunction false.
Hence, the expression (p  q)  (q  r)  (r  p) is true when p, q and r have the same
truth value, and it is false otherwise.

41. Let’s breakdown the expression (p  q  r)  (p  q  r)


i. When at least one of p, q and r is true and at least one of them is false:
If at least one of p, q and r is true and at least one is false, then in the first part p  q  r,
the disjunction will be true because at least one of p, q or r is true. Simultaneously, in the
second part p  q  r, at least one of p, q or r will be true since at least one of p,
q or r is false. Therefore, the conjunction of these two parts will be true.
ii. When all three of the variables have the same truth value:
If all three variables p, q and r have the same truth value, either all true or all false—
 If all are true, then p  q  r is true, but p  q  r is false since all negations
are false. Therefore, the conjunction is false.
 If all are false, then p  q  r is false, but p  q  r is false since all negations
are true. Therefore, the conjunction is false.
Therefore, the expression is true when at least one of p, q, and r is true and at least one is
false, but it is false when all three variables have the same truth value.

[From: Answers to Odd-Numbered Exercises —


The first clause is true if and only if at least one of p, q, and r is true. The second clause is
true if and only if at least one of the three variables is false. Therefore, the entire statement is
true if and only if there is at least one T and one F among the truth values of the variables, in
other words, that they don’t all have the same truth value.]
42. Let's evaluate each statement and determine the value of x after each statement is
encountered in a computer program, given that x=1 before the statement is reached:
a) if x +2=3 then x :=x +1
Given x = 1 before the statement is reached:
 x +2=3 is true because 1+2=3 .
 Therefore, the condition is true, and x :=x +1 is executed.
 After execution, x=2.
b) if (x +1=3)∨(2 x+2=3) then x :=x +1
Given x = 1 before the statement is reached:
 x +1=3 is false because1+1 ≠3
 2 x+ 2=3is false because 2 ×1+2 ≠3
 Therefore, the condition is false, and x :=x +1 is not executed.
 After evaluation, x remains 1.
c) if (2 x+ 3=5)∧(3 x+ 4=7) then x :=x +1
Given x = 1 before the statement is reached:
 2 x+3=5 is true because 2 ×1+3=5
 3 x+ 4=7 is false because 3 ×1+ 4 ≠ 7.
 Therefore, the condition is false, and x :=x +1 is not executed.
 After evaluation, x remains 1.
d) if (x +1=2) XOR( x+2=3) then x :=x +1
Given x = 1 before the statement is reached:
 x +1=2 is true because 1+1=2.
 x +2=3 is true because 1+2=3 .
 The exclusive or (XOR) condition is true because one of the conditions is true
and the other is true, but not both.
 Therefore, x :=x +1 is executed.
 After execution, x=2.
e) if x <2 then x :=x +1
Given x = 1 before the statement is reached:
 x <2 is true because 1<2.
 Therefore, x :=x +1 is executed.
 After execution, x=2.
After encountering each statement, the value of x is as follows:
a) x=2
b) x=1
c) x=1
d) x=2
e) x=2

43. Let's find the bitwise OR(|), bitwise AND(&), and bitwise XOR(^) of each pair of
bit strings:
a) 1011110, 0100001
 Bitwise OR: 1011110∨0100001=1111111
 Bitwise AND: 1011110∧0100001=0000000
 Bitwise XOR: 1011110 0100001=1111111
b) 11110000, 10101010
 Bitwise OR: 11110000∨10101010=11111010
 Bitwise AND: 11110000∧10101010=10100000
 Bitwise XOR: 1111000010101010 =01011010
c) 0001110001, 1001001000
 Bitwise OR: 00011100001∨10010010000=10011110001
 Bitwise AND: 00011100001∧10010010000=00010000000
 Bitwise XOR: 0001110000110010010000=1000111000
d) 1111111111, 0000000000
 Bitwise OR: 1111111111 | 0000000000 = 1111111111
 Bitwise AND: 1111111111 & 0000000000 = 0000000000
 Bitwise XOR: 1111111111 ^ 0000000000 = 1111111111
These are the results of performing the bitwise OR(|), bitwise AND(&), and bitwise XOR(^)
operations on each pair of bit strings.

You might also like