Professional Documents
Culture Documents
PXC 3871371
PXC 3871371
T1
Since there are six working days in a week (Monday to Saturday),
we use six colors to color the above fuzzy graph. If r and s are two wij
different colors, we use the color difference table d (r, s) = r
T2
s . Membership table is based on the priorities given by a T1
teacher. The membership values can be ‘l’, ‘m’ or ‘h’ which
S1
correspond to ‘low’, ‘medium’ and ‘high’ respectively. Block wij
diagram for the first stage is shown below. T3
Di T4
wij S2
Edge Di
Semester i
Adjacency coloring of T5
Matrix fuzzy graph. Di
Sj
Ti
T6 wij
Di
Sk
S3
Di T7
Color Di
Semester k
Di T9
Figure 2. Block diagram of first Stage. Figure 3. Fuzzy graph of second stage.
T1 T2 T3 T4 T5 T6 T7 T8 T9 S1 S2 S3
Edge coloring algorithm in the first stage takes as input adjacency T1 0 0 0 0 0 0 0 0 0 … … …
matrix, color difference table and corresponding membership
T2 0 0 0 0 0 0 0 0 0 … … …
table and is executed nine times corresponding to nine teachers.
In each iteration, the color allocated for an edge corresponds to a T3 0 0 0 0 0 0 0 0 0 … … …
day of the week and indicates the day on which the particular T4 0 0 0 0 0 0 0 0 0 … … …
teacher engages the particular semester. The output of the first
T5 0 0 0 0 0 0 0 0 0 … … …
stage becomes the input to the second stage.
T6 0 0 0 0 0 0 0 0 0 … … …
The constraints that are satisfied in the first stage are the
T7 0 0 0 0 0 0 0 0 0 … … …
following.
1. For each semester, exactly four slots in a week are allocated T8 0 0 0 0 0 0 0 0 0 … … …
for T9 0 0 0 0 0 0 0 0 0 … … …
a teacher who teaches that semester. S1 … … … … … … … … … 0 0 0
2. Each teacher will engage a particular semester for maximum
one slot in a day. S2 … … … … … … … … … 0 0 0
S3 … … … … … … … … … 0 0 0
2.2 Second Stage
The fuzzy bi partite graph used in the second stage consists of
nine nodes on the left side which correspond to nine teachers. Table 2. Adjacency matrix for the second stage.
There are three nodes on the right side which correspond to three In the second stage, the edge coloring algorithm is executed six
semesters. times corresponding to six days in a week. In each iteration, the
adjacency matrix is created dynamically by extracting the data
available at the output of the first stage. In other words, by
referring to the teachers who are teaching on a given day for a
given semester, the adjacency matrix is created dynamically in
each iteration. Hence the edges in figure 3 are shown by dotted
lines and the entries connecting the edges Ti with Sj (1 ≤ i ≤ 9 and
1 ≤ j ≤ 3) in Table 2 are also shown by dotted lines.
15
International Journal of Computer Applications (0975 – 8887)
Volume 6– No.2, September 2010
Seven colors are considered for Monday to Friday (iteration 1 to Step 6: For each day, generate the adjacency matrix and
iteration 5) which correspond to seven slots in a day. For Saturday membership table dynamically for the second stage by
(iteration 6), the number of colors considered is four mapping the output generated in the first stage.
corresponding to four slots on Saturday. The membership table for Step 7: For each day, generate the color difference table and
each iteration is also created dynamically. The block diagram for execute the edge coloring algorithm which again takes
the second stage is shown in the figure given below. adjacency matrix, membership table and color difference
table as inputs.
Adjacency Edge Step 8: Time table is generated by assigning the colors generated
Semester 1 Coloring by the edge coloring algorithm to different time slots in a
Matrix
Of a day.
Dynamically
created Fuzzy Step 9: Display the final Timetable of each semester and also of
Input from 1st Stage
Example 3.1:
Consider an example where there are nine teachers T1, T2,…..,T9
Color
who take classes for three semesters S1, S2 and S3. Assume that
Difference Membership
Semester 3 teachers T1, T2 and T3 teach for semesters S1 and S2, teachers T4,
Table Table T5 and T6 teach for semesters S1 and S3, teachers T7, T8 and T9
teach for semesters S2 and S3.
Using the above algorithm, we generate Time table which
satisfies the constraints given in section 1. For the first stage, we
Figure 4. Block diagram of second Stage. consider the fuzzy graph of figure 1 and the adjacency matrix of
Table 1. Nine membership tables for the first stage based on the
priorities given by nine teachers T1, T2,…...T9 are given below.
In each iteration which represents a particular day, timeslots are
allocated for all the nine teachers. Finally, the entire Time table is
generated.
The constraints that are satisfied in the second stage are the Table 3 Membership tables for nine teachers for the first
following. stage of example 3.1
1. In any given time slot, each teacher can teach at most Teacher 1:
one semester and each semester can be taught by at
most one teacher. T11 T12 T13 T14 S1 S2
2. If a teacher handles classes for two semesters in a day, T11 0 0 0 0 l l
the gap between the two slots is controlled by T12 0 0 0 0 m h
membership values assigned to the edges connecting T13 0 0 0 0 m m
teachers and semesters. T14 0 0 0 0 h h
S1 l m m h 0 0
3. ALGORITHM TO GENERATE TIME S2 l h m h 0 0
TABLE USING EDGE COLORING OF A
Teacher 2:
FUZZY GRAPH
T21 T22 T23 T24 S1 S2
STAGE 1:
T21 0 0 0 0 m l
Step 1: Allocate two semesters for each teacher. T22 0 0 0 0 l h
Step 2: Generate the adjacency matrix corresponding to four hours T23 0 0 0 0 l m
in a week for each semester for each teacher. T24 0 0 0 0 h l
S1 m l l h 0 0
Step 3: Generate the color difference table for six colors which
corresponding to six days in a week. S2 l h m l 0 0
Step 4: For each teacher, get the membership table and execute Teacher 3:
the edge coloring algorithm which takes adjacency
matrix, membership table and color difference table as
inputs.
Step 5: The output generated by the edge coloring algorithm
assigns the colors to days of a week.
STAGE 2:
16
International Journal of Computer Applications (0975 – 8887)
Volume 6– No.2, September 2010
Teacher 9:
T31 T32 T33 T34 S1 S2
T31 0 0 0 0 h h T91 T92 T93 T94 S2 S3
T32 0 0 0 0 m m T91 0 0 0 0 l m
T33 0 0 0 0 h l T92 0 0 0 0 h l
T34 0 0 0 0 l m T93 0 0 0 0 m h
S1 h m h l 0 0 T94 0 0 0 0 m m
S2 h m l m 0 0 S2 l h m m 0 0
S3 m l h m 0 0
Teacher 4: Output generated by the first stage for the membership tables
T41 T42 T43 T44 S1 S3 considered above is as shown in the Table given below.
T41 0 0 0 0 h m
Table 4. Output generated by first stage for example 3.1.
T42 0 0 0 0 m h
T43 0 0 0 0 l h
Semester 1:
T44 0 0 0 0 h l
S1 h m l h 0 0 Mon Tue Wed Thur Fri Sat
S3 m h h l 0 0 T1 1 1 0 1 0 1
T2 1 1 1 1 0 0
Teacher 5: T3 1 1 0 1 0 1
T51 T52 T53 T54 S1 S3 T4 1 1 1 0 1 0
T51 0 0 0 0 l h T5 1 1 0 1 0 1
T52 0 0 0 0 m h T6 1 1 1 1 0 0
T53 0 0 0 0 l m
Semester 2:
T54 0 0 0 0 h m
S1 l m l h 0 0 Mon Tue Wed Thur Fri Sat
S3 h h m m 0 0
T1 1 1 0 1 0 1
T2 1 1 1 1 0 0
Teacher 6:
T3 1 1 0 1 0 1
T61 T62 T63 T64 S1 S3 T7 1 1 1 0 1 0
T61 0 0 0 0 m m T8 1 1 0 1 0 1
T62 0 0 0 0 h l T9 1 1 1 0 1 0
T63 0 0 0 0 l m
T64 0 0 0 0 m h Semester 3:
S1 m h l m 0 0
Mon Tue Wed Thur Fri Sat
S3 m l m h 0 0
T4 1 1 1 0 1 0
Teacher 7: T5 1 1 0 1 0 1
T71 T72 T73 T74 S2 S3
T6 1 1 1 1 0 0
T71 0 0 0 0 m m T7 1 1 1 0 1 0
T72 0 0 0 0 l h T8 1 1 0 1 0 1
T73 0 0 0 0 m h T9 1 1 1 0 1 0
T74 0 0 0 0 h l
S2 m l m h 0 0
The output generated by the first stage gives information about
S3 m h h l 0 0
the teachers who are all taking classes for a particular semester on
Teacher 8: a particular day. For example, on Wednesday, teachers T2, T4 and
T6 are engaging classes for semester 1, teachers T2, T7 and T9 are
T81 T82 T83 T84 S2 S3
engaging classes for semester 2 and teachers T4, T6, T7 and T9 are
T81 0 0 0 0 h l engaging classes for semester 3.
T82 0 0 0 0 m h
We now look at the adjacency matrix generated dynamically for
T83 0 0 0 0 l m
the second stage by mapping the output generated in the first
T84 0 0 0 0 h h
stage. The corresponding membership tables for the second stage
S2 h m l h 0 0
are given below.
S3 l h m h 0 0
17
International Journal of Computer Applications (0975 – 8887)
Volume 6– No.2, September 2010
T5 0 0 0 0 0 0 0 0 0 h 0 l
T6 0 0 0 0 0 0 0 0 0 0 0 0
T7 0 0 0 0 0 0 0 0 0 0 h m
T6 0 0 0 0 0 0 0 0 0 m 0 m
T8 0 0 0 0 0 0 0 0 0 0 0 0
T7 0 0 0 0 0 0 0 0 0 0 m l
T9 0 0 0 0 0 0 0 0 0 0 m m
T8 0 0 0 0 0 0 0 0 0 0 l m
S1 0 0 0 m 0 0 0 0 0 0 0 0
T9 0 0 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 m h 0
T3 0 0 0 0 0 0 0 0 0 l m 0 T3 0 0 0 0 0 0 0 0 0 0 0 0
T4 0 0 0 0 0 0 0 0 0 0 0 h T4 0 0 0 0 0 0 0 0 0 h 0 m
T5 0 0 0 0 0 0 0 0 0 h 0 m T5 0 0 0 0 0 0 0 0 0 0 0 0
T6 0 0 0 0 0 0 0 0 0 0 0 0 T6 0 0 0 0 0 0 0 0 0 h 0 h
T7 0 0 0 0 0 0 0 0 0 0 0 0 T7 0 0 0 0 0 0 0 0 0 0 m m
T8 0 0 0 0 0 0 0 0 0 0 l h T8 0 0 0 0 0 0 0 0 0 0 0 0
T9 0 0 0 0 0 0 0 0 0 0 h m T9 0 0 0 0 0 0 0 0 0 0 h m
S1 m 0 l 0 h 0 0 0 0 0 0 0 S1 0 m 0 h 0 h 0 0 0 0 0 0
S2 h 0 m 0 0 0 0 l h 0 0 0 S2 0 h 0 0 0 0 m 0 h 0 0 0
S3 0 0 0 h m 0 0 h m 0 0 0 S3 0 0 0 m 0 h m 0 m 0 0 0
18
International Journal of Computer Applications (0975 – 8887)
Volume 6– No.2, September 2010
slot1 slot2 slot3 slot4 slot5 slot6 slot7 [4] Mllena Karova, Solving Timetabling Problems Using Genetic
Mon T4 T5 T6 T7 T8 - T9 Algorithms, 27th International Spring Seminar on Electronics
Tue T4 T7 T9 T8 T5 - T6 Technology, IEEE 2007, P 96 – 98.
Wed T4 - T6 - T7 - T9
[5] V. Ramaswamy and. Poornima B. Edge coloring of a Fuzzy
Thur Graph, Advances in Fuzzy Mathematics, Volume 4, Number 1,
T5 T6 - - - - T8
s 2009, P 49 – 58.
Fri T4 - T7 - T9 - -
Sat T5 - T8 - - - -
19