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

Discrete Structures: Propositions & Logic

The document is a tutorial on discrete structures covering fundamental concepts such as propositions, truth values, logical operators, and logical equivalences. It includes exercises on identifying propositions, constructing truth tables, and expressing statements using logical connectives. Additionally, it discusses conditional and biconditional statements, quantifiers, and combinatorial circuits.

Uploaded by

pranjalps2112
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)
18 views5 pages

Discrete Structures: Propositions & Logic

The document is a tutorial on discrete structures covering fundamental concepts such as propositions, truth values, logical operators, and logical equivalences. It includes exercises on identifying propositions, constructing truth tables, and expressing statements using logical connectives. Additionally, it discusses conditional and biconditional statements, quantifiers, and combinatorial circuits.

Uploaded by

pranjalps2112
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

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 9. What is the value of x after each of these
p:You drive over 80km/h. statements is encountered in a computer program,
q:You get a speeding ticket. assume that x = 1 before the statement is reached?
Write these propositions using p and q and known a) if x + 2 = 3 then x := x + 1
logical connectives. b) if (x + 1 = 3) OR (2x + 2 = 3) then x := x + 1
a) You do not drive over 80km/h. c) if (2x + 3 = 5) AND (3x + 4 = 7) then x := x + 1
b) You drive over 80km/h, but you do not get a d) if (x + 1 = 2) XOR (x + 2 = 3) then x := x + 1
speeding ticket. e) if x < 2 then x := x + 1
c) You will get a speeding ticket if you drive over
80km/h. 10. Express the statement “You can see the movie
d) If you do not drive over 80km/h, then you will not only if you are over 18 years old or you have the
get a speeding ticket. permission of a parent.” in terms of the prepositions –
e) Driving over 80km/h is sufficient for getting a m: “You can see the movie,”
speeding ticket. a: “You are over 18 years old,”
f ) You get a speeding ticket, but you do not drive p: “You have the permission of a parent.”
over 80km/h.
g) Whenever you get a speeding ticket, you are 11. Express the statement “to use the wireless network
driving over 80km/h. 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 f ) ∃x∀y(y ≠ 0 → xy = 1)
connection but has not chatted with anyone else in g) ∀x∃y(x + y = 1)
your class. h) ∃x∃y(x + 2y = 2 ∧ 2x + 4y = 5)
l) There are two students in your class who have i) ∀x∃y(x + y = 2 ∧ 2x − y = 1)
not chatted with each other over the Internet. j) ∀x∀y∃z(z = (x + y)/2)
m) There is a student in your class who has chatted
with everyone in your class over the Internet. 38. Suppose the domain of the propositional function
n) There are at least two students in your class who P(x, y) consists of pairs x and y, where x is 1, 2, or 3
have not chatted with the same person in your and y is 1, 2, or 3. Write out these propositions using
class. disjunctions and conjunctions.
o) There are two students in the class who between a) ∀x∀yP(x, y) b) ∃x∃yP(x, y)
them have chatted with everyone else in the class. c) ∃x∀yP(x, y) d) ∀y∃xP(x, y)

36. Express each of these system specifications using 39. Express the negations of each of these statements
predicates, quantifiers, and logical connectives, if so that all negation symbols immediately precede
necessary. predicates.
a) At least one console must be accessible during a) ∀x∃y∀zT (x, y, z)
every fault condition. b) ∀x∃yP(x, y) ∨ ∀x∃yQ(x, y)
b) The e-mail address of every user can be c) ∀x∃y(P(x, y) ∧ ∃zR(x, y, z))
retrieved whenever the archive contains at least d) ∀x∃y(P(x, y) → Q(x, y))
one message sent by every user on the system.
c) For every security breach there is at least one 40. Find a counterexample, if possible, to these
mechanism that can detect that breach if and only statements, where the domain for all variables consists
if there is a process that has not been compromised. of all integers.
d) There are at least two paths connecting every a) ∀x∀y(x2 = y2 → x = y)
two distinct endpoints on the network.
b) ∀x∃y(y2 = x)
e) No one knows the password of every user on the
c) ∀x∀y(xy ≥ x)
system except for the system administrator, who
knows all passwords.
41. Establish the truth or falsity of the compound
37. Determine the truth value of each of these propositional statement given below
statements if the domain of each variable consists of (𝑝 ∨ 𝑞) ∧ ~ ~𝑝 ∧ (~𝑞 ∨ ~𝑟) ∨ (~𝑝 ∧ ~𝑞) ∨ (~𝑝 ∧ ~𝑟)
all real numbers.
a) ∀x∃y(x2 = y) 42. Convert the statement ~ 𝑝 ↔ 𝑞 ⟶ (𝑟 ∨ 𝑝) into
b) ∀x∃y(x = y2) DNF and PDNF form.
c) ∃x∀y(xy = 0)
d) ∃x∃y(x + y ≠ y + x)
e) ∀x(x ≠ 0 → ∃y(xy = 1))

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

