Problem Solving Flashcards
How are instructions given to computer?
Computer programs – finite set of precise instructions written in a computer language. Giving precise, unambiguous instructions is not universally inherent in human nature.
What are the necessary steps to go from identifying a problem to writing a program that can solve it
Before the program is written, we must find a way to solve the problem.
After figuring out how to solve the problem we then translate the solution into a language meaningful to the computer.
What criteria should problem-solving statements or instructions meet in order to be effective?
Problem-solving statements/ instructions should be:
Precise
Unambiguous
Must be in a logical sequence
Finite, i.e. terminate after a definite number of steps
What are some examples of everyday problems that can be solved by providing step-by-step instructions or recipes?”
Examples of everyday problems:
Write a recipe for making a cheese sandwich.
Write instructions to give directions to a visitor to get to the nearest hospital, starting from your home.
Write instructions to tell someone how to download an app on their phone.
What are the key steps involved in the problem-solving phase of computer program design?
The design of any computer program involves two phases:
The Problem-solving Phase
The Implementation Phase
Problem-Solving Phase comprises the following steps:
Define the problem
Analyse the problem
Propose and Evaluate possible solutions
Choose the optimal solution and express it as an algorithm.
Test and validate the algorithm for correctness
Implement the Algorithm
Run the Program
Document , maintain and improve the program
How to define the problem
The problem must first be defined: Ensure that you understand the Problem
Defining the problem is the first step towards finding a solution
It helps the programmer to understand what is given and what is required
If the programmer does not fully understand what is required, he/she cannot produce the desired solution to the problem
What are the three key components involved in decomposing a problem during the process of understanding and defining it?
One of the biggest challenges faced in problem-solving is understanding the problem to be solved.
Defining the problem can be accomplished by decomposing the problem into three key components:
What is given (the inputs)
The tasks that must be performed (processing)
The expected results (the output)
Define Problem Solving?
Problem Solving - the process of creating a correct set of instructions that if followed in order, will produce the expected results
Define algorithm
Algorithm - a logical sequence of precise steps which, if followed, allows for the solution to a problem.
Define Pseudocode
Pseudocode- a problem solving language using simplified ‘english like’ statements to define or design an algorithm.
What is a flowchart?
Flowchart - a pictorial way of representing an algorithm using a set of standardised symbols (shapes).
How many steps are there in the problem solving process
Five
List the steps in the problem solving process
(a) define the problem
(b) propose and evaluate solutions
(c) determine the most efficient solution
(d) develop and represent the algorithm
(e) test , validate and improve the solution.
What is the divide and conquer approach?
The divide and conquer approach breaks large problems into smaller tasks.
This is a structured method where a big problem might not be simple to solve.
The problem is divided into manageable sub-problems which may prove easier to solve.
What is an Input-Processing-Output chart?
An Input - Processing - Output chart is a diagrammatic way to break down the components of a problem.