0% found this document useful (0 votes)
21 views5 pages

DSC Tut 1 Old

discrete structures practise question

Uploaded by

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

DSC Tut 1 Old

discrete structures practise question

Uploaded by

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

CO-205: Discrete Structures Tutorial #1

Summary satisfiable compound a compound proposition for


proposition a statement that is true or false proposition which there is an assignment of
propositional variable a variable that represents a truth values to its variables that
proposition makes it true
truth value true or false logically equivalent compound propositions that
~ p (negation of p) the proposition with truth value compound always have the same truth
opposite to the truth value of p propositions values
logical operators operators used to combine predicate part of a sentence that attributes
propositions a property to the subject
compound proposition a proposition constructed by propositional function a statement containing one or
combining propositions using more variables that becomes a
logical operators proposition when each of its
truth table a table displaying all possible variables is assigned a value or is
truth values of propositions bound by a quantifier
p ∨ q (disjunction of p the proposition “p or q,” which is domain (or universe) the values a variable in a
and q) true if and only if at least one of of discourse propositional function may take
p and q is true ∃x P(x) (existential the proposition that is true if and
p ∧ q (conjunction of p the proposition “p and q,” which quantification of P(x)) only if there exists an x in the
and q) is true if and only if both p and q domain such that P(x) is true
are true ∀xP(x) (universal the proposition that is true if and
p ⊕ q (exclusive or of p the proposition “p XOR q,” quantification of P(x)) only if P(x) is true for every x in
and q) which is true when either one of the domain
p or q is true logically equivalent expressions that have the same
p → q (p implies q) the proposition “if p, then q,” expressions truth value no matter which
which is false if and only if p is propositional functions and
true and q is false domains are used
converse of p→q the conditional statement free variable a variable not bound in a
q→p propositional function
Contrapositive of p→q the conditional statement bound variable a variable that is quantified
~q →~p scope of a quantifier portion of a statement where the
inverse of p→q the conditional statement quantifier binds its variable
~p →~q
p ↔ q (biconditional) the proposition “p if and only if
q,” which is true if and only if p Logical Equivalences
and q have the same truth value Equivalence Name
bit either a 0 or a 1 p∧T≡p
Identity laws
Boolean variable a variable that has a value of 0 or p∨F≡p
1 p∨T≡T
Domination laws
bit operation an operation on a bit or bits p∧F≡F
bit string a list of bits p∨p≡p
Idempotent laws
bitwise operations operations on bit strings that p∧p≡p
operate on each bit in one string ~(~p) ≡ p Double negation law
and the corresponding bit in the p∨q≡q∨p
Commutative laws
other string p∧q≡q∧p
logic gate a logic element that performs a (p ∨ q) ∨ r ≡ p ∨ (q ∨ r)
Associative laws
logical operation on one or more (p ∧ q) ∧ r ≡ p ∧ (q ∧ r)
bits to produce an output bit p ∨ (q ∧ r) ≡
logic circuit a switching circuit made up of (p ∨ q) ∧ (p ∨ r)
Distributive laws
logic gates that produces one or p ∧ (q ∨ r) ≡
more output bits (p ∧ q) ∨ (p ∧ r)
tautology a compound proposition that is ~(p ∧ q) ≡ ~p ∨~q
De Morgan’s laws
always true ~(p ∨ q) ≡ ~p ∧~q
contradiction a compound proposition that is p ∨ (p ∧ q) ≡ p
Absorption laws
always false p ∧ (p ∨ q) ≡ p
contingency a compound proposition that is p ∨~p ≡ T
sometimes true and sometimes Negation laws
p ∧~p ≡ F
false
consistent compound compound propositions for
propositions which there is an assignment of
truth values to the variables that
makes all these propositions true
Logical Equivalences involving Conditional / De Morgan’s Laws for Quantifiers
Bi-conditional Statements. Negation Equivalent When is Negation When False?
p → q ≡ ~p ∨ q p → q ≡ ~q →~p Statement True?
p ∨ q ≡ ~p → q p ∧ q ≡ ~(p →~q) ~∃xP(x) ∀x~P(x) For every x, P(x) is There is an x for
false. which P(x) is
~(p → q) ≡ p ∧~q
true.
(p → q) ∧ (p → r) ≡ p → (q ∧ r) There is an x for P(x) is true for
~∀xP(x) ∃x~P(x)
(p → r) ∧ (q → r) ≡ (p ∨ q) → r which P(x) is false. every x.
(p → q) ∨ (p → r) ≡ p → (q ∨ r)
(p → r) ∨ (q → r) ≡ (p ∧ q) → r
p ↔ q ≡ (p → q) ∧ (q → p)
p ↔ q ≡ (p ∧ q) ∨ (~p ∧ ~q)
p ↔ q ≡ ~p ↔~q ~(p ↔ q) ≡ p ↔~q

