Skip to content

playwithalgos/tree-width

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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.