Common questions

Powered by AI

Existential quantification (∃xP(x)) asserts that there exists at least one element in the domain for which the propositional function P(x) is true. In contrast, universal quantification (∀xP(x)) declares that the propositional function P(x) is true for every element in the domain. The key difference lies in the scope of truth claimed: existential quantification requires only a single instance of truth, while universal quantification demands uniform truth across the entire domain. Understanding this distinction is crucial in evaluating and forming logical arguments and predictions .

Predicates and quantifiers expand propositional logic from dealing with fixed truths of atomic propositions to expressing more generalized and nuanced statements. Predicates allow statements to incorporate variables and attribute properties, while quantifiers like existential (∃) and universal (∀) provide the framework to express these predicates across domains, capturing a wider range of logical relationships. This increased expressive power is essential in various domains including computer science and linguistics to model real-world systems and reasoning more accurately .

Truth tables are particularly useful when analyzing logical statements to clearly visualize all possible truth values that the components of a logical expression can take. They systematically outline the output of different logical combinations, identifying tautologies, contradictions, and contingencies. This method is especially beneficial in validating logical equivalences and proving the consistency or satisfiability of logical formulas .

Logical equivalences involving conditional (p → q) and bi-conditional (p ↔ q) statements provide tools for transforming and simplifying propositions, making them easier to evaluate or prove. Equivalences such as transforming p → q into ~p ∨ q or p ↔ q into (p → q) ∧ (q → p) allow complex relationships to be broken down into simpler expressions. This transformation is invaluable in proofs and logical problem-solving as it offers alternative pathways to arrive at conclusions, often reducing complex biological or computational problems to more straightforward tasks .

To convert ~(p ∧ q) into an equivalent form, one should apply De Morgan's Laws, which state that the negation of a conjunction is equivalent to the disjunction of their negations. Therefore, ~(p ∧ q) can be converted to ~p ∨ ~q. De Morgan's Laws are fundamental in transforming negated compound statements into forms that may be simpler to analyze or use for further logical operations .

To determine whether a compound proposition is a tautology, contradiction, or contingency, one would construct a truth table that evaluates the truth value of the proposition under all possible combinations of the truth values of its components. A tautology will have all true values in the final column of its truth table, indicating it is always true. A contradiction will have all false values, indicating it is always false. A contingency will display a mix of true and false values, indicating that its truth value varies depending on the input values .

Bitwise operations are fundamental in computer systems for manipulating bits in data representation and processing tasks. They function similarly to logical operations but are applied bit-by-bit over binary representations of data. Operations such as BITWISE AND, OR, NOT, and XOR mirror their logical counterparts by being used in various low-level programming contexts, such as masking, setting, or toggling certain bits. This level of operation allows computers to perform efficient arithmetic and logical calculations, enhancing processing speed and resource utility .

The contrapositive of a conditional statement "p → q" is "~q → ~p" and is logically equivalent to the original statement. This means both the contrapositive and the original statement always share the same truth value in any logical analysis. This is significant in proofs, especially in mathematics, allowing one to prove a statement by proving its contrapositive, often simplifying the proof process by providing an alternate path that might be easier to establish .

Logical connectives are crucial in forming compound propositions because they enable multiple simpler propositions to be combined into a single, comprehensive expression. Connectives such as AND (∧), OR (∨), NOT (~), and IMPLIES (→) join propositions, detailing the logical relationships between them. For example, if p is "It is raining," and q is "I will carry an umbrella," the compound proposition p → q, meaning "If it is raining, then I will carry an umbrella," is formed using a conditional connective. This establishes a causal or dependent relationship between the propositions .

Logical equivalences help simplify complex logical statements by providing a foundational set of operations that preserve truth values across transformations. By applying identities such as commutative, associative, or De Morgan's laws, as well as the laws specific to conditionals and bi-conditionals, one can restructure a logical statement into a simpler or more useful form without changing its truth value. This simplification is crucial in fields such as computer science and mathematics where efficient logical expression computations are needed .

You might also like