1. Which of these are propositions? What are the truth 5. Determine whether these bi-conditionals are true or
values of those that are propositions? false.
a) Do not cross the road when the signal is red. a) 2 + 2 = 4 if and only if 1 + 1 = 2.
b) What is the time now? b) 1 + 1 = 2 if and only if 2 + 3 = 4.
c) There are no Windmills in the University. c) 1 + 1 = 3 if and only if monkeys can fly.
d) 3 + x = 12. d) 0 > 1 if and only if 2 > 1.
e) The moon is made of green cheese.
f ) 5x ≥ 67. 6. State the converse, contra-positive, and inverse of
each of these conditional statements.
2. What is the negation of each of these propositions? a) If it snows tonight, then I will stay at home.
a) Ram and Vinod are friends. b) I go to the beach whenever it is a sunny summer
b) There are 13 items in a baker’s dozen. day.
c) Bobby sent more than 50 text messages c) When I stay up late, it is necessary that I sleep
yesterday on his mobile phone. until noon.
d) 144 is a perfect square.
7. Construct a truth table for each of these compound
propositions.
3. Let p and q be the propositions a) p ⊕ p b) p ⊕~p
p: I bought a lottery ticket this week. c) p ⊕~q d) ~p ⊕~q
q: I won the million dollar jackpot. e) (p ⊕ q) ∨ (p ⊕~q) f ) (p ⊕ q) ∧ (p ⊕~q)
Express each of these propositions as an English
sentence. 8. Explain, without using a truth table, why (p∨~q) ∧
(a) ~p (b) p ∨ q (c) p → q (d) p ∧ q (e) p ↔ q (q∨~r) ∧ (r∨~p) is true when p, q, and r have the same
(f ) ~p →~q (g) ~p ∧~q (h) ~p ∨ (p ∧ q) truth value and it is false otherwise.

4. Let p and q be the propositions


p:You drive over 80km/h. 9. What is the value of x after each of these
q:You get a speeding ticket. statements is encountered in a computer program,
Write these propositions using p and q and known assume that x = 1 before the statement is reached?
logical connectives. a) if x + 2 = 3 then x := x + 1
a) You do not drive over 80km/h. b) if (x + 1 = 3) OR (2x + 2 = 3) then x := x + 1
b) You drive over 80km/h, but you do not get a c) if (2x + 3 = 5) AND (3x + 4 = 7) then x := x + 1
speeding ticket. d) if (x + 1 = 2) XOR (x + 2 = 3) then x := x + 1
c) You will get a speeding ticket if you drive over e) if x < 2 then x := x + 1
80km/h.
d) If you do not drive over 80km/h, then you will not 10. Express the statement “You can see the movie
get a speeding ticket. only if you are over 18 years old or you have the
e) Driving over 80km/h is sufficient for getting a permission of a parent.” in terms of the prepositions –
speeding ticket. m: “You can see the movie,”
f ) You get a speeding ticket, but you do not drive a: “You are over 18 years old,”
over 80km/h. p: “You have the permission of a parent.”
g) Whenever you get a speeding ticket, you are
driving over 80km/h. 11. Express the statement “to use the wireless network
in the airport you must pay the daily fee unless you

