CSCI 1900 Discrete Structures

Содержание

Слайд 2

Statement of Proposition

Statement of proposition – a declarative sentence that is either

Statement of Proposition Statement of proposition – a declarative sentence that is
true or false, but not both
Examples:
The earth is round: statement that is true 2+3=5: statement that is true
Do you speak English? This is a question, not a statement

Слайд 3

More Examples of Statements of Proposition

3-x=5: is a declarative sentence, but not

More Examples of Statements of Proposition 3-x=5: is a declarative sentence, but
a statement since it is true or false depending on the value of x
Take two aspirins: is a command, not a statement
The temperature on the surface of the planet Venus is 800oF: is a declarative statement of whose truth is unknown to us
The sun will come out tomorrow: a statement that is either true or false, but not both, although we will have to wait until tomorrow to determine the answer

Слайд 4

Logical Connectives and Compound Statements

x, y, z, … denote variables that can

Logical Connectives and Compound Statements x, y, z, … denote variables that
represent real numbers
p, q, r,… denote prepositional variables that can be replaced by statements.
p: The sun is shining today
q: It is cold

Слайд 5

Negation

If p is a statement, the negation of p is the statement

Negation If p is a statement, the negation of p is the
not p
Denoted ~p
If p is true, ~p is false
If p is false, ~p is true
~p is not actually connective, i.e., it doesn’t join two of anything
not is a unary operation for the collection of statements and ~p is a statement if p is

Слайд 6

Examples of Negation

If p: 2+3 >1 then If ~p: 2+3 <1
If q:

Examples of Negation If p: 2+3 >1 then If ~p: 2+3 If
It is cold then ~q: It is not the case that it is cold, i.e., It is not cold.

Слайд 7

Conjunction

If p and q are statements, then the conjunction of p and

Conjunction If p and q are statements, then the conjunction of p
q is the compound statement “p and q”
Denoted p∧q
p∧q is true only if both p and q are true
Example:
p: ETSU parking permits are expensive
q: ETSU has plenty of parking
p∧q = ?

Слайд 8

Disjunction

If p and q are statements, then the disjunction of p and

Disjunction If p and q are statements, then the disjunction of p
q is the compound statement “p or q”
Denoted p∨q
p∨q is true if either p or q are true
Example:
p: I am a male
q: I am under 40 years old
p∨q = ?

Слайд 9

Exclusive Disjunction

If p and q are statements, then the exclusive disjunction is

Exclusive Disjunction If p and q are statements, then the exclusive disjunction
the compound statement, “either p or q may be true, but both are not true at the same time.”
Example:
p: It is daytime
q: It is night time
p∨q (in the exclusive sense) = ?

Слайд 10

Inclusive Disjunction

If p and q are statements, then the inclusive disjunction is

Inclusive Disjunction If p and q are statements, then the inclusive disjunction
the compound statement, “either p or q may be true or they may both be true at the same time.”
Example:
p: It is cold
q: It is night time
p∨q (in the inclusive sense) = ?

Слайд 11

Exclusive versus Inclusive

Depending on the circumstances, some disjunctions are inclusive and some

Exclusive versus Inclusive Depending on the circumstances, some disjunctions are inclusive and
of exclusive.
Examples of Inclusive
“I have a dog” or “I have a cat”
“It is warm outside” or “It is raining”
Examples of Exclusive
Today is either Tuesday or it is Thursday
Pat is either male or female

Слайд 12

Compound Statements

A compound statement is a statement made from other statements
For n

Compound Statements A compound statement is a statement made from other statements
individual propositions, there are 2n possible combinations of truth values
A truth table contains 2n rows identifying the truth values for the statement represented by the table.
Use parenthesis to denote order of precedence
∧ has precedence over ∨

Слайд 13

Truth Tables are Important Tools for this Material!

Truth Tables are Important Tools for this Material!

Слайд 14

Compound Statement Example (p ∧ q) ∨ (~p)

Compound Statement Example (p ∧ q) ∨ (~p)

Слайд 15

Quantifiers

