OOM Assignment 2 Solved

$ 24.99
Category:

Description

Part 1

Each course has a number of slots with durations. Like IOOM332C has 2 slots in the time table, one for 2 hours and one for 1 hour. The slots must be strictly such that the entire duration of the slot must be available as continuous. So a 2 hour class cannot be taken as 10:00-11:00 and 11:15-12:15. The theory, labs and tutorials are entered as separate courses with different course codes.

The allocation of time table for every course happens in a prioritized manner. All courses have a priority which is an integer. The lower is the numeric priority value, the more is the importance of the course. You first allocate the first slot associated with the highest priority course. Then you allocate the first slot associated with the second highest priority course and so on till all courses have one slot filled up. Then you allocate the 2nd slot associated with every course in the same order of priority, and so on.

Consider requested time slots are (for a 1 hour class) 10-11 and 11:15-12:15, while the requested day slots are T and W. Consider the total working load so far is M: 1, T: 3, W: 4, Th: 6, F: 2. So a typical day preference as per the time table is M(1), F(2), T(3), W(4), Th(6). The following are the attempts made to place a course:

Attempt 1, best time, in the order of day preference: (10-11, T), (10-11, W)
Attempt 2, best time, other than preferred day as per time table preference: (10-11, M), (10-11, F), (10-11, Th)
Attempt 3, 2nd best time, in the order of day preference: (11:15-12:15, T), (11:15-12:15, W)
Attempt 4, 2nd best time, other than preferred day as per time table preference: (11:15-12:15, M), (11:15-12:15, F), (11:15-
12:15, Th)
Attempt 5, best day, time as per time table preference, earliest first (T, 9-10), (T, 10-11), (T, 11:15-12:15), (T,
12:15-1:15), (T, 3-4), (T, 4-5), (T, 5-6),

(W, 9-10), (W, 10-11), (W, 11:15-12:15),
(W, 12:15-1:15), (W, 3-4), (W, 4-5), (W, 56)
Attempt 6, any day as per time table preference, any time as per time table preference (M, 9-10), (M, 10-11), (M, 11:15-12:15), (M,
12:15-1:15), (M, 3-4), (M, 4-5), (M, 5-6),

(F, 9-10), (F, 10-11), (F, 11:15-12:15), (F,
12:15-1:15), (F, 3-4), (F, 4-5), (F, 5-6)

(Th, 9-10), (Th, 10-11), (Th, 11:15-12:15),
(Th, 12:15-1:15), (Th, 3-4), (Th, 4-5), (Th, 56)

Input:
The first input is the number of test cases. Each test case starts with the number of courses for the batch followed by the details of all courses.

The slot details include the duration, day preference and time preference. NIL means no preference.

Output:

Sample Input
Number of test cases 1
Number of courses 9
Details of SMAT330C SMAT330C Maths Anand 3 2
Details for 1st slot 1 12 09001000
Details for 2nd slot 2 23 09001000
Details of IOOM332C IOOM332C ObjectOrientedMethodologies Vyas 1 2
Details for 1st slot 1 145 10000300
Details for 2nd slot 2 145 10000300
Details of IOOM332C-Lab IOOM332C-Lab ObjectOrientedMethodologiesLab Kala 2 1
Details for 1st slot 3 12 1000
Details of ITOC330C ITOC330C TheoryOfComputation Manish 5 2
Details for 1st slot 2 NIL 1115
Details for 2nd slot 1 NIL 1115
Details of ITOC330C-Tut ITOC330C-Tutorial TheoryOfComputationTutorial Manish 9 1
Details for 1st slot 2 NIL NIL
Details of EMIP332C EMIP332C Microprocessor Arun 6 2
Details for 1st slot 1 NIL NIL
Details for 2nd slot 2 NIL NIL
Details of EMIP332C-Lab EMIP332C-Lab MicroprocessorLab Arun 8 1
Details for 1st slot 3 1 NIL
Details of IOPS332C IOPS332C OperatingSystem Jagpreet 4 2
Details for 1st slot 2 24 030012151115
Details for 2nd slot 1 24 030012151115
Details of IOPS332C-Lab IOPS332C-Lab OperatingSystemLab Jagpreet 7 1
Details for 1st slot 3 NIL NIL

Sample Output
9:00-10:00 SMAT330C Maths Anand
10:00-11:00 IOOM332C ObjectOrientedMethodologies Vyas
3:00-6:00 IOOM332C-Lab ObjectOrientedMethodologiesLab Kala
9:00-11:00 ITOC330C-Tutorial TheoryOfComputationTutorial Manish
12:15-1:15 IOPS332C OperatingSystem Jagpreet
3:00-5:00 IOPS332C OperatingSystem Jagpreet
9:00-11:00 SMAT330C Maths Anand
11:15-1:15 ITOC330C TheoryOfComputation Manish
3:00-5:00 IOOM332C ObjectOrientedMethodologies Vyas
9:00-10:00 EMIP332C Microprocessor Arun
11:15-1:15 EMIP332C Microprocessor Arun
3:00-6:00 EMIP332C-Lab MicroprocessorLab Arun
11:15-12:15 ITOC330C TheoryOfComputation Manish
3:00-6:00 IOPS332C-Lab OperatingSystemLab Jagpreet

