HamiltonianCycles icon

HamiltonianCycles

ishikari
Free
10+ downloads

About HamiltonianCycles

This app aims to provide a subject in programming education. The Hamiltonian cycles problem is to find out a paths in a directed graph of n vertices, starting from one starting point, visiting all vertices only once, and returning to the starting point. This is known as NP-complete problem, and generally no efficient solution is known. Here, I designed a solution for a small graph with 6 or less vertices and created a program.

Basically, it searches the entire path, but the method is not so trivial and you need to think carefully about the procedure. In particular, the use of multiple lists and recursive functions in implementing algorithms is useful for improving programming capabilities. You should also consider the graphical user interface for setting up and displaying graphs. The sense of accomplishment gained by completing this app enhances the educational effect. It's also fun to run the finished app and see the results on the graph.

This time, I used MIT App Inventor to create this app. The use of App Inventor's familiar feature blocks (especially Canvas, Checkboxes, Lists, etc.) was very useful for efficient program development.

HamiltonianCycles Screenshots