We want to know when a computer will be a useful tool, how to solve problems using a computer, how to evaluate the quality of our solutions, and how to establish confidence in the correctness of solutions. Computer science begins with efforts to answer these four questions: For what kinds of questions can I write…