Back in Section 1.1, a set was defined {x | P(x)}
For an

Quantifiers Back in Section 1.1, a set was defined {x | P(x)}
element t to be a member of the set, P(t) must evaluate to “true”
P(x) is called a predicate or a propositional function

Слайд 16

Computer Science Functions

if P(x), then execute certain steps
while Q(x), do specified actions

Computer Science Functions if P(x), then execute certain steps while Q(x), do specified actions

Слайд 17

Universal quantification of a predicate P(x)

Universal quantification of predicate P(x) = For

Universal quantification of a predicate P(x) Universal quantification of predicate P(x) =
all values of x, P(x) is true
Denoted ∀x P(x)
The symbol ∀ is called the universal quantifier
The order in which multiple quantifications are considered does not affect the truth value (e.g., ∀x ∀y P(x,y) ≡ ∀y ∀x P(x,y) )

Слайд 18

Examples:

P(x): -(-x) = x
This predicate makes sense for all real numbers x.
The

Examples: P(x): -(-x) = x This predicate makes sense for all real
universal quantification of P(x), ∀x P(x), is a true statement, because for all real numbers, -(-x) = x
Q(x): x+1<4
∀x Q(x) is a false statement, because, for example, Q(5) is not true

Слайд 19

Existential quantification of a predicate P(x)

Existential quantification of a predicate P(x) is

Existential quantification of a predicate P(x) Existential quantification of a predicate P(x)
the statement “There exists a value of x for which P(x) is true.”
Denoted ∃x P(x)
Existential quantification may be applied to several variables in a predicate
The order in which multiple quantifications are considered does not affect the truth value

Слайд 20

Applying both universal and existential quantification

Order of application does matter
Example: Let A

Applying both universal and existential quantification Order of application does matter Example:
and B be n x n matrices
The statement ∀A ∃B A + B = In
Reads “for every A there is a B such that A + B = In”
Prove by coming up for equations for bii and bij (j≠i)
Now reverse the order: ∃B ∀A A + B = In
Reads “there exists a B such that for all A A + B = In”
THIS IS FALSE!

Слайд 21

Assigning Quantification to Proposition

Let p: ∀x P(x)
The negation of p is false

Assigning Quantification to Proposition Let p: ∀x P(x) The negation of p
when p is true and true when p is false
For p to be false, there must be at least one value of x for which P(x) is false.
Thus, p is false if ∃x ~P(x) is true.
If ∃x ~P(x) is false, then for every x, ~P(x) is false; that is ∀x P(x) is true.

Слайд 22

Okay, what exactly did the previous slide say?

Assume a statement is made that

Okay, what exactly did the previous slide say? Assume a statement is
“for all x, P(x) is true.”
If we can find one case that is not true, then the statement is false.
If we cannot find one case that is not true, then the statement is true.
Example: ∀ positive integers, n, P(n) = n2 + 41n + 41 is a prime number.
This is false because ∃ an integer resulting in a non-prime value, i.e., ∃n such that P(n) is false.

Слайд 23

Discrete Structures

Conditional Statements Section 2.2

Discrete Structures Conditional Statements Section 2.2

Слайд 24

Conditional Statement/Implication

"if p then q"
Denoted p ⇒ q
p is called the antecedent

Conditional Statement/Implication "if p then q" Denoted p ⇒ q p is
or hypothesis
q is called the consequent or conclusion
Example:
p: I am hungry q: I will eat
p: It is snowing q: 3+5 = 8

Слайд 25

Conditional Statement/Implication (continued)

In English, we would assume a cause-and-effect relationship, i.e., the

Conditional Statement/Implication (continued) In English, we would assume a cause-and-effect relationship, i.e.,
fact that p is true would force q to be true.
If “it is snowing,” then “3+5=8” is meaningless in this regard since p has no effect at all on q
At this point it may be easiest to view the operator “⇒” as a logic operationsimilar to AND or OR (conjunction or disjunction).

Слайд 26

Truth Table Representing Implication

If viewed as a logic operation, p ⇒ q

