180 likes | 213 Views
CPSC 331 Introduction to Algorithms. History Tour Marina L. Gavrilova. The Mystery of Algorithms. A History Tour Definition of Algorithms Problem solving: Problem Statement Assumptions Process Paradoxes. A Brief History Tour. Paleolithic people counted bones 30000 BC
E N D
CPSC 331 Introduction to Algorithms History Tour Marina L. Gavrilova
The Mystery of Algorithms • A History Tour • Definition of Algorithms • Problem solving: • Problem Statement • Assumptions • Process • Paradoxes
A Brief History Tour • Paleolithic people counted bones 30000 BC • Egypt (geometry, decimal system) 5000 BC • Middle East abacus 3500 BC • Babylonians: Pythagoras’s theorem is known, heights of pyramids and the distances to ships are computed, algebraic equations were solved (3000-1000 BC). • Pythagor – geometry basics, 500BC • Euclid – geometry, 300 BC
Brief History Tour Chinese: magic squares, Ptolemy (astrology) (90-150) Diophantus and Apollonius geometry (500) Fibonacci writes The Book of the Abacus, on arithmetic and algebra (1200) Ferma, Descartes, Pascal, Leibnitz (1600) Newton (physics), Euler (geometry) 1700 Lagrange (geometry), Gauss (algebra), Bubbage (computations), Poisson (probability), Mobius (surfaces) (1800) Hilbert (23 problems), Godel (inconsistency theorem), Einstein, Poincare 20th century
Algorithm Definition • Algorithm is a procedure that consists of a finite set of instructions which, given an input from some set of possible inputs, enable to obtain an output • Donald Knuth “Computer Science is the Study of Algorithms”
Some simple examples • Suppose you and I have the same amount of money. How much should I give you so that you have $10 more than I do? • A dealer bought a book for $7, sold for $8, bought for $9, sold for $10. How much profit did he make? • Solution provides an algorithm.
Assumptions • Each problem can be solved under a set of specific assumptions • Examples: • Weight is given in kilograms • Activity takes place on Earth (Newton’s laws apply) • When pouring the water into container, it does not evaporate Other examples ?
“Which one is older?” • Logical problem (Raymond Smullyan) A brother and a sister were asked who is older. The brothers said “I am older”. The sister said “I am younger”. At least one of them lied. Who is older? Under what assumption the solution works?
Solution • If we assume they cannot be of the same age, then they both lied and the sister is older.
A pizza puzzle • How do you cut a pizza onto 8 pieces with 3 cuts. What is the minimum number of slices you can get with 3 cuts? Which assumptions did you use?
Solution • piece is not necessarily should have a cheese on it (be the top one). • You can cut horizontally. • All cuts are distinct.
Logical problems • R. Smullyan “The riddle of Scheherazade” 1. Think of a yes/no question that will force you to tell the truth. 2. Think of a yes/no question that will force you to tell the truth.
Solutions Solution 1. Will you answer “Yes” to this question? Solution 2. Will you answer “No” to this question? • The first solution is obtained as a result of cognitive process. • The second solution can be obtained by analogy.
Problem solving • Applying specific rules • By analogy (similar problem) • Abstraction (generalization) • Intuition (non-ordinary solution)
The biggest assumption • “Math is perfect??” • In 1931 Kurt Godel came up with a startling discovery that mathematical truth can not be completely formalized. I.e. given the set of axioms and rules of inference there are some statements that cannot be proven true or false inside this system. • This is called: Incompleteness theorem
Paradoxes • This leads to paradoxes: • “This sentence is false” • “You have no reason to believe this sentence” • Do you believe it?
Sources • History of Mathematics http://www-groups.dcs.st-andrews.ac.uk/~history/Chronology/index.html • Fun Math http://www.cut-the-knot.com/content.html • R. Smullyan “The riddle of Scheherazade”