Branch and bound Alg
Tree cover Algorithm
At time i = 1 the algorithm can schedule Q = (a, b].
It chooses u because it has the earliest deadline and it sets i = I + l ( a ) = 2.
At time i = 2 the algorithm schedules Q = b. It sets i = 2+l(b) = 4.
At time i = 4, Q = c. Since i + l(c) = 7 > d(c) = 6,
the algorithm terminates without completing a valid sequence.
assume that all release times are 1 .
At time i = 1 the algorithm can schedule Q = (a, b. c). It chooses again a because it
has the earliest deadline and it sets i = I +l(a) = 2.
At time i = 2 the algorithm can schedule Q = (b, c]. It chooses c because it has the
earliest deadline. It sets i = 2 + I(c) = 5.
At time i = 5 it schedules Q = b and terminates successfully.
The Shortest and Longest Path
Problems
consider an edge-weighted graph G(V. E, W), with
vertex set V = {ui, i =0, I , . . . . n),
the source vertex being denoted as u0. The weight set
is W = (wij, i. j =0, I, . . . , n), where any vertex pair
not joined by an edge has an infinite weight.
denote the weight of the shortest path from the
source to each vertex by (si; i =0, 1 , . . . , n).
Hence So = 0.
Sk= min {Sk+wki}; i=0…n
Incidence matrix
Inequalities
b = [3, I , 1, -1, 1,4, -6,1]T. A is the incidence matrix of the graphs
Then the set of inequalities can be written as ATx > b.
The longest path problem can then be modeled as a solution to the minimization
of cTx, where c = 1 (i.e., a vector of Is),
Conversely, a shortest path problem can be modeled by a set of inequalities with the
reversed directions and solved by maximizing cTx.
Graph coloring
Coloring interval graph
Very often, problems are directly specified by the
sets of intervals
I = ( [ lj , rj]: j = 1. 2 , . . . , (I) that induce the interval
graph.
Intervals correspond to vertices, coloring the intervals
is equivalent to coloring the vertices.
A well-known algorithm for coloring interval graphs is
the LEFTEDGE algorithm
LEFTEDGE algorithm
Iteration 1: L={1,2,3,4,5,6,7}
s=1, r=3, delete 1 from L
s=2 (l of 2 >=3), delete 2 from L, r=5
s=3 (l of 3 >=5), delete 3 from L, r=8
C=1
Iteration 2: L={4,5,6,7}
s=4 or6,
s=6, r=2, delete 6 from L
s=7 (l of 7 >=2), delete 7 from L, r=6
s=5 (l of 5 >=6), delete 5 from L, r=8
C=2
Iteration 3: L={4}
s=4
C=3
l
r
V1
0
3
V2
3
5
V3
6
8
V4
0
7
V5
7
8
V6
0
2
v7
2
6
Maximum Clique
Boolean function
cofactor
The cofactor of f (x1, x2,….xi . . . . xn,) with
respect to variable xi is
fxi = f ( x1,x2,…. 1 . . . . .xn,).
The cofactor of fxi’ ( x1,x2…..0,.. . . ,xn) with
respect to variable xi’
example
f = ab + bc + ac.
Its cofactor with respect to a is computed by setting a = 1 .
fa = b + c.
its cofactor w.r.to. a' is computed by setting a = 0, yielding
fa’ = bc.
The function can be re-written as
f = a fa, + a'fa’ = a(b + c) +a'bc = ab + ac + a'bc = ab + bc +
ac.
By applying the expansion
fab = 1, fa’b = C, fab’ = c and fa’b’ = 0.
Thus f = ab(1)+ ab’(c) + a'b(c).
By repeating the expansion w.r.1. c, we obtain f = abc + abc'
+ ab'c. + a'bc,
unate
A function f (xl ,x2. .. . , r , .. . . .I,) is
(positivelnegative) unate in variable .
Otherwise it is binate (or mixed) in that variable.
A function is (positivelnegative) unate if it is
(positivelnegative) unate in all support variables.
Otherwise it is binate (or mixed).
BDD
OBDD
An OBDD is a rooted directed graph with vertex set V.
Each non-leaf vertex has as attributes a pointer index of vertex
(v) € (1.2.. . . , n] to an input variable in the set {x1,x2,…. xn),
and two children low(u), high(u) E V.
A leaf vertex u has as an attribute a value value(u) € B.
For any vertex pair (v, low(v)} (and (v,high(v)]) such that no
vertex is a leaf,
index(v) < index(low(v)) (and index(v) < index(high(v)).
An OBDD is said to be a reduced OBDD (or
ROBDD)
if it contains no vertex v with low(v) = high(v).
nor any pair {v, u] such that the suhgraphs rooted in v
and in u are isomorphic.
Let us consider the subset of vertices with index i, called
V(i).
There are two conditions for redundancy. If id(low(v)) =
id(high(v)), then vertex v is redundant and we set id(v)
= id(low(v)).
Similarly, if there are two vertices v and u such that
id(low(v)) = id(low(u)) and id(high(v)) = id(high(u)), then
the two vertices are roots of isomorphic graphs and we
set id(v) = id(u).
In the remaining cases, a different identifier is given to
each vertex at level i.
The algorithm terminates when the root is reached.
1. the algorithm labels the leaves as 1 and 2 and
initializes the ROBDD with two distinguished leaves.
2. the vertices with index = 3 are visited, i.e., those
corresponding to variable c and labeled v4,and v5
3. A key is constructed for these vertices from the labels
of the children. The key for both vertices is (1.2).
because both have the same right (i.e., high) and left
(i.e., low) child. Since the key is the same,
4. the first vertex being sorted, say v4, is assigned
the identifier id = 3 and is added to the ROBDD with
edges to the leaves.
5. The other vertex (e.g., v5) gets the same identifier but
is not part of the ROBDD, because it is redundant. (Its
key matches the key of the previously sorted vertex.)
the algorithm visits the vertices with index = 2,
i.e., those corresponding to variable b and
labeled v2 and v3.
The left and the right children of v3, have the same
identifier. Therefore v3 inherits their identifier,
i.e., id = 3, and it is discarded.
Vertex v2 receives identifier id = 4 and is added to
the ROBDD, with edges to the 0-leaf and to v4,
because the identifiers of the children of v2 are I and
3.
Finally, the vertex with index = 1 (i.e., the root) is
visited. Since its children have different identifiers,
the root is added to the ROBDD. with edges to v2
and v4 because the identifiers of the children of v1
are 4 and 3.
© Copyright 2026 Paperzz