Truth Table Representing Implication If viewed as a logic operation, p ⇒
can only be evaluated as false if p is true and q is false
This does not say that p causes q
Truth table

Слайд 27

Examples where p ⇒ q is viewed as a logic operation

If p

Examples where p ⇒ q is viewed as a logic operation If
is false, then any q supports p ⇒ q is true.
False ⇒ True = True
False ⇒ False = True
If “2+2=5” then “I am the king of England” is true

Слайд 28

Converse and contrapositive

The converse of p ⇒ q is the implication that

Converse and contrapositive The converse of p ⇒ q is the implication
q ⇒ p
The contrapositive of p ⇒ q is the implication that ~q ⇒ ~p

Слайд 29

Converse and Contrapositive Example

Example: What is the converse and contrapositive of p:

Converse and Contrapositive Example Example: What is the converse and contrapositive of
"it is raining" and q: I get wet?
Implication: If it is raining, then I get wet.
Converse: If I get wet, then it is raining.
Contrapositive: If I do not get wet, then it is not raining.

Слайд 30

Equivalence or biconditional

If p and q are statements, the compound statement p

Equivalence or biconditional If p and q are statements, the compound statement
if and only if q is called an equivalence or biconditional
Denoted p ⇔ q

Слайд 31

Equivalence Truth table

The only time that the expression can evaluate as true

Equivalence Truth table The only time that the expression can evaluate as
is if both statements, p and q, are true or both are false

Слайд 32

Proof of the Contrapositive

