Slides for CISC 2315: Discrete Structures Chapters 1 - 3
description
Transcript of Slides for CISC 2315: Discrete Structures Chapters 1 - 3
![Page 1: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/1.jpg)
Slides for CISC 2315: Discrete StructuresChapters 1 - 3
CISC 2315 Discrete StructuresProfessor William G. Tanner, Jr.SPRING 2010
Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability, 2010, 3rd Edition, Jones & Bartlett Computer Science, ISBN 0-7637-1843-2.
![Page 2: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/2.jpg)
Chapter 1Section 1.1
CISC 2315 Discrete StructuresWilliam G. Tanner, Jr.
Spring 2010
Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability, 2010, 3rd Edition, Jones & Bartlett Computer Science, ISBN 0-7637-1843-2.
![Page 3: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/3.jpg)
A Proof PrimerA proof is a demonstration that some statement is true. We normally demonstrate proofs by writing English sentences
mixed with symbols.
We’ll consider statements that are either true or false. If A and B be are statements, then “not A,” “A and B,” and “A or B,” are called negation, conjunction, and disjunction, respectively. “not A” is opposite in truth value from A. “A and B” is true exactly when both A and B are true “A or B” is true except when both A and B are false.
A B if A then B if not B then not AT T T TT F F FF T T TF F T T
Conditionals: “if A then B” (or “A implies B”) is a conditional statement with hypothesis A and conclusion B. It’s contrapositive is “if not B then not A” and it’s converse is “if B then A”. Statements with the same truth table are said to be equivalent. The table shows that a conditional and it’s contrapositive are equivalent. A conditional is vacuously true if its hypothesis is false. A conditional is trivially true if its conclusion is true.
Proof Techniques: We’ll give sample proofs about numbers. Here are some definitions.• integers: …, -2, -1, 0, 1, 2, …• odd integers: …, -3, -1, 1, 3, … (have the form 2k + 1 for some integer k).• even integers:…, -4, -2, 0, 2, 4, … (have the form 2k for some integer k).• m | n (read m divides n) if m ≠ 0 and n = km for some integer k.• p is prime if p > 1 and its only divisors are 1 and p.
Section 1.1 Proof Primer
![Page 4: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/4.jpg)
Section 1.1 Proof Primer (cont)Exhaustive Checking
Some statements can be proven by exhaustively checking a finite number of cases.
Example 1. There is a prime number between 200 and 220.Proof: Check exhaustively and find that 211 is prime. QED. (quod erat demonstrandum)
Example 2. Each of the numbers 288, 198, and 387 is divisible by 9.Proof: Check that 9 divides each of the numbers. QED.
Conditional ProofMost statements we prove are conditionals. We start by assuming the hypothesis is true. Then we try to find a statement that follows from the hypothesis and/or known facts. We continue in this manner until we reach the conclusion.
Example 3. If x is odd and y is even then x – y is odd.Proof: Assume x is odd and y is even. Then x = 2k + 1 and y = 2m for some integers k and m. So we
have x – y = 2k + 1 – 2m = 2(k – m) + 1, which is an odd integer since k – m is an integer. QED.
Example 4. If x is odd then x2 is odd.Proof: Assume x is odd. Then x = 2k + 1 for some integer k. So we have
x2 = (2k + 1) 2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1, which is an odd integer since 2k2 + 2k is an integer. QED.
![Page 5: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/5.jpg)
Section 1.1 Proof Primer (cont)
Example 5 If x is even then x2 is even.Proof: Class do as one minute quiz.Example 6 If x2 is odd then x is odd.Proof: The contrapositive of this statement is “if x is even, then x2 is even,” which is
true by Example 5. QED.Example 7 If x2 is even then x is even.Proof: This is the contrapositive of Example 4, which has been shown to be true. QED.
If And Only If (Iff) ProofsA statement of the form “A if and only if B” means “A implies B” and “B implies A.” So there are actually two proofs to give. Sometimes the proofs can be written as a single proof of the form “A iff C iff D iff … iff B,” where each iff statement is clear from previous information.
Example 8 x is even if and only if x2 – 2x + 1 is odd.Proof: x is even iff x = 2k for some integer k (definition)
iff x – 1 = 2k – 1 for some integer k (algebra)iff x – 1 = 2(k – 1) + 1 for some integer k – 1 (algebra)iff x – 1 is odd (definition)iff (x – 1) 2 is odd (Examples 4 and 6)iff x2 – 2x + 1 is odd (algebra). QED.
![Page 6: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/6.jpg)
Section 1.1 Proof Primer (cont)Proof By Contradiction
A false statement is called a contradiction. For example, “S and not S” is a contradiction for any statement S. A truth table will show us that “if A then B,” is equivalent to “A and not B implies false.” So to prove “if A then B,” it suffices to assume A and also to assume not B, and then argue toward a false statement. This technique is called proof by contradiction.
Example 9. If x2 is odd then x is odd.Proof: Assume, BWOC, that x2 is odd and x is even. Then x = 2k for some integer k.
So we have x2 = (2k) 2 = 4k2 = 2(2k2),
which is even since 2k2 is an integer. So we have x2 is odd and x2 is even, a contradiction. So the statement is true. QED.
Example 10. If 2 | 5n then n is even.Proof: Assume, BWOC, that 2 | 5n and n is odd. Since 2 | 5n, we have 5n = 2d for some
integer d. Since n is odd, we have n = 2k + 1 for some integer k. Then we have2d = 5n = 5(2k + 1) = 10k + 5. So 2d = 10k + 5. When we solve for 5 to get
5 = 2d –10k = 2(d – 5k).But this says that 5 is an even number, a contradiction. So the statement is true.
QED.
![Page 7: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/7.jpg)
Chapter 1Section 1.2 Sets
CISC 2315 Discrete StructuresWilliam G. Tanner, Jr.
Spring 2010
Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability, 2010, 3rd Edition, Jones & Bartlett Computer Science, ISBN 0-7637-1843-2.
![Page 8: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/8.jpg)
Section 1.2 Sets (cont)
![Page 9: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/9.jpg)
Section 1.2 Sets (cont)
![Page 10: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/10.jpg)
Section 1.2 Sets (cont)
![Page 11: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/11.jpg)
Section 1.2 Sets
![Page 12: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/12.jpg)
Chapter 1Section 1.3 Ordered Structures
CISC 2315 Discrete StructuresWilliam G. Tanner, Jr.
Fall 2008
Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability, 2002, 2nd Edition, Jones & Bartlett Computer Science, ISBN 0-7637-1843-2.
![Page 13: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/13.jpg)
Section 1.3 Ordered Structures
![Page 14: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/14.jpg)
Section 1.3 Ordered Structures (cont)
![Page 15: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/15.jpg)
Section 1.3 Ordered Structures (cont)
![Page 16: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/16.jpg)
Section 1.3 Ordered Structures (cont)
![Page 17: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/17.jpg)
Chapter 1Section 1.4 Graphs & Trees
CISC 2315 Discrete StructuresWilliam G. Tanner, Jr.
Spring 2010
Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability, 2010, 3rd Edition, Jones & Bartlett Computer Science, ISBN 0-7637-1843-2.
![Page 18: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/18.jpg)
Section 1.4 Graphs & Trees
![Page 19: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/19.jpg)
Section 1.4 Graphs & Trees (cont)
![Page 20: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/20.jpg)
Section 1.4 Graphs & Trees (cont)
![Page 21: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/21.jpg)
Section 1.4 Graphs & Trees (cont)
![Page 22: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/22.jpg)
Chapter 2Section 2.1 Facts about Functions
CISC 2315 Discrete StructuresWilliam G. Tanner, Jr.
Spring 2010
Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability, 2010, 3rd Edition, Jones & Bartlett Computer Science, ISBN 0-7637-1843-2.
![Page 23: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/23.jpg)
Section 2.1 Facts about Functions
![Page 24: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/24.jpg)
Section 2.1 Facts about Functions
![Page 25: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/25.jpg)
Section 2.1 Facts about Functions
![Page 26: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/26.jpg)
Section 2.1 Facts about Functions
![Page 27: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/27.jpg)
Chapter 2 Section 2.2 Constructing Functions
CISC 2315 Discrete StructuresWilliam G. Tanner, Jr.
Spring 2010
Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability, 2010, 3rd Edition, Jones & Bartlett Computer Science, ISBN 0-7637-1843-2.
![Page 28: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/28.jpg)
Section 2.2 Constructing Functions
![Page 29: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/29.jpg)
Section 2.2 Constructing Functions
![Page 30: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/30.jpg)
Chapter 2 Section 2.3 Properties of Functions
CISC 2315 Discrete StructuresWilliam G. Tanner, Jr.
Spring 2010
Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability, 2010, 3rd Edition, Jones & Bartlett Computer Science, ISBN 0-7637-1843-2.
![Page 31: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/31.jpg)
Section 2.3 Properties of Functions
![Page 32: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/32.jpg)
Section 2.3 Properties of Functions
![Page 33: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/33.jpg)
Section 2.3 Properties of Functions
![Page 34: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/34.jpg)
Section 2.3 Properties of Functions
![Page 35: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/35.jpg)
Section 2.3 Properties of Functions
![Page 36: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/36.jpg)
Chapter 2 Section 2.4 Countability
CISC 2315 Discrete StructuresWilliam G. Tanner, Jr.
Spring 2010
Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability, 2010, 3rd Edition, Jones & Bartlett Computer Science, ISBN 0-7637-1843-2.
![Page 37: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/37.jpg)
Section 2.4 Countability
![Page 38: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/38.jpg)
Section 2.4 Countability
![Page 39: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/39.jpg)
Chapter 3 Section 3.1 Inductively Defined Sets
CISC 2315 Discrete StructuresWilliam G. Tanner, Jr.
Spring 2010
Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability, 2010, 3rd Edition, Jones & Bartlett Computer Science, ISBN 0-7637-1843-2.
![Page 40: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/40.jpg)
Section 3.1 Inductively Defined Sets
![Page 41: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/41.jpg)
Section 3.1 Inductively Defined Sets
![Page 42: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/42.jpg)
Section 3.1 Inductively Defined Sets
![Page 43: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/43.jpg)
Section 3.1 Inductively Defined Sets
![Page 44: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/44.jpg)
Chapter 3 Section 3.2 Recursive Functions
CISC 2315 Discrete StructuresWilliam G. Tanner, Jr.
Spring 2010
Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability, 2010, 3rd Edition, Jones & Bartlett Computer Science, ISBN 0-7637-1843-2.
![Page 45: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/45.jpg)
Section 3.2 Recursive Functions
![Page 46: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/46.jpg)
Section 3.2 Recursive Functions
![Page 47: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/47.jpg)
Section 3.2 Recursive Functions
![Page 48: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/48.jpg)
Section 3.2 Recursive Functions
![Page 49: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/49.jpg)
Section 3.2 Recursive Functions
![Page 50: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/50.jpg)
Section 3.2 Recursive Functions
![Page 51: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/51.jpg)
Chapter 3 Section 3.3 Grammars
CISC 2315 Discrete StructuresWilliam G. Tanner, Jr.
Spring 2010
Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability, 2010, 3rd Edition, Jones & Bartlett Computer Science, ISBN 0-7637-1843-2.
![Page 52: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/52.jpg)
Section 3.3 Grammars
![Page 53: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/53.jpg)
Section 3.3 Grammars
![Page 54: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/54.jpg)
Section 3.3 Grammars
![Page 55: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/55.jpg)
Section 3.3 Grammars
![Page 56: Slides for CISC 2315: Discrete Structures Chapters 1 - 3](https://reader036.fdocuments.in/reader036/viewer/2022062222/56816267550346895dd2d2f2/html5/thumbnails/56.jpg)
Section 3.3 Grammars