Lecture 1 Flashcards
a proposition is a “declarative sentence” that declares a fact that is either TRUE or FALSE .
we use letters to denote “propositional variables” or “sentential variables” to represent propositions.
………………. are formed from existing propositions using ……………..
- compound propositions
- logical operators.
……………………are logical operators that are used to form new propositions from two or more existing propositions.
connectives
p : “A student who has taken calculus can take this class”
q :“A student who has taken introductory computer
science can take this class.”
students who have taken both calculus and introductory computer science can take the class, as well as the students who have taken only one of the two subjects.
Hence, this statement can be expressed as ( …………. ), also called ………….., or the ………………of p and q.
- p ∨ q
- the inclusive or
- the disjunction of p and q
the connective “or” has two meanings :-
1) the inclusive or :- includes the case that both propositions could be true
2) the exclusive or :- excludes the case that both propositions could be true , i.e.:- true when only one of the propositions are true , not both.
p → q, is conditional statement(or…………….) where :-
p is called the ………… (or ………. or ……….) .
q is called the ……….. (or …………..).
-One way to view the logical conditional is to think of an obligation or contract.
“If I am elected, then I will lower taxes.”
If the politician is elected and does not lower taxes, then the politician has broken the campaign pledge.
- the only case in the truth table that gives false is when :- TRUE → FALSE
p : politician is elected. (TRUE )
q : lowered taxes. (FALSE)
- implication.
- hypothesis , antecedent, premise
- conclusion , consequence
p → q == NOT P OR Q
“q is NECESSARY for p”
“p is sufficient for q “ but NOT NECESSARY
the converse of P →q is ………….
and it is a false statement it is NOT equivalent to the original statement.
q →P
the contrapositive of P →q is ………..
Only the contrapositive is equivalent to the original statement.
¬q → ¬ P
the inverse of P →q is ………………
and it is a false statement it is NOT equivalent to the original statement.
¬ P → ¬ q
Find the converse, inverse, and contrapositive of
“It raining is a sufficient condition for my not going to town.”
P → q
p : It is raining
q : not go to town.
converse : q →P if i do not go to town then it is raining .
inverse : ¬ P → ¬ q if it is not raining then i will go to town
contrapositive : ¬q → ¬ P if i go to town then it is not raining
Find the converse, inverse, and contrapositive of
“The home team wins whenever it is raining.”
P → q : if it is raining , then the home team wins
p : it is raining
q : The home team wins
converse : q →P If the home team wins, then it is raining.
inverse : ¬ P → ¬ q If it is not raining, then the home team does not win.
contrapositive : ¬q → ¬ P If the home team does not win, then it is not raining.
P → q if i live in Cairo then i live in Egypt .
p : i live in Cairo
q : i live in Egypt .
- converse : q →P if i live in Egypt , then i live in Cairo .
- a converse is a reverse of the conditional statement.
- it is a false statement because i could be living in any other governate other than Cairo.
NOTE : if the converse of the implication was TRUE , then it flows both ways and it is a biconditional statement. p ↔ q
P → q if i live in Cairo then i live in Egypt .
p : i live in Cairo
q : i live in Egypt
- inverse : ¬ P → ¬ q if i don’t live in Cairo then i don’t live in Egypt .
- inverse is just a negation of the sentence.
- it is a false statement because i could be living in Egypt in any other governate other than Cairo .
NOTE : the inverse and the converse have the same truth value , if one is false , so is the other.
P → q if i live in Cairo then i live in Egypt .
p : i live in Cairo
q : i live in Egypt
- contrapositive : ¬q → ¬ P if i don’t live in Egypt ,then i don’t live in Cairo.
- contrapositive is a reverse negation of the conditional statement .
- it is a TRUE statement , because the conditional statement is also true , they both have the same truth value.
The biconditional statement p ↔ q is the
proposition “……………” or
“……………………..” or
“……………………….”
The biconditional statement p ↔ q is true
when p and q have ……………, and is false otherwise.
Biconditional statements are also called
…………….
- ” p if and only if q “
“ p is necessary and sufficient for q “
“ if p then q , and conversely “ - p and q have the same truth values
- bi-implications.
Two propositions are ……….. if they ALWAYS have the same truth value.
the conditional is equivalent to the ……….
equivalent
contrapositive
the rows in the truth table represents all the possible combinations of values for the atomic propositions.
this means that :-
with n atomic propositions,
we can construct ….. distinct (i.e., not equivalent) propositions.
2^n
Precedence of Logical Operators:-
1- NOT
2- AND
3- OR
4- IMPLICATION
5- BICONDITIONAL
A variable is called a ……….. if its value is either true or false & can be represented using a ……..
- Boolean variable , bit
System specifications should be ……….., that is, they should not contain conflicting requirements that could be used to derive a contradiction.
consistent
Translating English Sentences :-
“If I go to Harry’s or to the country, I will not go shopping.”
p: I go to Harry’s.
q: I go to the country.
r: I will go shopping.
(p ∨ q) → ¬ r
Translating English Sentences :-
“You cannot ride the roller coaster if you are under 4 feet tall unless you are older than 16 years old.”
q: “You can ride the roller coaster”
r: “You are under 4 feet tall”
s: “You are older than 16 years old”
r ^ ¬s → ¬q