Class scheduling
Upcoming SlideShare
Loading in...5
×
 

Class scheduling

on

  • 313 views

Graph Theory:

Graph Theory:

using Bipartite matching and Edge coloring

Statistics

Views

Total Views
313
Views on SlideShare
313
Embed Views
0

Actions

Likes
0
Downloads
4
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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 Class scheduling Presentation Transcript

  • Prepared ByNiaz Mohammad
  • 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
  • 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.
  • 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.
  • 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!!
  • 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.
  • 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!)
  • 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.
  • 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.