Exam 1 Review Sheet

Math for Liberal Studies – Spring 2008
Dr. Hamblin
Exam 1 Review Sheet
The first exam will be in class on Friday, February 29. The exam will cover all of Chapters 1, 2, and 3.
You will receive a list of algorithms from these chapters as they are stated in the textbook. You should
also bring a calculator to the exam, but notes, handouts, textbooks, and cell phones will not be allowed.
You should also refrain from the use of iPods or other electronic devices during the exam. Here is a list
of topics that will be covered.
Chapter 1
Definitions: graph, vertex, edge, Euler circuit, connected, valence
Determine whether or not a graph has an Euler circuit
Solve problems using Euler circuits: Chinese postman problem, for example
Eulerize a graph using the minimum possible number of edges
Chapter 2
Definitions: Hamiltonian circuit, minimum spanning tree, order-requirement graph, critical path
Brute-force method for finding Hamiltonian circuits
Applications of Hamiltonian circuits: Traveling Salesman Problem, for example
Nearest-neighbor algorithm
Sorted-edges algorithm
Kruskal’s algorithm
Find and interpret critical paths
Chapter 3
Understand the assumptions and basic structure of machine-scheduling problems
List-processing algorithm
Critical-path scheduling algorithm
Decreasing-time-list algorithm
Understand the basic structure of bin-packing problems
Bin packing algorithms: next fit, first fit, worst fit, best fit, next-fit decreasing, first-fit decreasing,
worst-fit decreasing, best-fit decreasing
Math for Liberal Studies – Spring 2008
Dr. Hamblin
Algorithms from Chapters 1 through 3
Here are the descriptions of the algorithms you will be responsible for on Exam 1. You will be given a
copy of this page at the exam.
Nearest-Neighbor Algorithm
Starting from the home city, first visit the nearest city, then visit the nearest city that has not already
been visited. We return to the start city when no other choice is available.
Sorted-Edges Algorithm
Start by sorting the edges in order of increasing cost. At each stage, select the edge of least cost that (1)
never requires that three edges meet at a vertex and (2) never closes up a circular tour that doesn’t
include all the vertices.
Kruskal’s Algorithm
Add links in order of cheapest cost so that no circuits form and so that every vertex belongs to some link
added.
List-Processing Algorithm
At a given time, assign to the lowest-numbered free processor the first task on the priority list that is
ready at that time and that hasn’t already been assigned to a processor.
Critical-Path Scheduling Algorithm
Repeat the following procedure:
1. Find a task that heads a critical (longest) path in the order-requirement graph. If there is a tie,
choose the task with the lower number.
2. Place the task found in Step 1 next on the priority list. (The first time through the process this
task will head the list.)
3. Remove the task found in Step 1 and the edges attached to it from the current orderrequirement graph, obtaining a new (modified) order-requirement graph.
4. If there are no vertices left in the new order-requirement graph, the procedure is complete; if
there are vertices left, go back to Step 1.
Decreasing-Time-List Algorithm
Sort the list of task times in decreasing order, then apply the list-processing algorithm.
Next Fit Algorithm
Proceed down the list of weights, putting weights into the current bin until you get a weight that does
not fit, and then close that bin and start a new bin. Continue in the same way until as many bins as
necessary are used.
Math for Liberal Studies – Spring 2008
Dr. Hamblin
First Fit Algorithm
Put the next weight into the first bin already opened that has room for this weight. If no such bin exists,
start a new bin.
Worst Fit Algorithm
Put the next weight into the bin already opened that has the most room for this weight. If no such bin
exists, start a new bin.
Best Fit Algorithm
Put the next weight into the bin already opened that has the least room for this weight. If no such bin
exists, start a new bin.
Next-Fit Decreasing Algorithm
Sort the list of weights in decreasing order, then apply the next fit algorithm.
First-Fit Decreasing Algorithm
Sort the list of weights in decreasing order, then apply the first fit algorithm.
Worst-Fit Decreasing Algorithm
Sort the list of weights in decreasing order, then apply the worst fit algorithm.
Best-Fit Decreasing Algorithm
Sort the list of weights in decreasing order, then apply the best fit algorithm.