Suppose you are preparing class time table. You have three teachers (T1, T2 ad T3) and seven periods (P1, P2, P3, P4, P5, P6,P7).
WAP in C using Graph Data Structure to assign periods to these teachers keeping in mind the following conditions:
• The first period is to be assigned to T2 only.
• T2 should not engage the period after T1.
• T1 should not engage period after T3.
• No teacher should engage two continuous periods.
• Every Teacher should engage at least two periods and not more than the three periods.