Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
RaoulLuque authored Aug 14, 2024
1 parent 4a6d8e6 commit d358f01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
A library implementing a heuristic for computing an upper bound for the treewidth of arbitrary graphs using the clique graph operator for my bachelor thesis.

## Idea of the heuristic
The heuristic computes a tree decomposition of a given graph by using the clique graph operator. First the maximal cliques of the given graph are computed which in general can take exponential time (and space) in the size of the graph since a graph can have up to exponential number of maximal cliques, see Moon and Moser graph. From these maximal cliques, the intersection graph is computed, that is the clique graph of the original graph. For the heuristic identify the vertices in the clique graph with the maximal cliques they correspond to. Moreover we identify these maximal cliques with bags in a tree decomposition. Since a clique graph is in general not a tree, we compute a spanning tree of the clique graph. Afterwards we fill up all the necessary vertices in the bags by checking each pair of vertices/bags in the computed spanning tree and if they have a non-empty intersection, add this intersection to all bags along the path of the two vertices in the spanning tree. This way a tree decomposition is obtained.
The heuristic computes a tree decomposition of a given graph by using the clique graph operator. First the maximal cliques of the given graph are computed which in general can take exponential time (and space) in the size of the graph since a graph can have up to an exponential number of maximal cliques in the number of vertices, see Moon and Moser graph. With these maximal cliques, the intersection graph is computed, that is, the clique graph of the original graph. For the heuristic, we identify the vertices in the clique graph with the maximal cliques they correspond to. Moreover we identify these maximal cliques with bags in a tree decomposition. Since a clique graph is in general not a tree, we compute a spanning tree of the clique graph. Afterwards we fill up all the necessary vertices in the bags by checking each pair of vertices/bags in the computed spanning tree and if they have a non-empty intersection and add this intersection to all bags along the path of the two vertices in the spanning tree. This way a tree decomposition is obtained.

In pseudocode this can be described as following
In pseudocode this can be described as follows
```
def clique_graph_treewidth_heuristic(graph):
clique_graph = construct_clique_graph(graph) # step 1
Expand All @@ -16,7 +16,7 @@ def clique_graph_treewidth_heuristic(graph):
treewidth = compute_treewidth(clique_graph_tree) # step 4
return treewidth
```
where the last step just computes the largest bag size and subtracts 1 from it according to the definition of the widht of a tree decomposition.
where the last step just computes the largest bag size and subtracts 1 from it according to the definition of the width of a tree decomposition.

## Usage

Expand Down

0 comments on commit d358f01

Please sign in to comment.