these length values are partitioned into two groups. One group
comprises of length values, which output a reminder of 2,
when it is divided by 3 (List A). Further, the elements namely
2 and 5 are then separated from this group, as wavelength
allotment for connections corresponding to it are dealt
separately. The other group comprises of length values, which
output a reminder not equal to 2, when it is divided by 3 (List
B). The stage 1 algorithm then groups the elements of List A
and List B separately into multiple disjoint sets (no two sets
contain a same element) in such a way that the sum of the
elements of each set, excluding the last set, is equal to N. The
reason for making the sum of elements of each set equal to N
is for an efficient wavelength allotment. This ensures that non-
overlapping connections of length equal to each of the value
of the elements in the set (one connection for every length
equal to the value of the elements in the set), when routed
sequentially one after another on a unique wavelength (the
destination of one connection being the source for another
connection), covers a maximum number of available longest
links over a single round along the ring. This strategy ensures
that a particular wavelength is used on maximum number of
longest links for a single round over a ring and may pertain to
optimal wavelength allotment. However, as the sum of the
elements in the last set may not be equal to N, adopting the
above logic may not pertain to optimal wavelength allotment.
If adopted as such, the allotted wavelength may not be present
in an entire round over the ring, which paves the way for more
wavelength requirement. The pseudocode for stage 1
algorithm is displayed in Fig.3. Further, wavelength allotment
for connection lengths equal to the element values of the last
set is deliberated in the heuristic algorithm stage 2.
The second stage of the heuristic algorithm is displayed in
Fig.4. This algorithm first inputs all the elements of last set
obtained through List A of stage 1 algorithm. This algorithm
processes the inputs and outputs either the same input set or
outputs the input elements in two or more disjoint set. The
algorithm first generates a power set with the input elements.
Power set is all possible subsets for the given set of input
elements. Then the subset-sum, which is the sum of all the
element in a subset, is calculated for all the generated subsets
but excluding null set which is omitted as it of no relevance
for the analysis. For every subset, N is made to divide the
subset-sum and the quotient obtained is recorded. The
fractional element of the quotient is zero when, N is integer
multiples on subset-sum. This ensures that non-overlapping
connections of length equal to each of the values of the
elements in the subset (one connection for every length equal
to the value of the elements in the subset and the destination of
one connection being the source for another connection), when
routed sequentially one after another and then repeated z times
where z is the corresponding quotient value, on a unique
wavelength covers a maximum number of available longest
links over a single round along the ring. This strategy ensures
that a particular wavelength is used on maximum number of
longest links for a single round over a ring and may pertain to
optimal wavelength allotment.
A value of non-zero in the fractional part of the quotient
corresponds to the scenario where N is a not an integer
multiple of subset-sum. In this scenario, non-overlapping
connections of length equal to each of the values of the
elements in the subset (one connection for every length equal
to the value of the elements in the subset and the destination of
one connection being the source for another connection), when
routed sequentially one after another and then repeated z times
where z is the corresponding quotient value, on a unique
wavelength do not cover a maximum number of available
longest links over a single round along the ring. The fractional
part of a quotient which has bigger value results in a situation
where the number of longest links getting assigned a unique
wavelength (so as to result in one full round around the ring)
is less. The fractional part of a quotient which has lower value
results in a situation where the number of longest links getting
assigned a unique wavelength (so as to result in one full round
around the ring) is more. However, irrespective of whether the
fractional part is lower or bigger, the connections routed on a
unique wavelength, as said above, do not make one full round.
Hence, among all the subsets generated through power set, the
subset which produced lowest fractional part in its quotient
value is outputted. In the case of more than one subset
producing the same value of fractional part in its quotient, the
subset comprising of more element count is outputted. In the
scenario of having same values in both fractional part and
element count, the subset which was processed first is
outputted.
Once a subset is outputted based on the value of the fractional
part of the quotient, then a decision has to be made regarding
how to employ the elements of the subset towards wavelength
allotment. One option is about employing the elements of the
subset together for wavelength allotment while the other is
passing each and every element of the selected subset
separately for wavelength allotment. Remaining options are
not considered here to reduce the complexity of this study.
This choice to be made is made based on the wavelength-
number requirement and the one which require less is selected.
The logic for wavelength requirement calculation is, suppose
the length of a connection is, and then the maximum
number oflength connections that can be established
without overlapping with each other on the N node ring with
3-length extension is
. For establishing connections of
length , the total wavelength required is
.
Letbe the elements of a subset and if they are
assumed to be independently employed for wavelength
allotment, then the total wavelength-number required is
. On the contrary, if the
elements of a subset are assumed to be employed together for
wavelength allotment, then the wavelength-number required
are
.
Based on the wavelength-number either the elements of the
input are outputted as separate sets or together as one output
set same as input. This set of elements is removed from the
original input list of stage 2 algorithm. Again stage 2
WSEAS TRANSACTIONS on COMPUTERS
DOI: 10.37394/23205.2022.21.19
K. Manoharan, M. Sabrigiriraj