CO-205: Discrete Structures Tutorial #1 (Pg: 2)


are a subscriber to the service” in terms of the d) ~p ↔ q ≡ p ↔ ~q
propositions – e) ~(p ⊕ q) ≡ p ↔ q
w: “You can use the wireless network in the f) ~(p ↔ q) ≡ ~p ↔ q
airport” g) (p → q) ∧ (p → r) ≡ p → (q ∧ r)
d: “You pay the daily fee” h) (p → r) ∧ (q → r) ≡ (p ∨ q) → r
s: “You are a subscriber to the service” i) (p → q) ∨ (p → r) ≡ p → (q ∨ r)
j) (p → r) ∨ (q → r) ≡ (p ∧ q) → r
12. Express these system specifications using the k) ~p → (q → r) ≡ q → (p ∨ r)
propositions given below and logical connectives l) p ↔ q ≡ (p → q) ∧ (q → p)
(including negations) m) p ↔ q ≡ ~p ↔~q
p “The user enters a valid password,”
q “Access is granted,” 21. Show that the following are not logically
r “The user has paid the subscription fee” equivalent: -
a) “The user has paid the subscription fee, but does
not enter a valid password.” a) (p → q) → r and p → (q → r)
b) “Access is granted whenever the user has paid the b) (p ∧ q) → r and (p → r) ∧ (q → r)
subscription fee and enters a valid password.” c) (p → q) → (r → s) and (p → r) → (q → s)
c) “Access is denied if the user has not paid the 22. Determine whether each of these compound
subscription fee.” propositions is satisfiable.
d) “If the user has not entered a valid password but a) (p ∨ q ∨~r) ∧ (p ∨~q ∨~s) ∧ (p ∨~r ∨~s) ∧
has paid the subscription fee, then access is granted.” (~p ∨~q ∨~s) ∧ (p ∨ q ∨~s)
b) (~p ∨~q ∨ r) ∧ (~p ∨ q ∨~s) ∧ (p ∨~q ∨~s) ∧
13. Five friends have access to a chat room. Is it (~p ∨~r ∨~s) ∧ (p ∨ q ∨~r) ∧ (p ∨ ~r ∨~s)
possible to determine who is chatting if the following c) (p ∨ q ∨ r) ∧ (p ∨~q ∨~s) ∧ (q ∨~r ∨ s) ∧
information is known? Explain your reasoning. (~p ∨ r ∨ s) ∧ (~p ∨ q ∨~s) ∧ (p ∨~q ∨~r) ∧
 Either Kevin or Heather, or both, are chatting. (~p ∨~q ∨ s) ∧ (~p ∨~r ∨~s)
 Either Randy or Vijay, but not both, are chatting.
 If Abby is chatting, so is Randy. 23. Let N(x) be the statement “x has visited Nainital,”
 Either both Vijay and Kevin are chatting or neither where the domain consists of the students in your
is chatting. school. Express each of these quantifications in
 If Heather is chatting, then Abby and Kevin are English.
