
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Math 381 Dr. Gunnar Gunnarsson Solutions to HW #2 July 10, 2007
Formulate a general scheduling job in mathematical language to determine the optimal order of jobs to minimize the total time spent on the entire task. For starters, suppose that for each pair jobs i and j we know the time tij required to switch from i to j. Then relate this to the traveling salesman problem with tij relating to the distance from node i to node j. We could also specify an “origin” node corresponding to the clean state found at the beginning of the day and required at the end of the day.
First, to formulate the problem:
Suppose that there are n jobs, labeled 1, 2 , ..., n, and an “origin” state labeled 0. Suppose the time to switch between jobs i and j is tij (for 0 ≤ i, j ≤ n). We need not assume that tij = tji. We may model this nicely as a directed graph G as follows:
To illustrate, if there were two jobs, then G would look like this:
Now, the physical task of starting at the clean state, doing every job once, and then returning to the clean state corresponds to the mathematical task of starting at node 0, following a path (following the direction of the edges) that includes every node once, and then coming back to 0. This is known as an Hamiltonian cycle. For example, if n = 4 and the job order is 0 , 3 , 4 , 2 , 1 , 0, then this corresponds to following the path 0, 3 , 4 , 2 , 1 , 0 in G, with weight (total switching time) t 03 + t 34 + t 42 + t 21 + t 10. Thus the scheduling problem equivalent to the mathematical problem:
How does this relate to the Traveling Salesman Problem? The TSP is a special case of the job scheduling problem (JSP). If we let tij = tji = dij represent the distance between nodes i and j, then G collapses to an undirected graph with weights dij on each edge. Then solving the JSP involves finding the shortest path starting at 0, visiting every other node exactly once, and returning to 0, which is precisely the TSP. Thus any method to solve the JSP may also be used to solve the TSP as well.