Explanation

Allocations to be done:

S. No. Course Priority Slot
Duration Day Preference Time
Preference
1. SMAT330C 3 1 M, T 09:00, 10:00
2. SMAT330C 3 2 T, W 09:00, 10:00
3. IOOM332C 1 1 M, Th, F 10:00, 03:00
4. IOOM332C 1 2 M, Th, F 10:00, 03:00
5. IOOM332C-Lab 2 3 M, T 10:00
6. ITOC330C 5 2 NIL 11:15
7. ITOC330C 5 1 NIL 11:15
8. ITOC330C-Tut 9 2 NIL NIL
9. EMIP332C 6 1 NIL NIL
10. EMIP332C 6 2 NIL NIL
11. EMIP332C-Lab 8 3 M NIL
12. IOPS332C 4 2 T, Th 03:00, 12:15,
1115
13. IOPS332C 4 1 T, Th 03:00, 12:15,
11:15
14. IOPS332C-Lab 7 3 NIL NIL

Allocations in the order of priority:
S. No. Course Priority Slot
Duration Day Preference Time
Preference
1. IOOM332C 1 1 M, Th, F 10:00, 03:00
2. IOOM332C-Lab 2 3 M, T 10:00
3. SMAT330C 3 1 M, T 09:00, 10:00
4. IOPS332C 4 2 T, Th 03:00, 12:15,
1115
5. ITOC330C 5 2 NIL 11:15
6. EMIP332C 6 1 NIL NIL
7. IOPS332C-Lab 7 3 NIL NIL
8. EMIP332C-Lab 8 3 M NIL
9. ITOC330C-Tut 9 2 NIL NIL
10. IOOM332C 1 2 M, Th, F 10:00, 03:00
11. SMAT330C 3 2 T, W 09:00, 10:00
12. IOPS332C 4 1 T, Th 03:00, 12:15,
11:15
13. ITOC330C 5 1 NIL 11:15
14. EMIP332C 6 2 NIL NIL

Time Table Numbers in () point to the S.No. in the table

9:00-10:00 10:00-11:00 11:15-12:15 12:15-1:15 3:00-
4:00 4:00-
5:00 5:00-
6:00
M SMAT330C
(3) IOOM332C
(1) IOOM332C-Lab (2)
T ITOC330C-Tut (9) IOPS332C
(12) IOPS332C (4)
W SMAT330C (11) ITOC330C (5) IOOM332C (10)
Th EMIP332C
(6) EMIP332C (14) EMIP332C-Lab (8)
F ITOC330C
(13) IOPS332C-Lab (7)
S

Part 2

There are more than one batches running in this institute. You need to make a time table for all of them, instead of just one. Ensure adherence of the constraint that no faculty can simultaneously take two classes, and no student can simultaneously attend two lectures.

Input Format
The first input is the number of test cases. Each test case starts with the number of batches followed by the names of all batches. Thereafter, the next input is the number of faculty and names of all faculty. Thereafter the next input is the number of courses and details of all courses.

The slot details include the duration, day preference and time preference. NIL means no preference.

