DISCRETE Mathematics With Automata: The Foundations: Representing Graphs and Graph Isomorphism
DISCRETE Mathematics With Automata: The Foundations: Representing Graphs and Graph Isomorphism
Proposition - is a declarative sentence that is either true or false, but not both.
2. 3. 4.
Sentences 1 and 2 are not propositions because they are not declarative sentences. Sentences 3 and 4 are not propositions because they are neither true nor false, since the variables in these sentences have not been assigned values.
The negation of a proposition can also be considered the result of the operation of the negation operator on a proposition.
p F
T
Connectives are the logical operators used to form new propositions from two or more existing propositions.
T
T
T
F
T
F
F
F
T
F
F
F
Solution:
The conjunction of these propositions, p ^ q, is the proposition Today is Friday and it is raining today. This proposition is true on rainy Fridays and is false on any day that is not a Friday and on Fridays when it does not rain.
T
T F F
T
F T F
T
T T F
Students who have taken calculus or computer science can take this class. Here, we mean that students who have taken both calculus and computer science can take the class, as well as the students who have taken only one of the two subjects.
Students who have taken calculus or computer science, but not both, can enroll in this class.
Here, we mean that students who have taken both calculus and a computer science course cannot take the class. Only those who have taken exactly one of the two courses can take the class.
Solution:
The disjunction of p and q, p V q, is the proposition Today is Friday or it is raining today. This proposition is true on any day that is either a Friday or a rainy day (including rainy Fridays). It is only false on days that are not Fridays when it also does not rain.
p T
T F F
q T
F T F
pq T
F T T
if x=0 before this statement is encountered? (The symbol := stands for assignment. The statement x := x+1 means the assignment of the value of x +1 to x.)
Solution:
Since 2+2=4 is true, the assignment statement x := x+1 is executed. Hence, x has the value 0+1 = 1 after this statement is encountered.
Solution:
Because q whenever p is one of the ways to express the implication p q, the original statement can be rewritten as If it is raining, then the home team wins.
The inverse is
If it is not raining, then the home team does not win. Only the contrapositive is equivalent to the original statement.
p
T T F F
q
T F T F
p q
T F T T
The last way of expressing the biconditional uses the abbreviation iff for if and only if.
4 5
You cannot ride the roller coaster if you are under 4 feet tall unless you are older than 16 years old.
Solution: There are many ways to translate this sentence into a logical expression. The simplest but least useful way is simply to represent the sentence by a single propositional variable, say, p.
If A is a knave, then because everything a knave says is false, As statement that B is a knight, that is, that q is true, is a lie, which means that q is false and B is also a knave. Furthermore, if B is a knave, then Bs statement that A and B are opposite types is a lie, which is consistent with both A and B being knaves. We can conclude that both A and B are knaves.
0
0
0
1
0
1
0
0
0
1
1
1
0
1
1
1
0
1
1
0