SlideShare a Scribd company logo
1 of 4
Download to read offline
IEEE TRANSACTIONS ON COMPUTERS, VOL. c-28, NO. 11, NOVEMBER 1979
An Optimal Solution for the
Channel-Assignment Problem
UDAIPRAKASH I. GUPTA, MEMBER, IEEE, D. T. LEE, MEMBER, IEEE, AND JOSEPH Y.-T. LEUNG, MEMBER, IEEE
Abstract-Given a set ofintervals (pairsofreal numbers), we look
at the problem of finding a minimal partition ofthis set such that no
element of the partition contains two overlapping intervals. We
exhibit a O(N log N) algorithm which is optimal. The problem has
applications in LSI layout design and job scheduling.
Index Terms-Channel-assignment problem, job scheduling, LSI
layout design, analysis of algorithms.
I. INTRODUCTION
W1 rE consider the following abstract problem. Let
S = {Ii= (xi, yi) xi and yi are real numbers and
xi <yi, 1 < i < N} be a set of N open intervals. Intervals Ii
and Ij are said to be overlapping iff Ii n) Ij ), and
nonoverlapping otherwise. A subset S' of S is overlapping if
nIf eS Ii $ 4, i.e., all intervals in S' are overlapping. We
want to find for a given set S 1) the degree ofoverlap ofS, k,
where k = max { S' S' c S and S' is overlapping} and 2) a
partition of S into k subsets such that the intervals in each
subset are pairwise nonoverlapping. We shall call this the
channel-assignment problem. This problem arises in several
applications such as LSI layout design and job scheduling.
In LSI layout design we are confronted with the following
wire interconnection problem. We are given a two-sided
printed circuit board in which there are horizontal lines
(called channels) on one side and vertical lines on the other.
We have a set ofN pairs ofcomponents (each component is
to be placed on a specific vertical line) and each pair of
components is to be connected by a horizontal line segment.
The problem of interest is to minimize the number of
channels necessary to connect them. It is obvious that ifwe
can allocate a smaller number ofchannels to the compon-
ents, we will have more channels available to accommodate
more components. Two pairs of components can share the
same channel if their connections do not conflict with each
other. In other words, if we represent the position of the
two-component pair as an interval (xi, y,), then two pairs of
components can share one channel if their corresponding
intervals are nonoverlapping. Thus, referring to our original
problem, the set S will be the set of component pairs; the
degree ofoverlap of S will determine the minimum number
ofchannels required and the partition will be an assignment
of component pairs to channels without conflict.
Manuscript received December 20, 1978; revised June 11, 1979.
The authors are with the Department of Electrical Engineering and
Computer Science, Northwestern University, Evanston, IL 60201.
In the context ofjob scheduling, each interval (xi, yA)can
be interpreted as a job which must be executed by some
processor at time xi and finished at time yi. The processing
time for the job is yi- xi. Two jobs can be assigned to the
same processor if the intervals are nonoverlapping. The
problem is to find a schedule which minimizes the number of
processors required. This problem is referred to as the
minimum-resource fixed job scheduling problem [5].
The channel-assignment problem has been studied by a
number ofpeople [5], [7] using graph-theoretic approaches.
Given a set S of N intervals Ii = (xi, yi), 1 < i < N, we can
construct a graph GI = (V, EI), where each vertex in V
corresponds to an interval and two vertices are connected by
an edge in EI iffthe corresponding intervals are overlapping.
Such a graph is called an interval graph. Gihnore and
Hoffman [6] give a complete characterization of interval
graphs. Finding the degree of overlap of S is equivalent to
finding the chromatic number ofthe corresponding interval
graph. On the other hand, we can also construct a directed
graph Gc = (V, EJ),where each vertex viin Vcorresponds to
an interval (xi, yi), and a directed edge from vi_to vjexists iff
yi < x. The resultant graph is a comparability graph [6],
since the ordering 1i xc Ii iffyi < xjdefinesapartial order on
S. In this graph the least number ofdirected paths that cover
all the vertices is the degree of overlap of S, and the set of
directed paths defines the partition ofthe set S ofintervals.
This problem is known as Dilworth's path cover problem [2].
These graph-theoretic approaches give rise to algorithms
that are at least Q(N2)since it takes 0(N2)steps1 to construct
these graphs.
Recently Gertsbakh and Stern [5] introduced the idea of
"step-function" to solve the minimum-resource fixed job
scheduling problem. They define the function fs(t) as fol-
lows:fs(O) = 0. When a job starts, the function increases by
one unit; when a job ends, the function decreases by one
unit. Thus, the value offs(t) is equal to the number ofjobs
being processed at time t. The maximum value offs(t) is the
total number ofprocessors required. In order to construct a
schedule that assignsjob to processors, they first construct a
string of jobs which are known to be executable in one
processor, i.e., those jobs whose starting times are larger
1 We say that g(n) =
0(f(n)) if g(n) < cf(n) for some constant c and
all sufficiently large n, g(n) = Ql(f(n)) if g(n) > cf(n) for some constant
c > 0 and all sufficiently large n, and g(n) = O(f:(n)) if both g(n) = 0(f(n))
and g(n) = Q(f(n)) hold.
0018-9340/79/1100-0807$00.75 ยฉ 1979 IEEE
807
IEEE TRANSACTIONS ON COMPUTERS, VOL. C-28, NO. 11, NOVEMBER 1979
than the finishing times ofprevious jobs. Then this string of
jobs is removed and the above process repeated. This
method, although it differs from the previous known graph-
theoretic approaches, takes n(N2) time in the worst case,
since it is possible that in each iteration we can only assign
one job to a processor and we need n iterations.
We will now briefly outline the remainder ofthe paper. In
the next section we shall give an optimal algorithm for the
channel-assignment problem. In Section III we shall extend
our result to handle the case where each interval is replaced
by an arbitrary figure with boundaries being horizontal and
vertical lines.
II. OPTIMAL ALGORITHM
We first show that to determine the minimum number of
channels required takes at least Q(N log N) time, where N is
the number of pairs (xi, yi) ofterminals. Shamos and Hoey
[8] and Fredman and Weide [4]have shownthat Q(N log N)
is a lower bound on the time required to determine whether
N intervals on a line are pairwise disjoint. (The number of
channels required for N pairs (xi, y,) is greater than 1 iffthe
N intervals (xi, y1) have at least one overlap.) Their result
follows from the Ql(N log N) lower bound (due to Dobkin
and Lipton [3]) for the element uniqueness problem; that is,
given N numbers, it is to be determined if they are all
distinct. If we could determine the minimum number of
channels required in less than Q(N log N)time,we would be
able to determine whether N intervals on a line are pairwise
disjoint in less than Q(N log N) time, which is impossible by
[4], [8].
Now let us describe informally how we can determine the
maximum number of channels required and an assignment
of each pair of terminals to a channel in O(N log N) time.
Assume that each pair (xi, yi) is considered to be an interval
Ii on the x-axis, where xi and yi are the x-coordinates of
endpoints and xi < y . Callthese two endpoints left and right
endpoints, respectively. Clearly, if all the intervals are
pairwise disjoint, i.e., they are nonoverlapping, then one
channel will be sufficient. Moreover, overlapping intervals
should be assigned to different channels. We shall sort the
2N endpoints in the increasing order oftheir x-coordinates
and-rename the intervals so that X1 < X2 < .. <_ XN. As
shown in Fig. 1, we have seven intervals and for convenience
these intervals are "laid out" in the y-axis direction. We then
scan the intervals from left to right. If a left endpoint is
encountered, we assign the corresponding interval to the
next available channel. Ifa right endpoint is encountered, we
release the channel occupied by the corresponding interval
and make the released channel available again. We alsokeep
a counter to record the number of channels currently
occupied.
Initially, the counter is set to zero and all the channels are
available. In order to keep track of the interval assignment
we maintain an array ASGN for intervals, i.e., interval I. is
assigned to channel k if ASGN(j) = k. Also, we maintain a
stack ofavailable channels. Whenever a channel is required,
we "pop" the stack and assign the channel to the interval
under consideration. If a channel becomes available, we
"push" it onto the stack. For example, in Fig. 1, we assign
channel 1 to interval I, when xl is scanned and assign
channels 2 and 3 to intervals I2 and I3 when x2 and X3 are
scanned. Since the next endpoint scanned Yi is a right
endpoint of I,, channel 1, which was assigned to I , is
released. The next interval I4 can then be assigned to
channel 1 again. Afterthe last endpoint Y7 is scanned,we will
obtain the following: intervals II and I4 are assigned to
channel, I2, I6, and I7are assigned to channel 2, and I3and
I5 to channel 3. Three channels are, therefore, sufficient. The
following algorithm precisely describes the procedure that
we just sketched.
Algorithmfor Channel-Assignment Problem
Input: N intervals I1,I2I
2 , INrepresented inthe form (xi,
y)and xi<y, for all 1 < i < N.
Output: The number of channels needed and the assign-
ment of intervals to channels.
Method: We employ two auxiliary arrays ASGN and NEXr
for the assignment of intervals to channels and the list of
available channels, respectively. COUNTER iS used to keep
track of the number of channels needed currently and
CHANNEL is a pointer pointing to the top of the list of
available channels, namely, the next available channel.
MAXCHAN keeps track ofthe maximum number ofchannels
ever needed.
Step 1: Sort the 2N endpoints to obtain
Z1 < Z2 < < Z2N.2
Step 2: COUNTER 4-0, MAXCHAN 0, CHANNEL +- 1.
Step 3: for i = ito N do:
NEXT (i) - i + 1.
Step 4: for j = 1 to 2N do:
if zi is a left endpoint of interval Ik
then begin COUNTER 4- COUNTER + 1,
MAXCHAN 4- max {COUNTER, MAXCHAN},
ASGN (k) +- CHANNEL,
CHANNEL NEXT (CHANNEL)
end
else {zj is a right endpoint of some interval Ik}
begin COUNTER 4- COUNTER- 1,
TEMP 4- ASGN (k),
NEXT (TEMP) +- CHANNEL,
CHANNEL 4- TEMP
end.
The correctness of the algorithm can be easily verified.
Now let us analyze the computing time taken by this
algorithm. Step 1 takes O(N log N) time to sort 2Nnumbers.
Step 2 takes time bounded by some constant and Step 3
takes O(N)time. Step 4 examines each endpoint once, and for
each endpoint we perform certain operations that only take
time bounded by some constant. Therefore, the total time
needed is at most O(N log N) which is optimal to within a
constant factor.
2
If z;= Zi+1= = Zi+k, we assume that the right endpoints appear
before the left endpoints.
808
GUPTA et al.: CHANNEL-ASSIGNMENT PROBLEM
I6 -
IY
1Y
X4 1
1 y4
.2 .1
X3 1 -1 y3
X2,rtl ~~1, 11
x2
! 11 Y2
!Y,
Xi
.
X7 -- Y7
6 .
I
,.
Fig. 1. Example illustrating the algorithm. Fig. 2. Jobs represented by rectangles.
Fig. 3. Jobs represented by arbitrary figures.
We remark here that the optimality of this algorithm is
based on the assumption that the intervals are chosen from
an infinite set. In many real-world situations we have only a
finite number p of values that a terminal can occupy in the
wire-interconnection problem. Therefore, the proof of the
lower bound does not hold in this case. If the number N of
pairs of terminals to be connected is ofthe same order as p,
i.e., p = O(N), then we can use a method knownas radix-sort
for Step 1. The resulting algorithm will take 0(N) time which
again is optimal.
III. GENERALIZATION
In this section we shall generalizethe channel-assignment
problem to the case where each interval is replaced by an
arbitrary figure with boundaries being vertical and horizon-
tal lines. The generalization is motivated by the minimum-
resource fixed job scheduling problem in which a singlejob
may need more than one processor at any moment oftime.
For convenience, we shall describe the problem using job
scheduling terminology. The case where each figure is a
rectangle will be treated first. In this case, each job can be
specified as a 3-triple (xi, mi, yi), where xi and yi are the
starting and finishing times, respectively, and mi is the
number of processors required. Thus, in the original
scheduling problem, each job is represented by (xi, 1, yi).
Pictorially, each job is represented by a rectangle as shown
in Fig. 2, where thewidth ofa rectangle is theprocessing time
of the job and the height is the number of processors
required for executing the job.
The algorithm described in Section II can be applied with
a slight modification. Whenever the starting time ofa job Jk
is reached, we assign mk processors to it simultaneously.
When a job is finished, we release all mk processors. It is
readily seen that the modified algorithm works correctly in
0(N log N + M) time, where N is the number ofjobs and
M = EN=1 mi is the total number of processor assignment
and release operations. Since Q(N log N) is also a lower
bound for this problem and M operations are necessary,
Ql(N log N + M)is the lowerbound for this problem. Hence,
our algorithm is optimal to within a constant factor.
We now generalize the problem to jobs that require a
different number ofprocessors at different times duringtheir
execution. For example, the job in Fig. 3 needs two proces-
sors at time xl, four processors at time x2, six processors at
time X3, three processors at time x4, and it finishes at time
x5. In general, each job Ji can be represented as (x'1, m13, x2,
m ..,
x"1), where m5 (j = 1, 2, , si- 1) is the number of
processors required between time x, and x+1.
Let the size of the input N be defined as the number of
parameters needed to specify the input problem. Thus,
N =
E (2si- 1), where 2si- 1 is the number of par-
ameters needed to specifyjob J1 and n is the total number of
jobs. Let M = E 1 BI7I' m,. A natural question to ask is
whether Ql(N log N + M) is still a lower bound for this
problem. We show that Q(N log N + M) is indeed a lower
bound as follows. Consider the special case where input
consists ofn rectangles. Note that the inputsize N is equal to
3n. If we could solve the general case in less than Q(N log
N + M) time, then we could solve the special case in less
than Q2(n log n + M) time, which is impossible by our
previous result.
Now let us see if we can solve the general case in 0(N log
N + M) time. It is easily seen that eachjob J, = (xi, mi, X2,
m .*, xs) can be decomposed into si- 1 jobs J' = (x,, mJ,
x.,+ i)I
j = 1, 2, * *, si- 1. Therefore, by the previous result,
O(N' log N' + M) is sufficient, where N' is the total number
iI
ml
XI l
J3
m3
1 Y3
i2
m2
i. Y
x3
L
Y1
x2
809
IA
x1;
IEEE TRANSACTIONS ON COMPUTERS, VOL. c-28, NO. 1I, NOVEMBER 1979
of rectangles. Since N' = = (si- 1) = (N - n)/2 < N,
where n and N are the number ofjobs and the size of the
input, respectively, O(N log N + M) is also an upper bound.
Thus, we have the following theorem.
Theorem 1: Given a set of n jobs in which each job Ji is
represented by (xl, ml, x2, m2, , x5), where m, is the
number of processors needed between times x, and x,+ 1 for
j= 1,2,"-, si- 1, and x1,is the finishing time ofthejob. Let
Ndenote the size ofthe input and M bedefined as M =En
D_, mj. The minimum-resource fixedjob scheduling prob-
lem can be solved in O(N log N + M) time which is optimal
to within a constant factor.
IV. AVERAGE-CASE PERFORMANCE
In this section we describe an algorithm which runs in
linear expected time and is, therefore, optimal in the average
case. The algorithm uses a technique similar to one given in
[1]. Assume that the endpoints of N intervals are randomly
drawn from a uniform distribution over the unit interval (0,
1). We divide the unit interval into N/C bins, where C is
some constant. That is, each bin is an interval oflength C/N.
Then we perform the bin sort to assign each endpoint to the
bin to which it belongs. It is clear that this step takes linear
time if computation ofthe floor function in constant time is
allowed. Since thepoints are drawn from a uniform distribu-
tion, the expected number of points within each bin is the
constant C. The next thing we do is to sort the points in each
bin respectively. Again, this step takes linear time, since
sorting the C points within each bin takes 0(1) time and we
have N/C bins. Now we have obtained a sorted list and we
can apply the left-to-right scan as we did in Section II to do
the channel assignment.
As pointed out earlier, the O(N log N) running time ofthe
channel-assignment algorithm is due to the sorting step.
Since in the average case we can sort the endpoints in linear
expected time, the channel-assignment algorithm takes
linear expected time. Thus, we have the following theorem.
Theorem 2: Given a set ofN intervals whose endpoints are
drawn independently from a uniform distribution over the
unit interval (0, 1), the channel-assignment problem can be
solved in linear expected time which is optimal.
ACKNOWLEDGMENT
The authors wish to thank Prof. S. L. Hakimi and K.
Nakajima for bringing this problem to their attention, and
Prof. J. L. Bentley for providingvaluable information which
led to the result given in Section IV.
REFERENCES
[1] J. L. Bentley, B. Weide, and A. C. Yao, "Optimal expected time algor-
ithms for closest-point problems," in Proc. 16th Allerton Conf Comm.,
Control, Comput., Oct. 1978, pp. 843-851.
[2] R. P. Dilworth, "A decomposition theorem for partially ordered sets,"
Ann. Math., vol. 51, pp. 161-166, 1950.
[3] D. Dobkin and R. Lipton, "On the complexity ofcomputation under
varying sets of primitives," Dep. Comput. Sci., Yale Univ., New
Haven, CT, Tech. Rep. 42, 1975.
[4] M. L. Fredman and B. Weide, "On the complexity of computing the
measure of U[a1, bj]," Commun. Ass. Comput. Mach., vol. 21, pp.
540-544, July 1978.
[5] I. Gertsbakh and H. 1. Stern, "Minimal resources for fixed and var-
iable job schedules," Oper. Res., vol. 26, no. 1, pp. 68-85, 1978.
[6] P. C. Gilmore and A. J. Hoffman, "A characterization ofcomparabi-
lity graphs and of interval graphs," Can. J. Math., vol. 16, pp. 539-548,
1964.
[7] S. E. Lass, "Automated printed circuit routing with a stepping aper-
ture," Commun. Ass. Comput. Mach., vol. 12, pp. 262-265, May 1969.
[8] M. I. Shamos and D. Hoey, "Geometric intersection problems," in
17th Annu. Symp. Foundations Comput. Sci., Oct. 1976, pp. 208-215.
Udaiprakash I. Gupta (M'79) was born in Allaha-
bad, India, on February 4, 1952. He received
the B. Tech. (Elect. Eng.) degree from the
Indian Institute ofTechnology, Bombay, in 1974,
and the M.S.E., M.A., and Ph.D. degrees in
computer science from Princeton University,
Princeton, NJ, in 1975, 1976, and 1978, res-
pectively.
He is currently an Assistant Professor in the
Department of Electrical Engineering and Com-
puter Science, Northwestern University, Evans-
ton, IL. His research interests are in data base systems and the design
and analysis of algorithms.
Dr. Gupta is a member of the Association for Computing Machinery
and Sigma Xi.
D. T. Lee (S'76-M'78) was born in Taiwan on
April 5, 1949. He received the B.S. degree in
electrical engineering from the National Taiwan
University, Taipei, in 1971, and the M.S. and
Ph.D. degrees in computer science from the
University of Illinois, Urbana, in 1976 and 1978,
respectively.
He is presently an Assistant Professor at the
Department of Electrical Engineering and Com-
puter Science, Northwestern University, Evans-
ton, IL. During the summers of 1977 and 1979,
he visited the IBM T. J. Watson Research Center, Yorktown Heights, NY,
as a Researcher. His research interests include design and analysis of
algorithms, data base systems, computational geometry, and combi-
natorial computing.
Dr. Lee is a member ofthe Association for Computing Machinery and
the IEEE Computer Society.
Joseph Y.-T. Leung (M'78) was born in Hong
Kong on June 25, 1950. He received the B.A.
degree in mathematics from Southern Illinois
University, Carbondale, in 1972, and the Ph.D.
degree in computer science from the Pennsylvania
State University, University Park, in 1977.
From December 1976 to August 1977, he was
an Assistant Professor in the Department of
Computer Science, Virginia Polytechnic Institute
i and State University, Blacksburg. He is currently
an Assistant Professor in the Department of
Electrical Engineering and Computer Science, Northwestern University,
Evanston, IL. His research interests include analysis of algorithms,
operating systems, scheduling, and storage allocation problems.
Dr. Leung is a member of the Association for Computing Machinery.
810

More Related Content

Similar to An Optimal Solution For The Channel-Assignment Problem

Signal Constellation, Geometric Interpretation of Signals
Signal Constellation,  Geometric Interpretation of  SignalsSignal Constellation,  Geometric Interpretation of  Signals
Signal Constellation, Geometric Interpretation of SignalsArijitDhali
ย 
Graph theory and life
Graph theory and lifeGraph theory and life
Graph theory and lifeMilan Joshi
ย 
Fourier-transform analysis of a unilateral fin line and its derivatives
Fourier-transform analysis of a unilateral fin line and its derivativesFourier-transform analysis of a unilateral fin line and its derivatives
Fourier-transform analysis of a unilateral fin line and its derivativesYong Heui Cho
ย 
1 ECE 6340 Fall 2013 Homework 8 Assignment.docx
 1 ECE 6340 Fall 2013  Homework 8 Assignment.docx 1 ECE 6340 Fall 2013  Homework 8 Assignment.docx
1 ECE 6340 Fall 2013 Homework 8 Assignment.docxjoyjonna282
ย 
Lecture7 channel capacity
Lecture7   channel capacityLecture7   channel capacity
Lecture7 channel capacityFrank Katta
ย 
A Quest for Subexponential Time Parameterized Algorithms for Planar-k-Path: F...
A Quest for Subexponential Time Parameterized Algorithms for Planar-k-Path: F...A Quest for Subexponential Time Parameterized Algorithms for Planar-k-Path: F...
A Quest for Subexponential Time Parameterized Algorithms for Planar-k-Path: F...cseiitgn
ย 
Fourier supplementals
Fourier supplementalsFourier supplementals
Fourier supplementalsPartha_bappa
ย 
Cs6702 graph theory and applications Anna University question paper apr may 2...
Cs6702 graph theory and applications Anna University question paper apr may 2...Cs6702 graph theory and applications Anna University question paper apr may 2...
Cs6702 graph theory and applications Anna University question paper apr may 2...appasami
ย 
International Journal of Mathematics and Statistics Invention (IJMSI)
International Journal of Mathematics and Statistics Invention (IJMSI)International Journal of Mathematics and Statistics Invention (IJMSI)
International Journal of Mathematics and Statistics Invention (IJMSI)inventionjournals
ย 
DETECTION OF MOVING OBJECT
DETECTION OF MOVING OBJECTDETECTION OF MOVING OBJECT
DETECTION OF MOVING OBJECTAM Publications
ย 
Implicit schemes for wave models
Implicit schemes for wave modelsImplicit schemes for wave models
Implicit schemes for wave modelsMathieu Dutour Sikiric
ย 
International journal of applied sciences and innovation vol 2015 - no 1 - ...
International journal of applied sciences and innovation   vol 2015 - no 1 - ...International journal of applied sciences and innovation   vol 2015 - no 1 - ...
International journal of applied sciences and innovation vol 2015 - no 1 - ...sophiabelthome
ย 
1416336962.pdf
1416336962.pdf1416336962.pdf
1416336962.pdfANNGUYEN90427
ย 
cis98010
cis98010cis98010
cis98010perfj
ย 
BNL_Research_Report
BNL_Research_ReportBNL_Research_Report
BNL_Research_ReportBrandon McKinzie
ย 
ODD HARMONIOUS LABELINGS OF CYCLIC SNAKES
ODD HARMONIOUS LABELINGS OF CYCLIC SNAKESODD HARMONIOUS LABELINGS OF CYCLIC SNAKES
ODD HARMONIOUS LABELINGS OF CYCLIC SNAKESgraphhoc
ย 
Logistics Management Assignment Help
Logistics Management Assignment Help Logistics Management Assignment Help
Logistics Management Assignment Help Statistics Assignment Help
ย 

Similar to An Optimal Solution For The Channel-Assignment Problem (20)

Lecture3
Lecture3Lecture3
Lecture3
ย 
Signal Constellation, Geometric Interpretation of Signals
Signal Constellation,  Geometric Interpretation of  SignalsSignal Constellation,  Geometric Interpretation of  Signals
Signal Constellation, Geometric Interpretation of Signals
ย 
Graph theory and life
Graph theory and lifeGraph theory and life
Graph theory and life
ย 
Fourier-transform analysis of a unilateral fin line and its derivatives
Fourier-transform analysis of a unilateral fin line and its derivativesFourier-transform analysis of a unilateral fin line and its derivatives
Fourier-transform analysis of a unilateral fin line and its derivatives
ย 
Quantum Noise and Error Correction
Quantum Noise and Error CorrectionQuantum Noise and Error Correction
Quantum Noise and Error Correction
ย 
1 ECE 6340 Fall 2013 Homework 8 Assignment.docx
 1 ECE 6340 Fall 2013  Homework 8 Assignment.docx 1 ECE 6340 Fall 2013  Homework 8 Assignment.docx
1 ECE 6340 Fall 2013 Homework 8 Assignment.docx
ย 
Lecture7 channel capacity
Lecture7   channel capacityLecture7   channel capacity
Lecture7 channel capacity
ย 
A Quest for Subexponential Time Parameterized Algorithms for Planar-k-Path: F...
A Quest for Subexponential Time Parameterized Algorithms for Planar-k-Path: F...A Quest for Subexponential Time Parameterized Algorithms for Planar-k-Path: F...
A Quest for Subexponential Time Parameterized Algorithms for Planar-k-Path: F...
ย 
Fourier supplementals
Fourier supplementalsFourier supplementals
Fourier supplementals
ย 
Cs6702 graph theory and applications Anna University question paper apr may 2...
Cs6702 graph theory and applications Anna University question paper apr may 2...Cs6702 graph theory and applications Anna University question paper apr may 2...
Cs6702 graph theory and applications Anna University question paper apr may 2...
ย 
International Journal of Mathematics and Statistics Invention (IJMSI)
International Journal of Mathematics and Statistics Invention (IJMSI)International Journal of Mathematics and Statistics Invention (IJMSI)
International Journal of Mathematics and Statistics Invention (IJMSI)
ย 
DETECTION OF MOVING OBJECT
DETECTION OF MOVING OBJECTDETECTION OF MOVING OBJECT
DETECTION OF MOVING OBJECT
ย 
Implicit schemes for wave models
Implicit schemes for wave modelsImplicit schemes for wave models
Implicit schemes for wave models
ย 
International journal of applied sciences and innovation vol 2015 - no 1 - ...
International journal of applied sciences and innovation   vol 2015 - no 1 - ...International journal of applied sciences and innovation   vol 2015 - no 1 - ...
International journal of applied sciences and innovation vol 2015 - no 1 - ...
ย 
1416336962.pdf
1416336962.pdf1416336962.pdf
1416336962.pdf
ย 
cis98010
cis98010cis98010
cis98010
ย 
BNL_Research_Report
BNL_Research_ReportBNL_Research_Report
BNL_Research_Report
ย 
ODD HARMONIOUS LABELINGS OF CYCLIC SNAKES
ODD HARMONIOUS LABELINGS OF CYCLIC SNAKESODD HARMONIOUS LABELINGS OF CYCLIC SNAKES
ODD HARMONIOUS LABELINGS OF CYCLIC SNAKES
ย 
Chapter 4
Chapter 4Chapter 4
Chapter 4
ย 
Logistics Management Assignment Help
Logistics Management Assignment Help Logistics Management Assignment Help
Logistics Management Assignment Help
ย 

More from Sarah Morrow

Pin On EDU. Online assignment writing service.
Pin On EDU. Online assignment writing service.Pin On EDU. Online assignment writing service.
Pin On EDU. Online assignment writing service.Sarah Morrow
ย 
Pin Page. Online assignment writing service.
Pin Page. Online assignment writing service.Pin Page. Online assignment writing service.
Pin Page. Online assignment writing service.Sarah Morrow
ย 
Printable Writing Paper Printable Letter Paper Print
Printable Writing Paper Printable Letter Paper PrintPrintable Writing Paper Printable Letter Paper Print
Printable Writing Paper Printable Letter Paper PrintSarah Morrow
ย 
How To Write A Topic Outline For A Research Paper. How To Write A
How To Write A Topic Outline For A Research Paper. How To Write AHow To Write A Topic Outline For A Research Paper. How To Write A
How To Write A Topic Outline For A Research Paper. How To Write ASarah Morrow
ย 
What To Write In A Paper Fortune Teller. Online assignment writing service.
What To Write In A Paper Fortune Teller. Online assignment writing service.What To Write In A Paper Fortune Teller. Online assignment writing service.
What To Write In A Paper Fortune Teller. Online assignment writing service.Sarah Morrow
ย 
Graffiti Names New Graffiti Art. Online assignment writing service.
Graffiti Names New Graffiti Art. Online assignment writing service.Graffiti Names New Graffiti Art. Online assignment writing service.
Graffiti Names New Graffiti Art. Online assignment writing service.Sarah Morrow
ย 
5 Paragraph. Online assignment writing service.
5 Paragraph. Online assignment writing service.5 Paragraph. Online assignment writing service.
5 Paragraph. Online assignment writing service.Sarah Morrow
ย 
Topics For Writing Opinion Essay Telegraph
Topics For Writing Opinion Essay TelegraphTopics For Writing Opinion Essay Telegraph
Topics For Writing Opinion Essay TelegraphSarah Morrow
ย 
Writing My Research Paper The Main Characteristics O
Writing My Research Paper The Main Characteristics OWriting My Research Paper The Main Characteristics O
Writing My Research Paper The Main Characteristics OSarah Morrow
ย 
This Step By Step Guide Will Help You Write An Awesom
This Step By Step Guide Will Help You Write An AwesomThis Step By Step Guide Will Help You Write An Awesom
This Step By Step Guide Will Help You Write An AwesomSarah Morrow
ย 
002 Personal Essay Outline Narrative Examples Colleg
002 Personal Essay Outline Narrative Examples Colleg002 Personal Essay Outline Narrative Examples Colleg
002 Personal Essay Outline Narrative Examples CollegSarah Morrow
ย 
Persuasive Essay Comparison Essay Outline T
Persuasive Essay Comparison Essay Outline TPersuasive Essay Comparison Essay Outline T
Persuasive Essay Comparison Essay Outline TSarah Morrow
ย 
Advertising Essay. Online assignment writing service.
Advertising Essay. Online assignment writing service.Advertising Essay. Online assignment writing service.
Advertising Essay. Online assignment writing service.Sarah Morrow
ย 
How To Write Physics Lab Reports With Regard To Phy
How To Write Physics Lab Reports With Regard To PhyHow To Write Physics Lab Reports With Regard To Phy
How To Write Physics Lab Reports With Regard To PhySarah Morrow
ย 
Blank Life Story Outline Format Story Outline Temp
Blank Life Story Outline Format  Story Outline TempBlank Life Story Outline Format  Story Outline Temp
Blank Life Story Outline Format Story Outline TempSarah Morrow
ย 
How To Do An Essay Proposal. How To Write A
How To Do An Essay Proposal. How To Write AHow To Do An Essay Proposal. How To Write A
How To Do An Essay Proposal. How To Write ASarah Morrow
ย 
PDF Writing Research Papers A Complete Guide
PDF Writing Research Papers A Complete GuidePDF Writing Research Papers A Complete Guide
PDF Writing Research Papers A Complete GuideSarah Morrow
ย 
Reflection Essay College Writing Sam. Online assignment writing service.
Reflection Essay College Writing Sam. Online assignment writing service.Reflection Essay College Writing Sam. Online assignment writing service.
Reflection Essay College Writing Sam. Online assignment writing service.Sarah Morrow
ย 
007 What Is An Exploratory Essay Example Workshee
007 What Is An Exploratory Essay Example Workshee007 What Is An Exploratory Essay Example Workshee
007 What Is An Exploratory Essay Example WorksheeSarah Morrow
ย 
Essay Writing Competitions - Javatpoint. Online assignment writing service.
Essay Writing Competitions - Javatpoint. Online assignment writing service.Essay Writing Competitions - Javatpoint. Online assignment writing service.
Essay Writing Competitions - Javatpoint. Online assignment writing service.Sarah Morrow
ย 

More from Sarah Morrow (20)

Pin On EDU. Online assignment writing service.
Pin On EDU. Online assignment writing service.Pin On EDU. Online assignment writing service.
Pin On EDU. Online assignment writing service.
ย 
Pin Page. Online assignment writing service.
Pin Page. Online assignment writing service.Pin Page. Online assignment writing service.
Pin Page. Online assignment writing service.
ย 
Printable Writing Paper Printable Letter Paper Print
Printable Writing Paper Printable Letter Paper PrintPrintable Writing Paper Printable Letter Paper Print
Printable Writing Paper Printable Letter Paper Print
ย 
How To Write A Topic Outline For A Research Paper. How To Write A
How To Write A Topic Outline For A Research Paper. How To Write AHow To Write A Topic Outline For A Research Paper. How To Write A
How To Write A Topic Outline For A Research Paper. How To Write A
ย 
What To Write In A Paper Fortune Teller. Online assignment writing service.
What To Write In A Paper Fortune Teller. Online assignment writing service.What To Write In A Paper Fortune Teller. Online assignment writing service.
What To Write In A Paper Fortune Teller. Online assignment writing service.
ย 
Graffiti Names New Graffiti Art. Online assignment writing service.
Graffiti Names New Graffiti Art. Online assignment writing service.Graffiti Names New Graffiti Art. Online assignment writing service.
Graffiti Names New Graffiti Art. Online assignment writing service.
ย 
5 Paragraph. Online assignment writing service.
5 Paragraph. Online assignment writing service.5 Paragraph. Online assignment writing service.
5 Paragraph. Online assignment writing service.
ย 
Topics For Writing Opinion Essay Telegraph
Topics For Writing Opinion Essay TelegraphTopics For Writing Opinion Essay Telegraph
Topics For Writing Opinion Essay Telegraph
ย 
Writing My Research Paper The Main Characteristics O
Writing My Research Paper The Main Characteristics OWriting My Research Paper The Main Characteristics O
Writing My Research Paper The Main Characteristics O
ย 
This Step By Step Guide Will Help You Write An Awesom
This Step By Step Guide Will Help You Write An AwesomThis Step By Step Guide Will Help You Write An Awesom
This Step By Step Guide Will Help You Write An Awesom
ย 
002 Personal Essay Outline Narrative Examples Colleg
002 Personal Essay Outline Narrative Examples Colleg002 Personal Essay Outline Narrative Examples Colleg
002 Personal Essay Outline Narrative Examples Colleg
ย 
Persuasive Essay Comparison Essay Outline T
Persuasive Essay Comparison Essay Outline TPersuasive Essay Comparison Essay Outline T
Persuasive Essay Comparison Essay Outline T
ย 
Advertising Essay. Online assignment writing service.
Advertising Essay. Online assignment writing service.Advertising Essay. Online assignment writing service.
Advertising Essay. Online assignment writing service.
ย 
How To Write Physics Lab Reports With Regard To Phy
How To Write Physics Lab Reports With Regard To PhyHow To Write Physics Lab Reports With Regard To Phy
How To Write Physics Lab Reports With Regard To Phy
ย 
Blank Life Story Outline Format Story Outline Temp
Blank Life Story Outline Format  Story Outline TempBlank Life Story Outline Format  Story Outline Temp
Blank Life Story Outline Format Story Outline Temp
ย 
How To Do An Essay Proposal. How To Write A
How To Do An Essay Proposal. How To Write AHow To Do An Essay Proposal. How To Write A
How To Do An Essay Proposal. How To Write A
ย 
PDF Writing Research Papers A Complete Guide
PDF Writing Research Papers A Complete GuidePDF Writing Research Papers A Complete Guide
PDF Writing Research Papers A Complete Guide
ย 
Reflection Essay College Writing Sam. Online assignment writing service.
Reflection Essay College Writing Sam. Online assignment writing service.Reflection Essay College Writing Sam. Online assignment writing service.
Reflection Essay College Writing Sam. Online assignment writing service.
ย 
007 What Is An Exploratory Essay Example Workshee
007 What Is An Exploratory Essay Example Workshee007 What Is An Exploratory Essay Example Workshee
007 What Is An Exploratory Essay Example Workshee
ย 
Essay Writing Competitions - Javatpoint. Online assignment writing service.
Essay Writing Competitions - Javatpoint. Online assignment writing service.Essay Writing Competitions - Javatpoint. Online assignment writing service.
Essay Writing Competitions - Javatpoint. Online assignment writing service.
ย 

Recently uploaded

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
ย 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
ย 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
ย 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
ย 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
ย 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
ย 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
ย 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
ย 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
ย 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
ย 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
ย 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
ย 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
ย 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
ย 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
ย 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
ย 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
ย 

Recently uploaded (20)

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
ย 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
ย 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
ย 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
ย 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
ย 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
ย 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
ย 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
ย 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
ย 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
ย 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
ย 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
ย 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
ย 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
ย 
Cรณdigo Creativo y Arte de Software | Unidad 1
Cรณdigo Creativo y Arte de Software | Unidad 1Cรณdigo Creativo y Arte de Software | Unidad 1
Cรณdigo Creativo y Arte de Software | Unidad 1
ย 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
ย 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
ย 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
ย 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ย 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
ย 

An Optimal Solution For The Channel-Assignment Problem

  • 1. IEEE TRANSACTIONS ON COMPUTERS, VOL. c-28, NO. 11, NOVEMBER 1979 An Optimal Solution for the Channel-Assignment Problem UDAIPRAKASH I. GUPTA, MEMBER, IEEE, D. T. LEE, MEMBER, IEEE, AND JOSEPH Y.-T. LEUNG, MEMBER, IEEE Abstract-Given a set ofintervals (pairsofreal numbers), we look at the problem of finding a minimal partition ofthis set such that no element of the partition contains two overlapping intervals. We exhibit a O(N log N) algorithm which is optimal. The problem has applications in LSI layout design and job scheduling. Index Terms-Channel-assignment problem, job scheduling, LSI layout design, analysis of algorithms. I. INTRODUCTION W1 rE consider the following abstract problem. Let S = {Ii= (xi, yi) xi and yi are real numbers and xi <yi, 1 < i < N} be a set of N open intervals. Intervals Ii and Ij are said to be overlapping iff Ii n) Ij ), and nonoverlapping otherwise. A subset S' of S is overlapping if nIf eS Ii $ 4, i.e., all intervals in S' are overlapping. We want to find for a given set S 1) the degree ofoverlap ofS, k, where k = max { S' S' c S and S' is overlapping} and 2) a partition of S into k subsets such that the intervals in each subset are pairwise nonoverlapping. We shall call this the channel-assignment problem. This problem arises in several applications such as LSI layout design and job scheduling. In LSI layout design we are confronted with the following wire interconnection problem. We are given a two-sided printed circuit board in which there are horizontal lines (called channels) on one side and vertical lines on the other. We have a set ofN pairs ofcomponents (each component is to be placed on a specific vertical line) and each pair of components is to be connected by a horizontal line segment. The problem of interest is to minimize the number of channels necessary to connect them. It is obvious that ifwe can allocate a smaller number ofchannels to the compon- ents, we will have more channels available to accommodate more components. Two pairs of components can share the same channel if their connections do not conflict with each other. In other words, if we represent the position of the two-component pair as an interval (xi, y,), then two pairs of components can share one channel if their corresponding intervals are nonoverlapping. Thus, referring to our original problem, the set S will be the set of component pairs; the degree ofoverlap of S will determine the minimum number ofchannels required and the partition will be an assignment of component pairs to channels without conflict. Manuscript received December 20, 1978; revised June 11, 1979. The authors are with the Department of Electrical Engineering and Computer Science, Northwestern University, Evanston, IL 60201. In the context ofjob scheduling, each interval (xi, yA)can be interpreted as a job which must be executed by some processor at time xi and finished at time yi. The processing time for the job is yi- xi. Two jobs can be assigned to the same processor if the intervals are nonoverlapping. The problem is to find a schedule which minimizes the number of processors required. This problem is referred to as the minimum-resource fixed job scheduling problem [5]. The channel-assignment problem has been studied by a number ofpeople [5], [7] using graph-theoretic approaches. Given a set S of N intervals Ii = (xi, yi), 1 < i < N, we can construct a graph GI = (V, EI), where each vertex in V corresponds to an interval and two vertices are connected by an edge in EI iffthe corresponding intervals are overlapping. Such a graph is called an interval graph. Gihnore and Hoffman [6] give a complete characterization of interval graphs. Finding the degree of overlap of S is equivalent to finding the chromatic number ofthe corresponding interval graph. On the other hand, we can also construct a directed graph Gc = (V, EJ),where each vertex viin Vcorresponds to an interval (xi, yi), and a directed edge from vi_to vjexists iff yi < x. The resultant graph is a comparability graph [6], since the ordering 1i xc Ii iffyi < xjdefinesapartial order on S. In this graph the least number ofdirected paths that cover all the vertices is the degree of overlap of S, and the set of directed paths defines the partition ofthe set S ofintervals. This problem is known as Dilworth's path cover problem [2]. These graph-theoretic approaches give rise to algorithms that are at least Q(N2)since it takes 0(N2)steps1 to construct these graphs. Recently Gertsbakh and Stern [5] introduced the idea of "step-function" to solve the minimum-resource fixed job scheduling problem. They define the function fs(t) as fol- lows:fs(O) = 0. When a job starts, the function increases by one unit; when a job ends, the function decreases by one unit. Thus, the value offs(t) is equal to the number ofjobs being processed at time t. The maximum value offs(t) is the total number ofprocessors required. In order to construct a schedule that assignsjob to processors, they first construct a string of jobs which are known to be executable in one processor, i.e., those jobs whose starting times are larger 1 We say that g(n) = 0(f(n)) if g(n) < cf(n) for some constant c and all sufficiently large n, g(n) = Ql(f(n)) if g(n) > cf(n) for some constant c > 0 and all sufficiently large n, and g(n) = O(f:(n)) if both g(n) = 0(f(n)) and g(n) = Q(f(n)) hold. 0018-9340/79/1100-0807$00.75 ยฉ 1979 IEEE 807
  • 2. IEEE TRANSACTIONS ON COMPUTERS, VOL. C-28, NO. 11, NOVEMBER 1979 than the finishing times ofprevious jobs. Then this string of jobs is removed and the above process repeated. This method, although it differs from the previous known graph- theoretic approaches, takes n(N2) time in the worst case, since it is possible that in each iteration we can only assign one job to a processor and we need n iterations. We will now briefly outline the remainder ofthe paper. In the next section we shall give an optimal algorithm for the channel-assignment problem. In Section III we shall extend our result to handle the case where each interval is replaced by an arbitrary figure with boundaries being horizontal and vertical lines. II. OPTIMAL ALGORITHM We first show that to determine the minimum number of channels required takes at least Q(N log N) time, where N is the number of pairs (xi, yi) ofterminals. Shamos and Hoey [8] and Fredman and Weide [4]have shownthat Q(N log N) is a lower bound on the time required to determine whether N intervals on a line are pairwise disjoint. (The number of channels required for N pairs (xi, y,) is greater than 1 iffthe N intervals (xi, y1) have at least one overlap.) Their result follows from the Ql(N log N) lower bound (due to Dobkin and Lipton [3]) for the element uniqueness problem; that is, given N numbers, it is to be determined if they are all distinct. If we could determine the minimum number of channels required in less than Q(N log N)time,we would be able to determine whether N intervals on a line are pairwise disjoint in less than Q(N log N) time, which is impossible by [4], [8]. Now let us describe informally how we can determine the maximum number of channels required and an assignment of each pair of terminals to a channel in O(N log N) time. Assume that each pair (xi, yi) is considered to be an interval Ii on the x-axis, where xi and yi are the x-coordinates of endpoints and xi < y . Callthese two endpoints left and right endpoints, respectively. Clearly, if all the intervals are pairwise disjoint, i.e., they are nonoverlapping, then one channel will be sufficient. Moreover, overlapping intervals should be assigned to different channels. We shall sort the 2N endpoints in the increasing order oftheir x-coordinates and-rename the intervals so that X1 < X2 < .. <_ XN. As shown in Fig. 1, we have seven intervals and for convenience these intervals are "laid out" in the y-axis direction. We then scan the intervals from left to right. If a left endpoint is encountered, we assign the corresponding interval to the next available channel. Ifa right endpoint is encountered, we release the channel occupied by the corresponding interval and make the released channel available again. We alsokeep a counter to record the number of channels currently occupied. Initially, the counter is set to zero and all the channels are available. In order to keep track of the interval assignment we maintain an array ASGN for intervals, i.e., interval I. is assigned to channel k if ASGN(j) = k. Also, we maintain a stack ofavailable channels. Whenever a channel is required, we "pop" the stack and assign the channel to the interval under consideration. If a channel becomes available, we "push" it onto the stack. For example, in Fig. 1, we assign channel 1 to interval I, when xl is scanned and assign channels 2 and 3 to intervals I2 and I3 when x2 and X3 are scanned. Since the next endpoint scanned Yi is a right endpoint of I,, channel 1, which was assigned to I , is released. The next interval I4 can then be assigned to channel 1 again. Afterthe last endpoint Y7 is scanned,we will obtain the following: intervals II and I4 are assigned to channel, I2, I6, and I7are assigned to channel 2, and I3and I5 to channel 3. Three channels are, therefore, sufficient. The following algorithm precisely describes the procedure that we just sketched. Algorithmfor Channel-Assignment Problem Input: N intervals I1,I2I 2 , INrepresented inthe form (xi, y)and xi<y, for all 1 < i < N. Output: The number of channels needed and the assign- ment of intervals to channels. Method: We employ two auxiliary arrays ASGN and NEXr for the assignment of intervals to channels and the list of available channels, respectively. COUNTER iS used to keep track of the number of channels needed currently and CHANNEL is a pointer pointing to the top of the list of available channels, namely, the next available channel. MAXCHAN keeps track ofthe maximum number ofchannels ever needed. Step 1: Sort the 2N endpoints to obtain Z1 < Z2 < < Z2N.2 Step 2: COUNTER 4-0, MAXCHAN 0, CHANNEL +- 1. Step 3: for i = ito N do: NEXT (i) - i + 1. Step 4: for j = 1 to 2N do: if zi is a left endpoint of interval Ik then begin COUNTER 4- COUNTER + 1, MAXCHAN 4- max {COUNTER, MAXCHAN}, ASGN (k) +- CHANNEL, CHANNEL NEXT (CHANNEL) end else {zj is a right endpoint of some interval Ik} begin COUNTER 4- COUNTER- 1, TEMP 4- ASGN (k), NEXT (TEMP) +- CHANNEL, CHANNEL 4- TEMP end. The correctness of the algorithm can be easily verified. Now let us analyze the computing time taken by this algorithm. Step 1 takes O(N log N) time to sort 2Nnumbers. Step 2 takes time bounded by some constant and Step 3 takes O(N)time. Step 4 examines each endpoint once, and for each endpoint we perform certain operations that only take time bounded by some constant. Therefore, the total time needed is at most O(N log N) which is optimal to within a constant factor. 2 If z;= Zi+1= = Zi+k, we assume that the right endpoints appear before the left endpoints. 808
  • 3. GUPTA et al.: CHANNEL-ASSIGNMENT PROBLEM I6 - IY 1Y X4 1 1 y4 .2 .1 X3 1 -1 y3 X2,rtl ~~1, 11 x2 ! 11 Y2 !Y, Xi . X7 -- Y7 6 . I ,. Fig. 1. Example illustrating the algorithm. Fig. 2. Jobs represented by rectangles. Fig. 3. Jobs represented by arbitrary figures. We remark here that the optimality of this algorithm is based on the assumption that the intervals are chosen from an infinite set. In many real-world situations we have only a finite number p of values that a terminal can occupy in the wire-interconnection problem. Therefore, the proof of the lower bound does not hold in this case. If the number N of pairs of terminals to be connected is ofthe same order as p, i.e., p = O(N), then we can use a method knownas radix-sort for Step 1. The resulting algorithm will take 0(N) time which again is optimal. III. GENERALIZATION In this section we shall generalizethe channel-assignment problem to the case where each interval is replaced by an arbitrary figure with boundaries being vertical and horizon- tal lines. The generalization is motivated by the minimum- resource fixed job scheduling problem in which a singlejob may need more than one processor at any moment oftime. For convenience, we shall describe the problem using job scheduling terminology. The case where each figure is a rectangle will be treated first. In this case, each job can be specified as a 3-triple (xi, mi, yi), where xi and yi are the starting and finishing times, respectively, and mi is the number of processors required. Thus, in the original scheduling problem, each job is represented by (xi, 1, yi). Pictorially, each job is represented by a rectangle as shown in Fig. 2, where thewidth ofa rectangle is theprocessing time of the job and the height is the number of processors required for executing the job. The algorithm described in Section II can be applied with a slight modification. Whenever the starting time ofa job Jk is reached, we assign mk processors to it simultaneously. When a job is finished, we release all mk processors. It is readily seen that the modified algorithm works correctly in 0(N log N + M) time, where N is the number ofjobs and M = EN=1 mi is the total number of processor assignment and release operations. Since Q(N log N) is also a lower bound for this problem and M operations are necessary, Ql(N log N + M)is the lowerbound for this problem. Hence, our algorithm is optimal to within a constant factor. We now generalize the problem to jobs that require a different number ofprocessors at different times duringtheir execution. For example, the job in Fig. 3 needs two proces- sors at time xl, four processors at time x2, six processors at time X3, three processors at time x4, and it finishes at time x5. In general, each job Ji can be represented as (x'1, m13, x2, m .., x"1), where m5 (j = 1, 2, , si- 1) is the number of processors required between time x, and x+1. Let the size of the input N be defined as the number of parameters needed to specify the input problem. Thus, N = E (2si- 1), where 2si- 1 is the number of par- ameters needed to specifyjob J1 and n is the total number of jobs. Let M = E 1 BI7I' m,. A natural question to ask is whether Ql(N log N + M) is still a lower bound for this problem. We show that Q(N log N + M) is indeed a lower bound as follows. Consider the special case where input consists ofn rectangles. Note that the inputsize N is equal to 3n. If we could solve the general case in less than Q(N log N + M) time, then we could solve the special case in less than Q2(n log n + M) time, which is impossible by our previous result. Now let us see if we can solve the general case in 0(N log N + M) time. It is easily seen that eachjob J, = (xi, mi, X2, m .*, xs) can be decomposed into si- 1 jobs J' = (x,, mJ, x.,+ i)I j = 1, 2, * *, si- 1. Therefore, by the previous result, O(N' log N' + M) is sufficient, where N' is the total number iI ml XI l J3 m3 1 Y3 i2 m2 i. Y x3 L Y1 x2 809 IA x1;
  • 4. IEEE TRANSACTIONS ON COMPUTERS, VOL. c-28, NO. 1I, NOVEMBER 1979 of rectangles. Since N' = = (si- 1) = (N - n)/2 < N, where n and N are the number ofjobs and the size of the input, respectively, O(N log N + M) is also an upper bound. Thus, we have the following theorem. Theorem 1: Given a set of n jobs in which each job Ji is represented by (xl, ml, x2, m2, , x5), where m, is the number of processors needed between times x, and x,+ 1 for j= 1,2,"-, si- 1, and x1,is the finishing time ofthejob. Let Ndenote the size ofthe input and M bedefined as M =En D_, mj. The minimum-resource fixedjob scheduling prob- lem can be solved in O(N log N + M) time which is optimal to within a constant factor. IV. AVERAGE-CASE PERFORMANCE In this section we describe an algorithm which runs in linear expected time and is, therefore, optimal in the average case. The algorithm uses a technique similar to one given in [1]. Assume that the endpoints of N intervals are randomly drawn from a uniform distribution over the unit interval (0, 1). We divide the unit interval into N/C bins, where C is some constant. That is, each bin is an interval oflength C/N. Then we perform the bin sort to assign each endpoint to the bin to which it belongs. It is clear that this step takes linear time if computation ofthe floor function in constant time is allowed. Since thepoints are drawn from a uniform distribu- tion, the expected number of points within each bin is the constant C. The next thing we do is to sort the points in each bin respectively. Again, this step takes linear time, since sorting the C points within each bin takes 0(1) time and we have N/C bins. Now we have obtained a sorted list and we can apply the left-to-right scan as we did in Section II to do the channel assignment. As pointed out earlier, the O(N log N) running time ofthe channel-assignment algorithm is due to the sorting step. Since in the average case we can sort the endpoints in linear expected time, the channel-assignment algorithm takes linear expected time. Thus, we have the following theorem. Theorem 2: Given a set ofN intervals whose endpoints are drawn independently from a uniform distribution over the unit interval (0, 1), the channel-assignment problem can be solved in linear expected time which is optimal. ACKNOWLEDGMENT The authors wish to thank Prof. S. L. Hakimi and K. Nakajima for bringing this problem to their attention, and Prof. J. L. Bentley for providingvaluable information which led to the result given in Section IV. REFERENCES [1] J. L. Bentley, B. Weide, and A. C. Yao, "Optimal expected time algor- ithms for closest-point problems," in Proc. 16th Allerton Conf Comm., Control, Comput., Oct. 1978, pp. 843-851. [2] R. P. Dilworth, "A decomposition theorem for partially ordered sets," Ann. Math., vol. 51, pp. 161-166, 1950. [3] D. Dobkin and R. Lipton, "On the complexity ofcomputation under varying sets of primitives," Dep. Comput. Sci., Yale Univ., New Haven, CT, Tech. Rep. 42, 1975. [4] M. L. Fredman and B. Weide, "On the complexity of computing the measure of U[a1, bj]," Commun. Ass. Comput. Mach., vol. 21, pp. 540-544, July 1978. [5] I. Gertsbakh and H. 1. Stern, "Minimal resources for fixed and var- iable job schedules," Oper. Res., vol. 26, no. 1, pp. 68-85, 1978. [6] P. C. Gilmore and A. J. Hoffman, "A characterization ofcomparabi- lity graphs and of interval graphs," Can. J. Math., vol. 16, pp. 539-548, 1964. [7] S. E. Lass, "Automated printed circuit routing with a stepping aper- ture," Commun. Ass. Comput. Mach., vol. 12, pp. 262-265, May 1969. [8] M. I. Shamos and D. Hoey, "Geometric intersection problems," in 17th Annu. Symp. Foundations Comput. Sci., Oct. 1976, pp. 208-215. Udaiprakash I. Gupta (M'79) was born in Allaha- bad, India, on February 4, 1952. He received the B. Tech. (Elect. Eng.) degree from the Indian Institute ofTechnology, Bombay, in 1974, and the M.S.E., M.A., and Ph.D. degrees in computer science from Princeton University, Princeton, NJ, in 1975, 1976, and 1978, res- pectively. He is currently an Assistant Professor in the Department of Electrical Engineering and Com- puter Science, Northwestern University, Evans- ton, IL. His research interests are in data base systems and the design and analysis of algorithms. Dr. Gupta is a member of the Association for Computing Machinery and Sigma Xi. D. T. Lee (S'76-M'78) was born in Taiwan on April 5, 1949. He received the B.S. degree in electrical engineering from the National Taiwan University, Taipei, in 1971, and the M.S. and Ph.D. degrees in computer science from the University of Illinois, Urbana, in 1976 and 1978, respectively. He is presently an Assistant Professor at the Department of Electrical Engineering and Com- puter Science, Northwestern University, Evans- ton, IL. During the summers of 1977 and 1979, he visited the IBM T. J. Watson Research Center, Yorktown Heights, NY, as a Researcher. His research interests include design and analysis of algorithms, data base systems, computational geometry, and combi- natorial computing. Dr. Lee is a member ofthe Association for Computing Machinery and the IEEE Computer Society. Joseph Y.-T. Leung (M'78) was born in Hong Kong on June 25, 1950. He received the B.A. degree in mathematics from Southern Illinois University, Carbondale, in 1972, and the Ph.D. degree in computer science from the Pennsylvania State University, University Park, in 1977. From December 1976 to August 1977, he was an Assistant Professor in the Department of Computer Science, Virginia Polytechnic Institute i and State University, Blacksburg. He is currently an Assistant Professor in the Department of Electrical Engineering and Computer Science, Northwestern University, Evanston, IL. His research interests include analysis of algorithms, operating systems, scheduling, and storage allocation problems. Dr. Leung is a member of the Association for Computing Machinery. 810