Class scheduling


Published on

Graph Theory:

using Bipartite matching and Edge coloring

Published in: Education, Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Colored does not represent bipartite matching or edge coloring…it is used just to give clarity or avoid confusion
  • Simulate the example.
  • Simulate the example from my note
  • Class scheduling

    1. 1. Prepared ByNiaz Mohammad
    2. 2. Combinatorial problemClass Scheduling Linear ProgrammingClass Scheduling is a broad generalproblem which has been one of the prime Optimization Problemarea of research. There has been a lot ofalgorithms developed for this particular Genetic Algorithmproblem using different techniques asshown on the right. Constraint PropagationThis is a problem with so many variationsdue to various constraints that can be tiedto it. And this is why it is so hard and is Simulated Annealingconsidered as NP(Non-Polynomial)complete i.e. it does not have any Tabu Searchpolynomial time bound.However, approximate algorithm orheuristic approach can be taken to attain Greedy Algorithmsolution in a feasible time bound. Hill Climbing
    3. 3. Problem StatementDesign a simple class schedulewith no conflict between a setof teachers and a set ofcourses with the following setof constraints:i) No same courses can be taken by any teacher or batch for a given time slot.ii) Minimize the number of time slots required and prove that it is optimum.
    4. 4. My Class-scheduling ApproachI researched for this problem a lot and have foundnumerous articles, documents that were published onthis topic and have seen so many variants of this Bipartite Matchingproblem and also various approaches such as GA(geneticalgorithm), CSP (Constraint SatisfactionProblem), Combinatorial approaches have been taken.But for my purpose of creating or developing thesimplest form of this class-scheduling problem, I tried to Edge Coloringdevelop my own algorithm, it works !Well, for at least the specific example that Jolly madampresented in our class.I put the teachers and the courses into two independentsets and then created the Bipartite matching accordingto the matrix of number of courses taken by eachteacher. Draw the timetableSo, in a nutshell, the idea is to find the maximumBipartite matching among teacher & courses and thendo an edge coloring to find the time slot so that notwo edges coming out from a vertex have the samecolor.
    5. 5. Edge Coloring Model• Take bipartite graph with Teacher/Batch 21st 22nd 23rd 24th vertices for teachers and for RAJ 2 0 1 1 classes AR 1 1 0 0• Look for a coloring of the SA 0 0 2 1 edges such that no vertex SIS 0 2 0 2 has two incident edges with KMH 1 1 1 0 the same color.• What is the minimum number of colors needed? – Lower bound: maximum degree. (Interpretation!) – We can attain the lower bound with help of matching!!
    6. 6. A TheoremLet G be a bipartite graph withmaximum degree d. Then G has anedge coloring with d colors.  Step 1: Make G regular by adding vertices and edges.  Step 2: Repeatedly find a matching and remove it.
    7. 7. Edge coloring a regular graphSay G’ is regular of degree d.For i = 1 to d do  Find a perfect matching M in G’.  Give all edges in M color i.  Remove all edges in M from G’. (Note that G’ stays regular!)
    8. 8. Final stepTake the edge coloring c of G’. ColorG in the same way: G is subgraph ofG’.Time: carrying out d times a perfectmatching algorithm in a regulargraph:  O(nd3) if we use Schrijver’s algorithm.  Can be done faster by other algorithms.
    9. 9. My Algorithm1. Find the maximum number of degree(d) from the given bipartite Time Complexity: graph. O(nd3)2. Add vertex and edges so that it Where n is the number of becomes a d-regular bipartite vertices(in teacher’s set(t)) and d is graph. the maximum number of degree.3. Split if there are cycles in the given Bipartite graph until there are no cycle.4. For each color c from 1 to d Iteratively color different batch for set t ( the edges between them) with color c greedily.5. Represent it as final matrix which is the solution.