Professional Documents
Culture Documents
SUMSEM2022-23 CSI3020 TH VL2022230700600 2023-06-16 Reference-Material-I
SUMSEM2022-23 CSI3020 TH VL2022230700600 2023-06-16 Reference-Material-I
By,
Dr. Kovendan AKP,
Senior Assistant Professor,
Department of Database Systems,
School of Computer Science and Engineering,
Vellore Institute of Technology, Vellore.
12 14 16 18 20
Ignoring constant factors
• Express run time as O(f(n))
• Emphasize algorithms with slower growth rates
• Fundamental idea in the study of algorithms
• Basis of Tarjan/Hopcroft Turing Award
Why ignore constant factors?
• Constant factors are arbitrary
• Depend on the implementation
• Depend on the details of the model
Let n0 =
T(n) is O(f(n)) if there exist c, n0, such that for n > n0,
T(n) < c f(n)
Order the following functions in increasing
order by their growth rate
a) n log4n
b) 2n2 + 10n
c) 2n/100
d) 1000n + log8 n
e) n100
f) 3n
g) 1000 log10n
h) n1/2
Lower bounds
• T(n) is W(f(n))
• T(n) is at least a constant multiple of f(n)
• There exists an n0, and e > 0 such that T(n) > ef(n) for all n > n0
• Warning: definitions of W vary
• For n=300 this is more than the number of atoms in the known universe.
• Some rule of thumb usually works great, in the sense that is %5 from optimum
(how do we know that?).
• Recompute n.
• Classes of size at most n/(2sqrt{}) can contain
at most n/2 vertices.
• Therefore equivalence classes of size at least
n/(2sqrt{}) vertices contain at least n/2 vertices.
Recall their size is also at most sqrt{}.
• Thus there are at least n/(2sqrt{}) equivalence
sets with size at least n/(2sqrt{}) sqrt{}/2.
The Algorithm
• We show A,B and xV2 such that x is adjacent to (say) B but is not to
A.
A B
x
C
The Set A,B And The Vertex x
• The sets A and B from previous slide are not equivalent.
• Therefore there must be some x that
that is independent of A but not of B.
• We are going to partition V1 into sets
that are adjacent to x and to set that are not
adjacent to x. A PROPER partition.
• As we shall see vertices are added to A and B but only from V2 (so
independent, and independent with respect to A and B).
Finding Some Adjacent Sets
• The vertex x has about sqrt{} equivalent copies.
• Put (a copy of) x in any equivalence set that does not contain x.
• This partitions V1 to equivalence classes S that contain x and T that do
not contain x .
How To Continue
• Note: every equivalence set in S is adjacent to every equivalence set
in T.
• This is because of the edges from x to T
• The sets in T itself do not share an edge nor do the sets that belong
to S .
• Thus recurse on S and T (Quicksort?).
Why Can We Continue The Recursion?
• The sets in S were not separated by x.
• The sets in T were not separated by x.
• Therefore V2 contains, a vertex y that is adjacent to some A’ in S but
not to some B’ in S. Again put a copy of y in all sets that are
independent of y.
• Same for T .
Open Problems
• For general graphs the upper bound of n/log n approximation ratio, is
hugely far from the lower bound of sqrt{log n}.
• If this is very hard to narrow, then perhaps one can narrow the gap
for bipartite graphs?