BACK

Excursion on Algorithm Categories

NEXT

Link to page defining "greedy algorithm:  http://www.nist.gov/dads/HTML/greedyalgo.html

Change.java        Making change:  an example of the "Greedy" algorithm — text copy.
Change.rtf           Hand-out — above code as single two-column page.
g.doc                  Write-up from the 2002 Pacific Northwest regional ACM International Collegiate Programming Contest (ICPC).

Knapsack.java    The knapsack problem, premier example of a "Greedy" algorithm — text copy.
Knapsack.rtf       Hand-out — above code as two two-column pages .
Knapsack.html    Figure to exemplify the knapsack problem, then code in browsable form.

BckClock.html    HTML copy of the article on backtracking for the clock face permutation problem (pdf version).
RolfePurdom.pdf  Article for the ACM SIGCSE (SIG on Computer Science Education) on an optimization (Word version).
e.doc                  Write-up from the 2002 Pacific Northwest regional ACM International Collegiate Programming Contest (ICPC).

BckClock.gif       Single solution for the N=6, MaxSum=11 clock face problem.


Enrichment Material

Two implementations of the clock face backtracking problem:
Cloque.java        Version using a queue of numbers in generating the permutations.
FacePerm.java    Optimized version using a vector of numbers and implementing other discussed optimizations.

The "Queens" problem is a standard example of a problem solved through backtracking.
Queens on a Chessboard: Making the Best of a Bad Situation   Conference presentation (1995 SCCS).
The Optimal Queens   A less technical discussion of the same question (pdf version).