1 / 11

Scheduling

Scheduling. The purpose of my project is to schedule through programming an algorithm, max-flow min-cut, and to lay the foundation for programming the California Lutheran University Fall 2004 math schedule. Definitions.

omana
Download Presentation

Scheduling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Scheduling The purpose of my project is to schedule through programming an algorithm, max-flow min-cut, and to lay the foundation for programming the California Lutheran University Fall 2004 math schedule.

  2. Definitions • Max-flow Min-cut Algorithm: G is defined as a directed graph with two of its vertices designated. One as the source (s) of all flow, and the other, the sink (t), recipient of all flow. The flows are limited by weights on the edges. The weight (c) of an edge (e) is determined by c(e).

  3. More Definitions • Flow: The amount of input in the graph which is restricted by the weighted edges. • Vertices other then s and t: For all vertices not s or t the amount of flow going into the vertex is equal to the amount of flow out of the vertex.

  4. Chart

  5. Encoding • > with(networks): • > new(F): • > addvertex({s,S1,S2,S3,C1,C2,C3,C4,C5,t},F): • > addedge([[s,S1],[s,S2],[s,S3], [S1,C4],[S1,C2],[S1,C5],[S2,C1],[S2,C4],[S3,C1],[S3,C2],[S3,C3],[S3,C5],[C5,t],[C4,t],[C3,t],[C2,t],[C1,t]], weights=[5,3,4,7,7,7,7,7,7,7,7,7,5,2,1,3,1], F): • > draw(Linear([s],[S3,S2,S1],[C5,C4,C3,C2,C1],[t]),F); • > show(F); • > dinic(F,s,t,eset,comp, ); • > eset;comp;

  6. In Depth Look • Java Application • Java Applet Demos of Ford-Fulkerson's Algorithm

  7. Things to Think About • What happens if you swap the rows or columns of the table? • Is this the best algorithm for the scheduling problem? • Where can you go from here?

  8. Bibliography • Dantzig, G. Linear Programing and Extensions, Princeton University Press, Princeton, N.J., 1963. • Edmonds, J. and Karp, R., Theoretical improvements in algorithmic efficiency for network flow problems, J. ACM, Vol. 19, 1972, pp. 248-264. • Ikeda, Kenji. Java Applet Demos of Ford-Fulkerson's Algorithm. http://www-b2.is.tokushima-u.ac.jp/~ikeda/suuri/maxflow/MaxflowApp.shtml?demo4 . Friday, May 24, 2002. • Klein, M. and Tibrewala, R., Solving the shortest route problem, IIE Transactions, Vol.20, Num.2, Jun. 1988, pp. 210-212. • Ford, L. Jr. and Fulkerson, D., A simple algorithm for finding maximal network flows and an application to Hitchcook problem, Canadian J. Math., Vol. 9, 1957, pp.210-218. • Ford, L. Jr. and Fulkerson, D., Flows in Networks, Princeton University Press, Princeton, N.J., 1962. • Michaels, John G. and Rosen, Kenneth H., Applications of Discrete Mathematics, McGraw-Hill, Inc., New York, N.J., 1991.

  9. > restart; with(networks): with(combinat, choose): > new(F): > addvertex ({0, 1, 2, 3, 4, 5, 6}, F):classstart:=3: startvertex:=0: lastvertex:=6: > addedge([[0,1],[0,2], [1,3],[1,4],[2,3],[2,5],[5,6],[4,6],[3,6]], weights=[2,2,8,8,8,8,1,2,1],F): > draw(Linear([0], [2,1],[5,4,3],[6]),F); > show(F); > F(_Vweight)[0]:=[-100, 500]; > vweight([0,1],F); > sstop:=0;while sstop=0 dounexamined:=array(1..7,[0,1,2,3,4,5,lastvertex]);for i from 1 to lastvertex do F(_Vweight)[i]:=0;print(i,vweight([i],F));end do; # end of the for loopsstop:=1; #makes sure we only go through the while loop once: needs to be removedend do; # end of the while loop > unexamined[7]; > while F(_Vweight[lastvertex])=0 do > choose(M,unexamined); > i:=1; > end do; > while _Vweight(unexamined[i])=0 do > i:=i+1; > m:=unexamined[i]; > #remove unexamined[i] from unexamined; > #returns M; > x:=F(_Vweight[M])[2]; > end do; > choose(e); > #list neighbors of M > unexaminedMedges:= neighbors[M]; > E:= unexaminedMedges[1]; > remove unexaminedMedges[1] from unexaminedMedges; > unexamine; > chooseE:=proc(F)global F; local i,j, E;return(?)(E); > Programming Maple

  10. Why is it Max-Flow Min-Cut • To illustrate the Max-Flow Min-Cut theorem in the following diagram where the reachable vertices are colored yellow and the unreachable ones are colored red.   The green edges are full and the blue edge is empty.

  11. Min-Cut • Cuts- Break left and right vertices into top and bottom subsets. • Lemma: The size x+y+z of any cut is an upper bound on the size of the maximum matching. Where x is the top right vertices that are matched, y is the bottom left vertices that are not matched, and z is the edges from top left to bottom right.

More Related