Sample Input
Number of test cases 1
Number of batches 2
Names of batches First Second
Number of faculty 10
Names of faculty Anand Arun Jagpreet Kala Manish Pragya Pramod Shashikant Sunny Vyas
Number of courses 24
Details of SMAT330C SMAT330C Maths Anand 6 Second 2
Details for 1st slot 1 12 09001000
Details for 2nd slot 2 23 09001000
Details of IOOM332C IOOM332C ObjectOrientedMethodologies Vyas 2 Second 2
Details for 1st slot 1 145 10000300
Details for 2nd slot 2 145 10000300
Details of IOOM332C-Lab IOOM332C-Lab ObjectOrientedMethodologiesLab Kala 4 Second 1
Details for 1st slot 3 12 1000
Details of ITOC330C ITOC330C TheoryOfComputation Manish 10 Second 2
Details for 1st slot 2 NIL 1115
Details for 2nd slot 1 NIL 1115
Details of ITOC330C-Tut ITOC330C-Tutorial TheoryOfComputationTutorial Manish 18 Second 1
Details for 1st slot 2 NIL NIL
Details of EMIP332C EMIP332C Microprocessor Arun 12 Second 2
Details for 1st slot 1 NIL NIL
Details for 2nd slot 2 NIL NIL
Details of EMIP332C-Lab EMIP332C-Lab MicroprocessorLab Arun 16 Second 1
Details for 1st slot 3 1 NIL
Details of IOPS332C IOPS332C OperatingSystem Jagpreet 8 Second 2
Details for 1st slot 2 24 030012151115
Details for 2nd slot 1 24 030012151115
Details of IOPS332C-Lab IOPS332C-Lab OperatingSystemLab Jagpreet 14 Second 1
Details for 1st slot 3 NIL NIL
Details of LAL LAL LinearAlgebra Anand 27 First 3
Details for 1st slot 1 NIL NIL
Details for 2nd slot 1 NIL NIL
Details for 3rd slot 1 NIL NIL
Details of LAL-Tut LAL-Tut LinearAlgebraTut Anand 15 First 1
Details for 1st slot 2 NIL NIL
Details of PHY PHY Physics Pramod 17 First 1
Details for 1st slot 2 NIL NIL
Details of PHY Lab PHY-Lab PhysicsLab Pramod 13 First 1
Details for 1st slot 2 NIL NIL
Details of PHY Tut PHY-Tut PhysicsTutorial Pramod 9 First 1
Details for 1st slot 2 NIL NIL
Details of ITP ITP Intro2Programming Vyas 1 First 1
Details for 1st slot 2 NIL NIL
Details of ITP-Tut ITP-Tut Intro2ProgrammingTut Vyas 7 First 1
Details for 1st slot 2 NIL NIL
Details of ITP-Lab ITP-Lab Intro2ProgrammingLab Vyas 5 First 1
Details for 1st slot 2 NIL NIL
Details of FEE FEE Fee Sunny 28 First 1
Details for 1st slot 2 NIL NIL
Details of FEE-Tut FEE-Tut FeeTut Sunny 19 First 1
Details for 1st slot 2 NIL NIL
Details of FEE Lab FEE-Lab FeeLab Sunny 3 First 1
Details for 1st slot 2 NIL NIL
Details of PFC PFC ProfessionalCommunication Pragya 11 First 1
Details for 1st slot 1 NIL NIL
Details of PFC-Lab PFC-Lab ProfessionalCommunicationLab Pragya 25 First 1
Details for 1st slot 2 NIL NIL
Details of POM POM PrinciplesOfManagement Shashikant 21 First 1
Details for 1st slot 1 NIL NIL
Details of POM-Tut POM-Tut PrinciplesOfManagementTut Shashikant 23 First 1
Details for 1st slot 2 NIL NIL

Sample Output

First
9:00-11:00 ITP Intro2Programming Vyas
11:15-12:15 PFC ProfessionalCommunication Pragya
12:15-1:15 POM PrinciplesOfManagement Shashikant
3:00-5:00 POM-Tut PrinciplesOfManagementTut Shashikant
9:00-11:00 FEE-Lab FeeLab Sunny
11:15-1:15 PHY-Lab PhysicsLab Pramod
3:00-5:00 PFC-Lab ProfessionalCommunicationLab Pragya
9:00-11:00 ITP-Lab Intro2ProgrammingLab Vyas
11:15-1:15 LAL-Tut LinearAlgebraTut Anand
3:00-4:00 LAL LinearAlgebra Anand
4:00-5:00 LAL LinearAlgebra Anand
9:00-11:00 PHY Physics Pramod
11:15-1:15 ITP-Tut Intro2ProgrammingTut Vyas
3:00-5:00 FEE Fee Sunny
9:00-11:00 PHY-Tut PhysicsTutorial Pramod
11:15-1:15 FEE-Tut FeeTut Sunny
3:00-4:00 LAL LinearAlgebra Anand
Second
9:00-10:00 SMAT330C Maths Anand
11:15-12:15 ITOC330C TheoryOfComputation Manish
9:00-11:00 ITOC330C-Tutorial TheoryOfComputationTutorial Manish
12:15-1:15 IOPS332C OperatingSystem Jagpreet
3:00-5:00 IOPS332C OperatingSystem Jagpreet
9:00-11:00 SMAT330C Maths Anand
11:15-1:15 ITOC330C TheoryOfComputation Manish
3:00-5:00 IOOM332C ObjectOrientedMethodologies Vyas
10:00-11:00 IOOM332C ObjectOrientedMethodologies Vyas
11:15-1:15 EMIP332C Microprocessor Arun
3:00-6:00 IOPS332C-Lab OperatingSystemLab Jagpreet
9:00-10:00 EMIP332C Microprocessor Arun
3:00-6:00 EMIP332C-Lab MicroprocessorLab Arun

Part 3

Sample Input
Same as above

