CSIS8601: Probabilistic Method & Randomized Algorithms
Lecture 9: Lovasz Local Lemma, Job Shop Scheduling
Lecturer: Hubert Chan
Date: 18 Nov 2009
These lecture notes are supplementary materials for the lectures. They are by no means substitutes
for attending lectures or replacement for your own notes!
1
Limited Dependency
We have seen how the union bound is used in probabilistic method. Suppose π΄0 , π΄1 , . . . , π΄πβ1 are
bad events (not necessarily independent) such that each π π[π΄π ] β€ π. If ππ < 1, then by union
bound, we conclude that π π[βͺπ π΄π ] β€ ππ < 1, and hence, with positive probability, none of the bad
events occur. We see that if the events have limited dependency, we can have the same conclusion
under a weaker condition.
Deο¬nition 1.1 (Dependency Graph) Suppose π΄0 , π΄1 , . . . , π΄πβ1 are events in some probability
space. A dependency graph π» = (π, πΈ) is a graph with vertex set π = [π] such that for each π β [π],
if π½ := {π : {π, π} β πΈ} is the set of neighbors of π, then the event π΄π is independent of all the events
{π΄π : π ββ π½}.
Formally, for any disjoint subsets π½1 , π½2 β [π] β π½,
π π[π΄π ] = π π[π΄π β£(β©πβπ½1 π΄π ) β© (β©πβπ½2 π΄π )].
Remark 1.2 Observe that the dependency graph is not unique. The complete graph is trivially a
dependency graph, but not a very useful one.
1.1
Example: Monochromatic Subsets
Recall from the ο¬rst lecture that π1 , π2 , . . . , ππ are π-subsets of π . We show that if π < 2πβ1 , then
it is possible to color each element of π BLUE or RED such that none of ππ is monochromatic. We
show that if the subsets have limited intersection, then π does not have to depend on π.
Theorem 1.3 (Lovasz Local Lemma) Suppose the collection {π΄π : π β [π]} of events has a
dependency graph with maximum degree π· β₯ 1. Suppose further that for each π, π π[π΄π ] β€ π, and
4ππ· β€ 1. Then, π π[βͺπ π΄π ] < 1, i.e., with positive probability, none of the events π΄π happens.
Claim 1.4 Suppose each subset ππ intersects at most 2πβ3 other subsets. Then, it is possible to
color each element of π BLUE or RED such that none of the subsets ππ is monochromatic.
Proof: For each element in π , we pick a color uniformly at random. Let π΄π be the event that
1
the subset ππ is monochromatic. Then, π := π π[π΄π ] = 2πβ1
.
Observe that the event π΄π is independent of all events π΄π βs such that ππ β© ππ = β
. Hence, in the
dependency graph π» = ([π], πΈ), {π, π} β πΈ iο¬ ππ β© ππ β= β
. The maximum degree is π· β€ 2πβ3 .
Hence, 4ππ· β€ 4 β
1
2πβ1
β
2πβ3 β€ 1. By Lovasz Local Lemma, π π[βͺπ π΄π ] < 1.
1
2
Proof of Lovasz Local Lemma
We shall prove the following claim.
Claim 2.1 If π β [π] and π ββ π, then π π[π΄π β£ β©πβπ π΄π ] <
1
2π· .
The result follows from the claim because
β
1 π
π π[β©π π΄π ] = π π π[π΄π β£ β©π<π π΄π ] > (1 β 2π·
) > 0.
We next prove the claim by induction on the size of π.
Base Case. β£πβ£ = 0. In this case, π π[π΄π β£ β©πβπ π΄π ] = π π[π΄π ] β€ π β€
1
4π·
<
1
2π· .
Inductive Step. Suppose the result holds for all π such that β£πβ£ < π, for some π β₯ 1. We now
consider β£πβ£ = π.
Suppose π ββ π. Consider decomposition of π into two sets:
(1) π1 := {π β π : {π, π} β πΈ};
(2) π2 := {π β π : {π, π} ββ πΈ}.
If π1 := β
, then π π[π΄π β£ β©πβπ π΄π ] = π π[π΄π β£ β©πβπ2 π΄π ]. By the dependency assumption, the latter
1
quantity equals π π[π΄π ] β€ π < 2π·
.
We next consider π1 β= β
. Hence, β£π2 β£ < π.
Observer that
π π[π΄π β£ β©πβπ π΄π ] =
π π[π΄π β© (β©πβπ1 π΄π )β£ β©πβπ2 π΄π ]
.
π π[β©πβπ1 π΄π β£ β©πβπ2 π΄π ]
We ο¬rst consider the numerator. First, π π[π΄π β© (β©πβπ1 π΄π )β£ β©πβπ2 π΄π ] β€ π π[π΄π β£ β©πβπ2 π΄π ] = π π[π΄π ] β€
π, where the equality in the middle follows from the dependency assumption.
1
We next consider the denominator. For π β π1 , we have π π[π΄π β£ β©πβπ2 π΄π ] < 2π·
. We can apply
the induction hypothesis because π ββ π2 and β£π2 β£ < π. By the union bound, we conclude that
1
1
1β£
π π[βͺπβπ1 π΄π β£ β©πβπ2 π΄π ] < β£π
2π· β€ 2 . Hence, π π[β©πβπ1 π΄π β£ β©πβπ2 π΄π ] > 2 .
Therefore, we have π π[π΄π β£ β©πβπ π΄π ] <
3
π
1/2
= 2π β€
1
2π· ,
ο¬nishing the inductive step of the proof.
Job Shop Scheduling
Problem Instance. We are given π jobs π½1 , π½2 , . . . π½π and π machines π0 , π2 , . . . , ππβ1 with
the following rules.
1. Each job π½π must be processed by some subset of machines in a speciο¬c given order. Each job
is processed by a particular machine at most once. For example, job π½1 has to be processed
by the machines in the order π6 , π1 , π5 , π3 .
2. It takes one unit of time for a machine to process a job during its turn; this is the same over
all machines and jobs. A machine can only process at most 1 job at the same time.
2
Goal. Schedule the jobs among the machines so that the makespan, which is the time for the last
job to be ο¬nished, is minimized.
Some Easy Lower Bounds.
In a problem instance, let πΆ be the number of jobs performed by the machine processing the most
number of jobs. Since each machine can only process at most one job in one time step, it cannot
ο¬nish before time πΆ.
On the other hand, let πΏ be the number of machines required by the job having the longest machine
sequence. Since each machine takes one time-step to perform a job, the job cannot ο¬nish before
time πΏ. Hence, π := max{πΆ, πΏ} is a lower bound on the makespan of the optimal schedule.
3.1
Random Delay
We will use randomness and Lovasz Local Lemma to show there exists a schedule whose makespan
approaches the lower bound asymptotically.
Theorem 3.1 There exists a schedule with makespan 2π(log
β
π )π .
Remark 3.2 Given a positive integer π, logβ π is the smallest non-negative integer π such that
(π)
log2 π < 2, i.e., the number of times one can take logarithms before the number drops below 2.
The function logβ grows very slowly, and in practice it can be considered as a constant. For instance,
logβ 265536 = 5, where 265536 has more than 19,000 digits in base 10.
Relax Assumption. Suppose we relax the assumption and allow each machine to process more
than 1 job at the same time. However, a job still takes one time-step to be processed by a machine
in the required sequence. Then, there is a relaxed schedule π0 with makespan πΏ. We show how to
convert this infeasible schedule to one that is feasible.
Deο¬nition 3.3 In a schedule (not necessarily feasible), the relative congestion of a machine in
some time window is the ratio of number of jobs performed in the window divided by the number of
time steps in the window.
Hence, it follows that if we consider the relaxed schedule π0 , the relative congestion of each machine
in the time window of size π is at most 1. Moreover, a schedule is feasible if the relative congestion
of each machine in all time windows with 1 time step is at most 1.
We deο¬ne π0 := π , and have the following invariant. In schedule ππ , each machine in any time
window of size ππ or more has relative congestion at most 1. The goal is to decrease ππ at each
step, at the cost in increasing the makespan.
Scheduling by Random Delay. We convert the schedule π0 into π1 in the following way. For
each job π½π , pick an integer π₯π uniformly at random from {0, 1, 2, . . . , 2π β 1} independently. Each
job π½π delays for π₯π time steps before starting as before. As before, we still allow machines to work
on more than 1 job at the same time.
We next show that with positive probability, for some π1 < π , all windows of size π1 or more for
each machine under schedule π1 have relative congestion at most 1.
3
3.2
Applying Lovasz Local Lemma
Lemma 3.4 There is some function π : β β β where π (π) = Ξ(log π) such that with π1 = π (π ),
there is a positive probability that, under schedule π1 , for every machine, every window of size π1
or more has relative congestion at most 1.
Proof: For each machine ππ , deο¬ne π΄π to be the event that there is some window with size at
least π1 for machine ππ that has relative congestion larger than 1. We specify the exact value of
π1 later. For the time being, think of π1 = π(log π ).
We next form a dependency graph π» = ([π], πΈ) such that {π’, π£} β πΈ iο¬ both machines ππ’ and
ππ£ process the same job. Observe that π΄π is independent of all the π΄π βs for which ππ and ππ do
not process any common job.
We estimate the maximum degree of π». Consider machine ππ . Observe that it can process at most
πΆ β€ π jobs. Each of those jobs can go through at most πΏ β€ π machines. Hence, the maximum
degree of π» is π· β€ π 2 .
We next give an upper bound on π π[π΄π ]. Consider a ο¬xed window π of size π β₯ π1 for machine ππ .
For each job π½π that is being processed by machine ππ , we deο¬ne ππ to be the indicator random
variable that takes value 1 if job π½π falls into the window π for machine ππ , and 0 otherwise.
Observe that ππ βs are independent, because the random delays are picked independently. Moreover,
π
πΈ[ππ ] = π π[ππ = 1] β€ 2π
.
Deο¬ne π to be the number of jobs that fall into the window π for machine ππ . Then, π is the
sum of ππ βs for the jobs π½π that are performed by machine ππ . Note that π is a sum of at most π
π
independent {0, 1}-independent random variables, each of which has expectation at most 2π
.
Introducing Dominating Random Variable π. We deο¬ne π to be a sum of π independent
π
. Intuitively, π is
{0, 1}-independent random variables, each of which has expectation exactly 2π
more likely to be larger than π . (This can be proved formally. We will talk about this in details
in the next lecture.) Observe that πΈ[π] = π2 .
Hence, π π[π > π ] β€ π π[π > π ] = π π[π > 2πΈ[π]]. By Chernoο¬ Bound, this is at most
π1
π
exp(β πΈ[π]
3 ) = exp(β 6 ) β€ exp(β 6 ). Observe that if we had not used π to analyze π , then since
]
π
πΈ[π ] β€ π2 , we would have obtained exp(β πΈ[π
3 ) β₯ exp(β 6 ), i.e., the direction of the inequality is
not what we want.
Note that there are trivially at most (3π )2 windows. Hence, using union bound, we have π π[π΄π ] β€
9π 2 β
exp(β π61 ) =: π.
Hence, in order to use Lovasz Local Lemma, we need 4ππ· β€ 1. Therefore, it is enough to have
36π 2 exp(β π61 ) β
π 2 β€ 1. We set π (π) := 6 ln(36π4 ) and π1 := 6 ln(36π 4 ) = Ξ(log π ).
By the Lovasz Local Lemma, π π[β©π π΄π ] > 0. Hence, the result follows.
Conclusion. We begin with a schedule π0 of makespan at most π0 := π such that every window of
size π0 := π or more for each machine has relative congestion at most 1. After the transformation,
we obtain a schedule π1 of make span at most π1 = 3π0 such that every window of size π1 = π (π0 )
or larger for each machine has relative congestion at most 1.
4
3.3
Recursive Transformation
Observe that we can apply the same transformation to schedule π1 . In particular, we divide the
total time into windows of size π1 , and apply the same transformation separately for each window
to obtain schedule π2 , with makespan at most π2 = 3π1 such that for each machine, every window
of size π2 = π (π1 ) or more has relative congestion at most 1. Here, the function π comes from
Lemma 3.4.
Hence, we have the series π0 := π , π0 := π , and ππ+1 := π (ππ ) and ππ+1 := 3ππ . This process can
continue as long as π (ππ ) < ππ .
The process stops when π (ππ ) β₯ ππ , at which point ππ is at most some constant πΎπ , which depends
only on the function π . This means in schedule ππ , in each time step, each machine has to deal
with at most πΎπ of jobs. Hence, it is easy to increase the makespan by a further πΎπ factor to
make the schedule feasible. It follows that we have a feasible schedule with makespan at most
πΎπ β
ππ = π(3π β
π ).
It remains to bound the value of π β€ min{π : π (π) (π ) β€ πΎπ }. Since π (π ) = Ξ(log π ), it follows that
β
π = π(logβ π ). Hence, we have a feasible schedule with makespan 2π(log π ) π , proving Theorem 3.1.
4
Homework Preview
1. Calculation Involving logβ . In this question, you are asked to complete the details of some
calculations.
(a) Deriving πΎπ . Suppose π (π‘) := 6 ln(36π‘4 ). Derive a constant πΎπ > 0 such that π (π‘) β₯ π‘
implies that π‘ β€ πΎπ .
(b) Suppose π := min{π : π (π) (π ) β€ πΎπ }. Prove that π = π(logβ π ).
(Hint: Make use of big-O notation carefully and avoid messy calculations.)
2. Packet Routing in a Graph. We describe a problem that is closely related to job shop
scheduling.
Problem Instance. Suppose πΊ = (π, πΈ) is a directed graph. We are given π sourcesink pairs {(π π , π‘π ) : π β [π]}. We wish to send one data packet from each source to its
corresponding sink.
(a) For each π β [π], a packet must be sent from π π to π‘π via some speciο¬c path ππ . Each
path ππ is simple: this means each (directed) edge appears at most once in ππ .
(b) It takes one unit of time for a data packet to be sent through a directed edge. An edge
can only allow at most 1 data packet to be sent at any time.
Goal. Schedule the packets to be sent in the graph so that the makespan, which is the time
for the last packet to arrive at its sink, is minimized.
Show that the packet routing problem can be reduced to the job shop scheduling problem. In
particular, given an instance of the packet routing problem, construct an instance of the job
5
shop scheduling problem such that there exists a packet schedule with makespan π iο¬ there
exists a job shop schedule with makespan π .
6
© Copyright 2026 Paperzz