1. simulation
2. backtracking