Sample Output
Anand
9:00-10:00 SMAT330C Maths Anand
9:00-11:00 SMAT330C Maths Anand
11:15-1:15 LAL-Tut LinearAlgebraTut Anand
3:00-4:00 LAL LinearAlgebra Anand
4:00-5:00 LAL LinearAlgebra Anand
3:00-4:00 LAL LinearAlgebra Anand
Arun
11:15-1:15 EMIP332C Microprocessor Arun
9:00-10:00 EMIP332C Microprocessor Arun
3:00-6:00 EMIP332C-Lab MicroprocessorLab Arun
Jagpreet
12:15-1:15 IOPS332C OperatingSystem Jagpreet
3:00-5:00 IOPS332C OperatingSystem Jagpreet
3:00-6:00 IOPS332C-Lab OperatingSystemLab Jagpreet
Kala
3:00-6:00 IOOM332C-Lab ObjectOrientedMethodologiesLab Kala
Manish
11:15-12:15 ITOC330C TheoryOfComputation Manish
9:00-11:00 ITOC330C-Tutorial TheoryOfComputationTutorial Manish
11:15-1:15 ITOC330C TheoryOfComputation Manish
Pragya
11:15-12:15 PFC ProfessionalCommunication Pragya
3:00-5:00 PFC-Lab ProfessionalCommunicationLab Pragya
Pramod
11:15-1:15 PHY-Lab PhysicsLab Pramod
9:00-11:00 PHY Physics Pramod
9:00-11:00 PHY-Tut PhysicsTutorial Pramod
Shashikant
12:15-1:15 POM PrinciplesOfManagement Shashikant
3:00-5:00 POM-Tut PrinciplesOfManagementTut Shashikant
Sunny
9:00-11:00 FEE-Lab FeeLab Sunny
3:00-5:00 FEE Fee Sunny
11:15-1:15 FEE-Tut FeeTut Sunny
Vyas
9:00-11:00 ITP Intro2Programming Vyas
9:00-11:00 ITP-Lab Intro2ProgrammingLab Vyas
3:00-5:00 IOOM332C ObjectOrientedMethodologies Vyas
10:00-11:00 IOOM332C ObjectOrientedMethodologies Vyas
11:15-1:15 ITP-Tut Intro2ProgrammingTut Vyas

Part 4

Sample Input
<following part 2>
Number of suggestions 5
Suggestion 1 SMAT330C 1 1 53 10001115
Suggestion 2 IOOM332C 2 3 4 1115
Suggestion 3 IOPS332C 2 2 32 03000400
Suggestion 4 PFC 1 4 2 03001215
Suggestion 5 POM 1 5 14 09000400

Sample Output

First
9:00-11:00 ITP Intro2Programming Vyas
3:00-5:00 POM-Tut PrinciplesOfManagementTut Shashikant
9:00-11:00 FEE-Lab FeeLab Sunny
11:15-1:15 PHY-Lab PhysicsLab Pramod
3:00-5:00 PFC-Lab ProfessionalCommunicationLab Pragya
5:00-6:00 PFC ProfessionalCommunication Pragya
9:00-11:00 ITP-Lab Intro2ProgrammingLab Vyas
11:15-1:15 LAL-Tut LinearAlgebraTut Anand
3:00-4:00 LAL LinearAlgebra Anand
4:00-5:00 LAL LinearAlgebra Anand
9:00-11:00 PHY Physics Pramod
11:15-1:15 ITP-Tut Intro2ProgrammingTut Vyas
3:00-5:00 FEE Fee Sunny
9:00-11:00 PHY-Tut PhysicsTutorial Pramod
11:15-1:15 FEE-Tut FeeTut Sunny
3:00-4:00 LAL LinearAlgebra Anand
4:00-5:00 POM PrinciplesOfManagement Shashikant
Second
11:15-12:15 ITOC330C TheoryOfComputation Manish
9:00-11:00 ITOC330C-Tutorial TheoryOfComputationTutorial Manish
11:15-1:15 IOOM332C ObjectOrientedMethodologies Vyas
3:00-5:00 IOPS332C OperatingSystem Jagpreet
9:00-11:00 SMAT330C Maths Anand
11:15-1:15 ITOC330C TheoryOfComputation Manish
4:00-6:00 IOOM332C ObjectOrientedMethodologies Vyas
5:00-6:00 IOPS332C OperatingSystem Jagpreet
10:00-11:00 IOOM332C ObjectOrientedMethodologies Vyas
11:15-1:15 EMIP332C Microprocessor Arun
3:00-6:00 IOPS332C-Lab OperatingSystemLab Jagpreet
9:00-10:00 EMIP332C Microprocessor Arun
10:00-11:00 SMAT330C Maths Anand
3:00-6:00 EMIP332C-Lab MicroprocessorLab Arun

Reviews

There are no reviews yet.

Be the first to review “OOM Assignment 2 Solved”

Your email address will not be published. Required fields are marked *