An open API service indexing awesome lists of open source software.

https://github.com/playwithalgos/tree-width


https://github.com/playwithalgos/tree-width

algorithms educational-project graphs tree-width

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

          

# tree-width

This repository contains a video game for learning the notion of tree decomposition, used to define the tree-width of an undirected graph.

![image](https://github.com/playwithalgos/tree-width/assets/43071857/0043a648-7b54-4fb0-8703-ff6b5c6d965a)

## Principle

The graphical user interface proposes to add/remove vertices from the bags. The user has to satisfy the three constraints of a tree decomposition:
- Endpoints of each edge should appear in a same bag of the tree decomposition.
- Each bag should contain at most k+1 vertices, where k is the tree-width of the graph
- The bags containing a given vertex should form a connected component in the tree decomposition.

## Interaction

The user may choose the level. She adds/removes some vertex to a bag by clicking on it in the bag.

## How to deploy

In order to deploy, run `npm run deploy`.