Exhaustive Search
Kasun Ranga Wijeweera
(Email: krw19870829@gmail.com)
Motivation
• Some problems involve searching through a vast number of
potential solutions to find an answer
• They do not seem to be amendable to solution by efficient
algorithms
What is an Efficient Algorithm?
• We have become conditioned to thinking that an algorithm
must be linear or run in time proportional to something like N
or N log N
• We generally consider quadratic algorithms are bad and cubic
algorithms are awful
• Even N50 algorithm would be pleasing because these problems
are believed to require exponential time
Travelling Salesman Problem
• Given a set of N cities, find the shortest route connecting them
all, with no city visited twice
• It is still unthinkable to solve an arbitrary instance of the
problem for N = 1000
• There seems to be no way to avoid having to check the length
of a very large number of possible tours
• Checking each and every tour is exhaustive search
What is Exhaustive Search?
• Also known as Brute Force Search or Generate and Test
Search
• First enumerate all possible candidates for the solution
• Then check whether each candidate satisfies the problem’s
statement
Reference
Any Questions?
Thank You!

Exhaustive Search

  • 1.
    Exhaustive Search Kasun RangaWijeweera (Email: krw19870829@gmail.com)
  • 2.
    Motivation • Some problemsinvolve searching through a vast number of potential solutions to find an answer • They do not seem to be amendable to solution by efficient algorithms
  • 3.
    What is anEfficient Algorithm? • We have become conditioned to thinking that an algorithm must be linear or run in time proportional to something like N or N log N • We generally consider quadratic algorithms are bad and cubic algorithms are awful • Even N50 algorithm would be pleasing because these problems are believed to require exponential time
  • 4.
    Travelling Salesman Problem •Given a set of N cities, find the shortest route connecting them all, with no city visited twice • It is still unthinkable to solve an arbitrary instance of the problem for N = 1000 • There seems to be no way to avoid having to check the length of a very large number of possible tours • Checking each and every tour is exhaustive search
  • 5.
    What is ExhaustiveSearch? • Also known as Brute Force Search or Generate and Test Search • First enumerate all possible candidates for the solution • Then check whether each candidate satisfies the problem’s statement
  • 6.
  • 7.
  • 8.