Predicate Detection to Solve Combinatorial Optimization Problems