also chatting. a) ∃xN(x) b) ∀xN(x) c) ~∃xN(x)
d) ∃x~N(x) e) ~∀xN(x) f ) ∀x~N(x)
14. Construct a combinatorial circuit using inverters,
OR gates, and AND gates that produces the output 24. Translate these statements into English, where
((~p ∨~r)∧ ~q) ∨ (~p ∧ (q ∨ r)) from input bits p, q, R(x) is “x is a rabbit” and H(x) is “x hops” and the
and r. domain consists of all animals.
a) ∀x(R(x) → H(x)) b) ∀x(R(x) ∧ H(x))
15. Show that each of these conditional statements is a c) ∃x(R(x) → H(x)) d) ∃x(R(x) ∧ H(x))
tautology.
a) [~p ∧ (p ∨ q)] → q
b) [(p → q) ∧ (q → r)] → (p → r) 25. Let Q(x) be the statement “x + 1 > 2x.” If the
c) [p ∧ (p → q)] → q domain consists of all integers, what are the truth
d) [(p ∨ q) ∧ (p → r) ∧ (q → r)] → r values of the following?
(a) Q(0) (b) Q(−1) (c) Q(1) d) ∃xQ(x)
16. Is (~p ∧ (p → q))→~q is a tautology? (e) ∀xQ(x) (f ) ∃x~Q(x) (g) ∀x~Q(x)
17. Is (~q ∧ (p → q))→~p is a tautology?
18. Is (p → q) ∧ (q → r) → (p → r) a tautology? 26. Assuming that the domain of the propositional
19. Is (p ∨ q) ∧ (~p ∨ r) → (q ∨ r) a tautology? function P(x) consists of −5, −3, −1, 1, 3, and 5.
Express the statements given below using only
20. Show that negations, disjunctions, and conjunctions.
a) ∃xP(x) b) ∀xP(x) c) ∀x((x ≠ 1) → P(x))
a) p ↔ q ≡ (p ∧ q) ∨ (~p ∧~q)
d) ∃x((x ≥ 0) ∧ P(x))
b) ~(p ↔ q) ≡ p ↔~q
c) p → q ≡ ~q →~p e) ∃x(~P(x)) ∧ ∀x((x < 0) → P(x))

CO-205: Discrete Structures Tutorial #1 (Pg: 3)


b) ∀x∀y(((x ≥ 0) ∧ (y < 0)) → (x – y > 0))
27. Translate these statements into logical expressions c) ∀x∀y∃z(x = y + z)
using predicates, quantifiers, and logical connectives.
a) Something is not in the correct place. 33. Let P(x, y) be the statement “Student x has taken
b) All tools are in the correct place and are in class y,” where the domain for x consists of all
excellent condition. students in your class and for y consists of all
c) Everything is in the correct place and in computer science courses in your University. Express
excellent condition. each of these quantifications in English.
d) Nothing is in the correct place and is in excellent a) ∃x∃yP(x, y) b) ∃x∀yP(x, y) c) ∀x∃yP(x, y) d)
condition. ∃y∀xP(x, y) e) ∀y∃xP(x, y) f ) ∀x∀yP(x, y)
e) One of your tools is not in the correct place, but
it is in excellent condition. 34. Let Q(x, y) be the statement “student x has been a
contestant on quiz show y.” Express each of these
28. Find a counterexample, if possible, to these sentences in terms of Q(x, y), quantifiers, and logical
universally quantified statements, where the domain connectives, where the domain for x consists of all
for all variables consists of all real numbers. students in the University and for y consists of all quiz
a) ∀x(x2 ≠ x) b) ∀x(x2 ≠ 2) c) ∀x(|x| > 0) shows on TV.
a) There is a student at your University who has
29. Express each of these system specifications using been a contestant on a TV quiz show.
predicates, quantifiers, and logical connectives. b) No student at your University has ever been a
a) When there is less than 30 MB free space on the contestant on a TV quiz show.
hard disk, a warning message is sent to all users. c) There is a student in your University who has
b) No directories in the file system can be opened been a contestant on KBC and on Mastermind
and no files can be closed when system errors have India.
been detected. d) Every TV quiz show has had a student from
c) The file system cannot be backed up if there is a your University as a contestant.
user currently logged on. e) At least two students from your University have
d) Video on demand can be delivered when there been contestants on KBC.
are at least 8 MB of memory available and the
connection speed is at least 256 kbps. 35. Let I (x) be the statement “x has an Internet
connection” and C(x, y) be the statement “x and y
30. Suppose that Prolog facts are used to define the have chatted over the Internet,” where the domain for
predicates mother(M, Y ) and father(F,X), which the variables x and y consists of all students in your
represent that M is the mother of Y and F is the father class. Use quantifiers to express each of these
of X, respectively. Give a Prolog rule to define the statements.
predicate grandfather(X, Y ), which represents that X a) Jatin does not have an Internet connection.
is the grandfather of Y . [Hint: You can write a b) Ruchi has not chatted over the Internet with
disjunction in Prolog either by using a semicolon to Chitra.
separate predicates or by putting these predicates on c) Jerry and Shiva have never chatted over the
separate lines.] internet.
d) No one in the class has chatted with Bobby.
31. Let P(x), Q(x), and R(x) be the statements “x is a e) Sanjay has chatted with everyone except Vijay.
clear explanation,” “x is satisfactory,” and “x is an f ) Someone in your class does not have an Internet
excuse,” respectively. Suppose that the domain for x connection.
consists of all English text. Express the following g) Not everyone in your class has an Internet
statements using quantifiers, logical connectives, and connection.
P(x), Q(x), and R(x): - h) Exactly one student in your class has an Internet
a) All clear explanations are satisfactory. connection.
b) Some excuses are unsatisfactory. i) Everyone except one student in your class has an
c) Some excuses are not clear explanations. Internet connection.
d) Does (c) follow from (a) and (b)? j) Everyone in your class with an Internet
connection has chatted over the Internet with at
32. Translate these statements into English, where the least one other student in your class.
domain for each variable consists of all real numbers.
a) ∃x∀y(xy = y)

