Introduction to Computer Science
CompSci 101 : Spring 2014

Ten Steps to Logical Problem Solving

  1. Be clear about what you are trying to find out.
    • What are the givens?
    • What are the boundary cases?
    • What will the solution look like?
    • What do I need to know to solve the problem?

  2. Draw a picture or build a model if possible.
    • Can I draw a table, graph, or picture?

  3. Know the possibilities.
    • Games: What moves are allowed?
    • Programming: What commands do I know?
    • In general: What steps are there to choose from?

  4. Do some examples.
    • Are there some small examples I can already do?
    • Is there a way to simplify the problem specification to start with?

  5. Find patterns.
    • Can I do enough examples that I see a pattern in the answers?
    • Can I categorize the problem into cases?
    • Once the pattern emerges, can I use variables to give a generic answer?

  6. Work backwards.
    • Can I start with the end result and examine the process to get there?

  7. Approximate the answer.
    • Can I use estimation to get an idea of the answer?

  8. Guess and check.
    • Can I use process of elimination to zero in on the answer?
    • Can I apply brute force?

  9. Know the constraints.
    • What is the limited resource?
    • Am I making the most of it?

  10. Verify your answers according to the first step
    • Does the answer make sense?
    • Does it match my initial estimation?