Brute-Force Search
Peter J. Haas INFO 150 Fall Semester 2019
Lecture 5 1/ 7
Brute-Force Search Peter J. Haas INFO 150 Fall Semester 2019 - - PowerPoint PPT Presentation
Brute-Force Search Peter J. Haas INFO 150 Fall Semester 2019 Lecture 5 1/ 7 Implications Algorithm Complexity Hard Problems and NP-Completeness Lecture 5 2/ 7 Algorithm Complexity Review of number sequences A sequence is a function
Lecture 5 1/ 7
Lecture 5 2/ 7
◮ Constant: an = 3 for all n [an = an−1 with a1 = 3] ◮ Linear: an = 3n + 2 [an = an−1 + 3 with a1 = 5] ◮ Quadratic: an = n2 [an = an−1 + 2n − 1 with a1 = 1] ◮ Exponential: an = 2n [an = 2an−1 with a1 = 2] ◮ Factorial: an = n! [an = nan−1 with a1 = 1]
Lecture 5 3/ 7
Lecture 5 4/ 7
Lecture 5 5/ 7
Lecture 5 6/ 7
Lecture 5 6/ 7
◮ n! possible orders in which to visit n points
◮ NP-complete in general, easy for small target numbers Lecture 5 6/ 7
Lecture 5 7/ 7