CO-205: Discrete Structures Tutorial #1 (Pg: 4)


k) Someone in your class has an Internet a) ∀x∃y(x2 = y)
connection but has not chatted with anyone else in b) ∀x∃y(x = y2)
your class. c) ∃x∀y(xy = 0)
l) There are two students in your class who have d) ∃x∃y(x + y ≠ y + x)
not chatted with each other over the Internet. e) ∀x(x ≠ 0 → ∃y(xy = 1))
m) There is a student in your class who has chatted f ) ∃x∀y(y ≠ 0 → xy = 1)
with everyone in your class over the Internet. g) ∀x∃y(x + y = 1)
n) There are at least two students in your class who h) ∃x∃y(x + 2y = 2 ∧ 2x + 4y = 5)
have not chatted with the same person in your i) ∀x∃y(x + y = 2 ∧ 2x − y = 1)
class. j) ∀x∀y∃z(z = (x + y)/2)
o) There are two students in the class who between
them have chatted with everyone else in the class. 38. Suppose the domain of the propositional function
P(x, y) consists of pairs x and y, where x is 1, 2, or 3
36. Express each of these system specifications using and y is 1, 2, or 3. Write out these propositions using
predicates, quantifiers, and logical connectives, if disjunctions and conjunctions.
necessary. a) ∀x∀yP(x, y) b) ∃x∃yP(x, y)
a) At least one console must be accessible during c) ∃x∀yP(x, y) d) ∀y∃xP(x, y)
every fault condition.
b) The e-mail address of every user can be 39. Express the negations of each of these statements
retrieved whenever the archive contains at least so that all negation symbols immediately precede
one message sent by every user on the system. predicates.
c) For every security breach there is at least one a) ∀x∃y∀zT (x, y, z)
mechanism that can detect that breach if and only b) ∀x∃yP(x, y) ∨ ∀x∃yQ(x, y)
if there is a process that has not been compromised. c) ∀x∃y(P(x, y) ∧ ∃zR(x, y, z))
d) There are at least two paths connecting every d) ∀x∃y(P(x, y) → Q(x, y))
two distinct endpoints on the network.
e) No one knows the password of every user on the 40. Find a counterexample, if possible, to these
system except for the system administrator, who statements, where the domain for all variables consists
knows all passwords. of all integers.
a) ∀x∀y(x2 = y2 → x = y)
37. Determine the truth value of each of these
statements if the domain of each variable consists of b) ∀x∃y(y2 = x)
all real numbers. c) ∀x∀y(xy ≥ x)

CO-205: Discrete Structures Tutorial #1 (Pg: 5)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy