Knowledge Compilation For Solving Computationally Hard Problems