https://medium.com/@monocosmo77/understanding-polynomial-time-problems-part1-machine-learning-26d8163fff50