Compute the truth table of the statement (p

Proof of the Contrapositive Compute the truth table of the statement (p
⇒ q) ⇔ (~q ⇒ ~p)

Слайд 33

Tautology and Contradiction

A statement that is true for all of its propositional

Tautology and Contradiction A statement that is true for all of its
variables is called a tautology. (The previous truth table was a tautology.)
A statement that is false for all of its propositional variables is called a contradiction or an absurdity

Слайд 34

Contingency

A statement that can be either true or false depending on its

Contingency A statement that can be either true or false depending on
propositional variables is called a contingency
Examples
(p ⇒ q) ⇔ (~q ⇒ ~p) is a tautology
p ∧ ~p is an absurdity
(p ⇒ q) ∧ ~p is a contingency since some cases evaluate to true and some to false.

Слайд 35

Contingency Example

The statement (p ⇒ q) ∧ (p ∨ q) is a

Contingency Example The statement (p ⇒ q) ∧ (p ∨ q) is a contingency
contingency

Слайд 36

Logically equivalent

Two propositions are logically equivalent or simply equivalent if p ⇔

Logically equivalent Two propositions are logically equivalent or simply equivalent if p
q is a tautology.
Denoted p ≡ q

Слайд 37

Example of Logical Equivalence

Columns 5 and 8 are equivalent, and therefore, p

Example of Logical Equivalence Columns 5 and 8 are equivalent, and therefore,
“if and only if” q

Слайд 38

Additional Properties (p ⇒ q) ≡ ((~p) ∨ q)

Additional Properties (p ⇒ q) ≡ ((~p) ∨ q)

Слайд 39

Additional Properties (p ⇒ q) ≡ (~q ⇒ ~p)

Additional Properties (p ⇒ q) ≡ (~q ⇒ ~p)

Слайд 40

CSCI 1900 Discrete Structures

Methods of Proof Reading: Kolman, Section 2.3

CSCI 1900 Discrete Structures Methods of Proof Reading: Kolman, Section 2.3

Слайд 41

Past Experience

Up to now we’ve used the following methods to write proofs:
Used

Past Experience Up to now we’ve used the following methods to write
direct proofs with generic elements, definitions, and given facts
Used proof by cases such as when we used truth tables

Слайд 42

General Description of Process

p ⇒ q denotes "q logically follows from p“
Implication

General Description of Process p ⇒ q denotes "q logically follows from
may take the form (p1 ∧ p2 ∧ p3 ∧ … ∧ pn) ⇒ q
q logically follows from p1, p2, p3, …, pn

Слайд 43

General Description (continued)

The process is generally written as: p1 p2 p3 : : pn ∴q

General Description (continued) The process is generally written as: p1 p2 p3 : : pn ∴q

Слайд 44

Components of a Proof

The pi's are called hypotheses or premises
q is called

Components of a Proof The pi's are called hypotheses or premises q
the conclusion
Proof shows that if all of the pi's are true, then q has to be true
If result is a tautology, then the implication p ⇒ q represents a universally correct method of reasoning and is called a rule of inference

Слайд 45

Example of a Proof based on a Tautology

If p implies q

Example of a Proof based on a Tautology If p implies q
and q implies r, then p implies r
p ⇒ q q ⇒ r ∴p ⇒ r
By replacing the bar under q ⇒ r with the “⇒”, the proof above becomes ((p ⇒ q) ∧ (q ⇒ r)) ⇒ (p ⇒ r)
The next slide shows that this is a tautology and therefore is universally valid.

Слайд 46

Tautology Example (continued)

Tautology Example (continued)

Слайд 47

Equivalences

Some mathematical theorems are equivalences, i.e., p ⇔ q.
The proof of such

Equivalences Some mathematical theorems are equivalences, i.e., p ⇔ q. The proof
a theorem is equivalent with proving both p ⇒ q and q ⇒ p

Слайд 48

modus ponens form (the method of asserting):

p p ⇒ q ∴q
Example:
p: a man

modus ponens form (the method of asserting): p p ⇒ q ∴q
used the toilet
q: the toilet seat is up
p ⇒ q: If a man used the toilet, the seat was left up
Supported by the tautology (p ∧ (p ⇒ q)) ⇒ q

Слайд 49

modus ponens (continued)

modus ponens (continued)

Слайд 50

Invalid Conclusions from Invalid Premises

Just because the format of the argument is

Invalid Conclusions from Invalid Premises Just because the format of the argument
valid does not mean that the conclusion is true. A premise may be false. For example: Acorns are money If acorns were money, no one would have to work ∴No one has to work
Argument is valid since it is in modus ponens form
Conclusion is false because premise p is false

Слайд 51

Invalid Conclusion from Invalid Argument

Sometimes, an argument that looks like modus ponens

Invalid Conclusion from Invalid Argument Sometimes, an argument that looks like modus
is actually not in the correct form. For example:
If tuition was free, enrollment would increase Enrollment increased ∴Tuition is free
Argument is invalid since its form is:
p ⇒ q q ∴p

Слайд 52

Invalid Argument (continued)

Truth table shows that this is not a tautology:

Invalid Argument (continued) Truth table shows that this is not a tautology:

Слайд 53

Indirect Method

Another method of proof is to use the tautology: (p ⇒ q)

Indirect Method Another method of proof is to use the tautology: (p
⇔ (~q ⇒ ~p)
The form of the proof is: ~q ~q ⇒ ~p ∴p

Слайд 54

Indirect Method Example

p: My e-mail address is available on a web site
q:

Indirect Method Example p: My e-mail address is available on a web
I am getting spam
p ⇒ q: If my e-mail address is available on a web site, then I am getting spam
~q ⇒ ~p: If I am not getting spam, then my e-mail address must not be available on a web site
This proof says that if I am not getting spam, then my e-mail address is not on a web site.

Слайд 55

Another Indirect Method Example

Prove that if the square of an integer is

Another Indirect Method Example Prove that if the square of an integer
odd, then the integer is odd too.
p: n2 is odd
q: n is odd
~q ⇒ ~p: If n is even, then n2 is even.
If n is even, then there exists an integer m for which n = 2×m. n2 therefore would equal (2×m)2 = 4×m2 which must be even.

Слайд 56

Proof by Contradiction

Another method of proof is to use the tautology (p

Proof by Contradiction Another method of proof is to use the tautology
⇒ q) ∧ (~q) ⇒ (~p)
The form of the proof is: p ⇒ q ~q ∴~p
Имя файла: CSCI-1900-Discrete-Structures.pptx
Количество просмотров: 26
Количество скачиваний: 0