CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler...
Transcript of CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler...
![Page 1: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/1.jpg)
CS 2800: Discrete Structures
Spring 2015
Sid ChaudhuriMike George
![Page 2: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/2.jpg)
Discrete Structures
wallippo.com
![Page 3: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/3.jpg)
Continuous Structures
miriadna.com
![Page 4: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/4.jpg)
A Discreet Structureindieflix.com
![Page 5: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/5.jpg)
A Discreet Structureindieflix.com
![Page 6: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/6.jpg)
Things we can count with the integers
ser4kids.com
![Page 7: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/7.jpg)
Things we can count with the integers
clipartpanda.com
![Page 8: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/8.jpg)
Prime Numbers
A number with exactly two divisors:1 and itself
2, 3, 5, 7, 11, 13, 17...
![Page 9: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/9.jpg)
PrimeNumbers
eldhughes.com, pleasureinlearning.com
![Page 10: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/10.jpg)
PrimeNumbers
pleasureinlearning.com
![Page 11: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/11.jpg)
How many prime numbers exist?
![Page 12: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/12.jpg)
How many prime numbers exist?
1,000?
![Page 13: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/13.jpg)
How many prime numbers exist?
1,000?1,000,000?
![Page 14: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/14.jpg)
How many prime numbers exist?
1,000?1,000,000?
An infinite number?
![Page 15: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/15.jpg)
How many prime numbers exist?
1,000?1,000,000?
An infinite number
![Page 16: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/16.jpg)
Euclid's Proof of Infinitude of Primes
(~300BC)
![Page 17: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/17.jpg)
Euclid's Proof of Infinitude of Primes
● Suppose there is a finite number of primes
![Page 18: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/18.jpg)
Euclid's Proof of Infinitude of Primes
● Suppose there is a finite number of primes● Then there is a largest prime, p
![Page 19: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/19.jpg)
Euclid's Proof of Infinitude of Primes
● Suppose there is a finite number of primes● Then there is a largest prime, p● Consider n = (1 × 2 × 3 × ... × p) + 1
![Page 20: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/20.jpg)
Euclid's Proof of Infinitude of Primes
● Suppose there is a finite number of primes● Then there is a largest prime, p● Consider n = (1 × 2 × 3 × ... × p) + 1
● n cannot be prime (p is the largest)
![Page 21: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/21.jpg)
Euclid's Proof of Infinitude of Primes
● Suppose there is a finite number of primes● Then there is a largest prime, p● Consider n = (1 × 2 × 3 × ... × p) + 1
● n cannot be prime (p is the largest)● Therefore it has a (prime) divisor < n
![Page 22: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/22.jpg)
Euclid's Proof of Infinitude of Primes
● Suppose there is a finite number of primes● Then there is a largest prime, p● Consider n = (1 × 2 × 3 × ... × p) + 1
● n cannot be prime (p is the largest)● Therefore it has a (prime) divisor < n
● But no number from 2 to p divides n
![Page 23: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/23.jpg)
Euclid's Proof of Infinitude of Primes
● Suppose there is a finite number of primes● Then there is a largest prime, p● Consider n = (1 × 2 × 3 × ... × p) + 1
● n cannot be prime (p is the largest)● Therefore it has a (prime) divisor < n
● But no number from 2 to p divides n● So n has a prime divisor greater than p
![Page 24: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/24.jpg)
Euclid's Proof of Infinitude of Primes
● Suppose there is a finite number of primes● Then there is a largest prime, p● Consider n = (1 × 2 × 3 × ... × p) + 1
● n cannot be prime (p is the largest)● Therefore it has a (prime) divisor < n
● But no number from 2 to p divides n● So n has a prime divisor greater than p
Contradiction!!!
![Page 25: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/25.jpg)
Discrete Structures
● Number theory● Proof systems● Sets, functions, relations● Counting and probability
![Page 26: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/26.jpg)
Bridges of Königsberg
Braun & Hogenberg, “Civitates Orbis Terrarum”, Cologne 1585. Photoshopped to clean up right side and add 7 th bridge.
![Page 27: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/27.jpg)
Bridges of Königsberg
Braun & Hogenberg, “Civitates Orbis Terrarum”, Cologne 1585. Photoshopped to clean up right side and add 7 th bridge.
![Page 28: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/28.jpg)
Bridges of Königsberg
Braun & Hogenberg, “Civitates Orbis Terrarum”, Cologne 1585. Photoshopped to clean up right side and add 7 th bridge.
![Page 29: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/29.jpg)
Bridges of Königsberg
Braun & Hogenberg, “Civitates Orbis Terrarum”, Cologne 1585. Photoshopped to clean up right side and add 7 th bridge.
![Page 30: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/30.jpg)
Bridges of Königsberg
Is there a city tour that crosseseach bridge exactly once?
Braun & Hogenberg, “Civitates Orbis Terrarum”, Cologne 1585. Photoshopped to clean up right side and add 7 th bridge.
![Page 31: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/31.jpg)
Bridges of Königsberg
Leonhard Euler(1707-1783)
Braun & Hogenberg, “Civitates Orbis Terrarum”, Cologne 1585. Photoshopped to clean up right side and add 7 th bridge.
![Page 32: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/32.jpg)
Bridges of Königsberg
A
Braun & Hogenberg, “Civitates Orbis Terrarum”, Cologne 1585. Photoshopped to clean up right side and add 7 th bridge.
![Page 33: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/33.jpg)
Bridges of Königsberg
B
A
Braun & Hogenberg, “Civitates Orbis Terrarum”, Cologne 1585. Photoshopped to clean up right side and add 7 th bridge.
![Page 34: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/34.jpg)
Bridges of Königsberg
B
A
C
Braun & Hogenberg, “Civitates Orbis Terrarum”, Cologne 1585. Photoshopped to clean up right side and add 7 th bridge.
![Page 35: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/35.jpg)
Bridges of Königsberg
B
A
C
D
Braun & Hogenberg, “Civitates Orbis Terrarum”, Cologne 1585. Photoshopped to clean up right side and add 7 th bridge.
![Page 36: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/36.jpg)
Bridges of Königsberg
B
A
C
D
Braun & Hogenberg, “Civitates Orbis Terrarum”, Cologne 1585. Photoshopped to clean up right side and add 7 th bridge.
![Page 37: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/37.jpg)
Bridges of Königsberg
B
A
C
D
Enter by new bridge,Leave by new bridge
Braun & Hogenberg, “Civitates Orbis Terrarum”, Cologne 1585. Photoshopped to clean up right side and add 7 th bridge.
![Page 38: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/38.jpg)
Bridges of Königsberg
B
A
C
D
Bridges have toform pairs
Braun & Hogenberg, “Civitates Orbis Terrarum”, Cologne 1585. Photoshopped to clean up right side and add 7 th bridge.
![Page 39: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/39.jpg)
Bridges of Königsberg
B
A
C
D
Odd # of bridgesto each landmass⇒ no solution!
Braun & Hogenberg, “Civitates Orbis Terrarum”, Cologne 1585. Photoshopped to clean up right side and add 7 th bridge.
![Page 40: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/40.jpg)
Bridges of Königsberg
● Cross each bridge once: Euler Path– Easy for a computer to calculate
● Visit each landmass once: Hamiltonian Path– Probably very hard for a computer to calculate– If you can find an efficient solution, you will get $1M
and undying fame (answers “P = NP?”)– (Will also break modern crypto, collapse the banking
system, revolutionize automated mathematics and science, bring about world peace...)
![Page 41: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/41.jpg)
You'll also be terrific at Minesweeper
baslerweb.com
![Page 42: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/42.jpg)
Discrete Structures
● Number theory● Proof systems● Sets, functions, relations● Counting and probability● Graph theory● Models of computation, automata, complexity
![Page 43: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/43.jpg)
This sentence is false.
![Page 44: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/44.jpg)
This sentence is false.If true, it is falseIf false, it is true
![Page 45: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/45.jpg)
This sentence is false.If true, it is falseIf false, it is true
![Page 46: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/46.jpg)
Discrete Structures
● Number theory● Proof systems● Sets, functions, relations● Counting and probability● Graph theory● Models of computation, automata, complexity● Logic● Decidability, computability
![Page 47: CS 2800: Discrete Structures · 2015-01-21 · Bridges of Königsberg Cross each bridge once: Euler Path – Easy for a computer to calculate Visit each landmass once: Hamiltonian](https://reader033.fdocuments.net/reader033/viewer/2022050414/5f8a9a4e11874053cf0b8b9e/html5/thumbnails/47.jpg)
warrenphotographic.co.uk, auntiedogmasgardenspot.wordpress.com