Discrete Mathematics, Chapter 3: Algorithms
Richard Mayr
University of Edinburgh, UK
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 1 / 28
Discrete Mathematics, Chapter 3: Algorithms Richard Mayr - - PowerPoint PPT Presentation
Discrete Mathematics, Chapter 3: Algorithms Richard Mayr University of Edinburgh, UK Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 1 / 28 Outline Properties of Algorithms 1 The Growth of Functions 2
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 1 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 2 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 3 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 4 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 5 / 28
◮ If the middle element is strictly lower than the target, then the
◮ Otherwise, the search proceeds with the lower half of the list
◮ If target is equal to the single element in the list, then the position is
◮ Otherwise, 0 is returned to indicate that the element was not found. Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 6 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 7 / 28
1
2
3
4
5
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 8 / 28
◮ Finding a route between two cities with the smallest total mileage. ◮ Determining how to encode messages using the fewest possible
◮ Finding the fiber links between network nodes using the least
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 9 / 28
◮ The talk that starts earliest among those compatible with already
◮ The talk that is shortest among those already compatible? ◮ The talk that ends earliest among those compatible with already
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 10 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 11 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 12 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 13 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 14 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 15 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 16 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 17 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 18 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 19 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 20 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 21 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 22 / 28
◮ How much time does this algorithm use to solve a problem? ◮ How much computer memory does this algorithm use to solve a
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 23 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 24 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 25 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 26 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 27 / 28
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 3 28 / 28