Try mocha tests.
Create two modules to handle combinatorial calculations.
Make the graph configurable by UI.