Graph Triangulation
by Dmitry Pidan
Based on the paper “A sufficiently fast algorithm for finding
close to optimal junction tree” by Ann Becker and Dan
Geiger
Definition: junction tree
Let G (V , E ) be a chordal graph.
A junction tree of G is a tree H such that each
maximal clique C in G is a node in H , and for
every vert ex v of G, if we remove from H all
nodes not containing v, the remaining (hyper)
graph stays connected.
The natural approach
In every iteration :
1. Find a minimum set of vertices X which removal
from G splits G into two disconnect ed components
A and B such that A B X V .
2. Proceed to next iteration with subgraphs G[ A X ]
and G[ B X ]. X becomes a clique in each subgraph.
Example
==>
==>
The natural approach
X is called a “minimum vertex cut”
The main disadvantage – there is no
guarantee on the size of the maximal clique
in an output triangulated graph
Graph decomposition
Definition : Let G (V , E ) be a graph.
A decomposition of G is a partition ( X , A, B, C ),
where A and B are non empty sets, such that there
are no edges between A, B and C.
Graph decomposition (cont.)
Definition : Given an integer k 1, a real number
1, a graph G (V , E ) such that | V | (2 1)k ,
and a subset of vertices W V , a decomposit ion
( X , A, B, C ) of G is called a W - decomposition
wrt (k , ) if
1. | W | ( 1)k
2. | X | k ,
3. | (W A) X | ( 1)k , | (W B ) X |
( 1)k , and | (W C ) X | ( 1)k
* is an approximat ion factor
Example
a
b
c
d
e
X {c}, A {a, b}, B {d , e}, C is a decomposit ion
Given W {b, c} is a W - decomposit ion wrt (1,2)
X {d }, A {a, b, c}, B {e}, C is a decomposit ion
Given W {b, c} is not a W - decomposit ion wrt (1,2)
because | (W A) X | 3
Properties of decomposition - Lemma 1
Given a graph G (V , E ) with a cliquewidt h k ,
| V | k 2, and a subset of vertices W , | W | 1, there
exists a decomposit ion ( X , A, B, C ) of G such that
| X | k , | W A | 12 | W |, | W B | 12 | W | and
| W C | 12 | W |
Properties of decomposition - Lemma 2
Given an integer k 1, a real number 1,
a graph G (V , E ) with | V | (2 1)k and a
subset of vertices W such that | W | ( 1)k ,
there exists a W - decomposit ion ( X , A, B, C )
of G wrt (k , ) or the cliquewidt h of G is
larger tha n k .
Triangulation algorithm
ALGORITHM Triangulat e (G, W, k)
Input : an undirected graph G (V , E ), W V , k .
Output : a triangula tion of G such that the size of the
largest clique ( 2 1) k (success)
or, a valid statement that the cliquewidt h of G k (failure )
If | V | ( 2 1) k then make a clique out of G
Else
Find a W - decomposition ( X , A, B, C ) of G wrt ( k , );
If not found return " cliquewidt h k " ;
WA W A, WB W B, WC W C ;
call Triangulat e(G[ A X ], WA X , k );
call Triangulat e(G[ B X ], WB X , k );
call Triangulat e(G[C X ], WC X , k );
make a clique of G[W X ].
Example (one-level recursive call)
h
a
d
f
c
g
b
e
i
A X
k 3, 1
B X
j
k
CX
Trialgulation algorithm - intuition
1. We use a set W as a “balance factor” between the
decomposition sets A, B and C – we are interested
that a largest set will be as small as possible.
2. At every iteration a produced clique is kept small
(due to the guarantees of the decomposition)
Triangulation algorithm (cont.)
1. In order to triangula te a graph G having a
cliquewidt h k , Triangulat e(G, , k ) is called.
2. In every iteration, the size of the second
argument is ( 1)k (because of definition of
W - decomposit ion).
3. When a cliquewidt h of a graph is unknown,
a naive way to use an algorithm is to call it
repeatedly from 1 to k
Proof of correctness
1. Termination
2. Validity of the failure statement – follows immediately
from Lemma 2
3. An output in the case of success is a triangulated
graph
4. Cliquewidth in the case of success is as guaranteed
Proof of correctness (cont.)
Terminatio n :
G[ A X ]
G[ B X ] G[ A B C X ]
G[C X ]
since A and B are not empty
Proof of correctness (cont.)
An output is a triangulat ed graph :
By induction on the recursive calls :
| V | (2 1)k - obvious
| V | (2 1)k
Call Triangulat e(G[ A X ], WA X , k ) returns
a triangula tion of G[ A X ] such that WA X is
a clique (induction ). Then W X is made a clique
G[ A W X ] is triangula ted as well
The same is true for B and C
The union of G[ A W X ], G[ B W X ]
and G[C W X ] is also triangula ted
Proof of correctness (cont.)
Cliquewidt h (2α 1)k :
By induction on recursive calls :
| V | (2 1)k - obvious
| V | (2 1)k :
Let M be a largest clique in the output graph
If M ( A B C ) \ W M W X
| M || W X || W | | X | ( 1)k k
(2 1)k
Otherwise, suppose M ( A \ W )
M ( B C ) (since M is a clique and
there are no edges between B, C and A)
M A X , M is a clique in the output of
Triangulat e(G[ A X ]...) by induction,
| M | (2 1)k
Finding a decomposition
1. Choose WA , WB , WC , WX W such that
| WA || WB || WC |
2. Check if there exists a W - decomposit ion
( X , A, B, C ) wrt (k , ) such that WA A,
WB B, WC C , WX X
Finding a decomposition (cont.)
The existence of W-decomposition is checked as
follows:
1. First, a decomposition of graph into disconnected
components is found, using approximation algorithm
for weighted minimal vertex cut problem
2. Next, A, B and C components of the decomposition
are constructed by unifying the components that
contain an appropriate subsets of W
Finding a decomposition (cont.)
3. Finally, X is constructed from an initial common
subset of W and X unified with the vertex cut found.
If X stands for the size requirements then the
decomposition is a required one.
4. More formally – in the next 3 slides
The 3-way vertex cut problem
Definition: given a weighted undirected graph and
three vertices, find a set of vertices of minimum
weight whose removal leaves each of the three
vertices disconnected from other two.
Known to be NP-hard
Polynomial approximation algorithms:
A simple 2-approximation algorithm
4/3-approximation algorithm
Garg N. et al, “Multiway cuts in directed and node-weigthed
graphs”
Finding a decomposition: Procedure I
(For | WA | k )
- Remove WX from the graph
- Add va , vb , vc and connect th em to all vertices of WA , WB and WC ,
respective ly
- Set the weight of all vertices in WA WB WC to infinity and of
all other vert ices to 1.
- Find an - approximat ion 3 - way vertex cut Y that splits va , vb
and vc into three disconnect ed components
(due to the weights, it splits WA , WB and WC into three disconnect ed
components as well)
- Let X Y WX
A connected components of G[V \ X ] such that WA A
B connected components of G[V \ X ] such that WB B
C V \ (A B X )
- If | X | ( 1)k | WA | and | X | k
Output ( X , A, B, C )
Finding a decomposition: Procedure II
(For WA k )
- Remove WX from the graph
- Add va that is connected to all the vertices in WA and vbc that is
connected to all the vertices in WB and WC
- Set the weight of all vertices in WA WB WC to infinity and
the weight of all other vert ices to 1
- Find a minimum vertex cut Y which splits va and vbc into two
disconnect ed components using any of max - flow/min - cut
algorithms
(due to selected weights, it must split WA and WB WC into
disconnect ed components )
- Let X Y WX
A connected components of G[V \ X ] such that WA A
B V \ (A X )
C
- If X ( 1)k | WA |, | X | ( 1)k | WB WC | and | X | k
Output ( X , A, B, C )
Complexity
For a given k : O(4 n poly (n))
4|W | - number of choices WA ,WB , WC , WX
n - maximal number of nodes in recursion tree
poly (n) - verifying whether a choice can generate
a W - decomposit ion wrt (k , )
|W |
| W | ( 1)k
Number of iterations in the worst case is a
cliquewidt h of G.
Using Garg et al algorithm, 43
O(2 4.66k n poly (n))
Size of the largest clique in the output 2 1 3.66
times the cliquewidt h
Backup slides – proofs and some formalism
Proof of Lemma 1
Proof by constructi on :
- Let H (G ) be a junction t ree of G with a cliquewidt h k
- Add edges until all cliques in H (G ) become of size k - T (G )
- Start with X T (G )
- If there is no connected component in G[V \ X ] with more
than half vertices of W (main component) , stop
- Otherwise, let S be a main component
- There exists y S with at most k 1 neighbours in X
- Let x X be a non - neighbour of y
- Proceed with a clique Y X \ {x} { y}
Proof of Lemma 1 (cont.)
Terminatio n of an algorithm :
G[V \ Y ] has two types of components :
S \ { y} : the size of main component decreases
in each iteration
{x} V \ ( S X ) : the total number of vertices
1
from W in this set is less than 2 |W| because S
contains more than half vertices
Proof of Lemma 1 (cont.)
Let X be an output clique
If G[V \ X ] has two or more non - empty components
then group them into the desired decomposit ion.
Otherwise :
Since V | k 2 | there exist at least y, y ' V \ X
component
Suppose y is a node that has k 1 neighbours in X
Let Y { y and its neighbours from X } and x a non neighbour of y in X
G[V \ Y ] has at least two disconnect ed components
( y ' and x belong to different components )
Proof of Lemma 2
Suppose | W | 1. Then let X be any minimal
vertex cut that does not contain a vertex of | W | .
If | X | k then the resulting decomposit ion is a
W - decomposit ion wrt (k , ) (| (W A) X |
k 1 2k ( 1)k )
Otherwise, the cliquewidt h of G is larger tha n k
Proof of Lemma 2 (cont.)
Suppose | W | 1
Let ( X , A, B, C ) be a decomposit ion guaranteed by
Lemma 1. If it is not a W - decomposit ion wrt (k , )
then assume without a loss of generality :
| (W A) X | ( 1)k since | X | k ,
| W A | k , and by Lemma 1 | W | 2 | W A |
| W | 2k contradict ion to | W | ( 1)k
Theorem 1 (formal definition of algorithm
correctness)
If G (V , E ) is a graph with n vertices, k 1 an integer,
1 a real number, and W is a subset of V such that
| W | ( 1)k , then Triangulat e(G, W , k ) triangula tes
G such that the vertices of W form a clique and such
that the size of a largest clique of the triangula ted graph
(2 1)k or the algorithm correctly outputs that the
cliquewidt h of G is larger tha n k .
Finding a decomposition - proof of
correctness
Let ( X ' , A' , B' , C ' ) be a decomposit ion of G as guaranteed
by Lemma 1. Let WA A'W , WB B'W , WC C 'W and
WX X 'W , and assume without a loss of generality that
| WA || WB || WC | . Then both procedures generate for this
choice of subsets of W a decomposit ion ( X , A, B, C ) which
is a W - decomposit ion wrt (k , ).
Finding a decomposition - proof of
correctness (cont.)
Case I :
| WA | k . X '\WX is a 3 - way vertex cut for WA , WB and WC in
the graph G[V \ WX ] | Y | | X '\WX | . Since 1, we get
| Y WX | | X ' | . Since, by Lemma 1, | X ' | k , | Y WX | k .
Finally, | WA (Y WX ) | k k ( 1)k
Case II :
| WA | k . X '\WX is a vertex cut for WA , and WB WC in the graph
G[V \ WX ] | Y || X '\WX || Y WX | k . Finally, since | W |
2 | WA | (by Lemma 1), | WA (Y WX ) | 21 k k ( 1)k .
| WB WC || W | | WA | ( 1)k k k | (WB WC )
(Y WX ) | k k ( 1)k .
© Copyright 2026 Paperzz