Build a sample engine based on graph theory

Build a sample engine based on graph theory