Unformatted text preview: he plane into two halfplanes:
Such
for all the points in one of them: ax + by > c, while
for all the points in the other, ax + by < c. Design and Analysis of Algorithms – Chapter 3 43 Convex hull brute force algorithm
a Algorithm: For each pair of points p1 and p2
For
determine whether all other points lie to the same
side of the straight line through p1 and p2, i.e. whether
ax+byc all have the same sign
ax+byc a Efficiency: Design and Analysis of Algorithms – Chapter 3 44 Convex hull brute force algorithm
a Algorithm: For each pair of points p1 and p2
For
determine whether all other points lie to the same
side of the straight line through p1 and p2, i.e.
whether ax+byc all have the same sign
whether a Efficiency: Θ (n3) Design and Analysis of Algorithms – Chapter 3 45 Exhaustive search: definition a A brute force solution to a problem involving
brute
search for an element with a special property,
usually among combinatorial objects such as a
permutations, combinations, or subsets of a set.
permutations, Design and Analysis of Algorithms – Chapter 3 46 Exhaustive search: method
a Construct a way of listing all potential solutions to
Construct
the problem in a systematic manner
the
• all solutions are eventually listed
• no solution is repeated a a Evaluate solutions one by one, perhaps
Evaluate
disqualifying infeasible ones and keeping track of
the best one found so far
the
When search ends, announce the winner Design and Analysis of Algorithms –...
View
Full Document
 Fall '12
 yinglu
 Algorithms, Graph Theory, Depthfirst search, mark w

Click to edit the document details