UNIT NO.4
Algorithmic Thinking
(Solved Exercise)
Answer the following questions briefly.
1. List down the benefits of step by step process of problem solving.
• The problem can be identified before its solution.
• Reason of the problem can be identified.
• Solution is easy to provide.
• Prevents occurring of problem in future.
• Saves time and other resources.
2. How identification of problem is helpful in problem solving?
The problem should be identified before providing its solution. It should be stated in simple and clear way. Hence, we can solve the problem easily.
3. What do you mean by problem analysis?
The process of defining and decomposing a problem into smaller parts is called problem analysis. It is a process of figuring out 5 W’s (What, When, Where, Who, Why) from problem statement.
4. Differentiate between specific and nonspecific instructions in problem solving.
Specific Instructions:
The instructions that are clear towards solving a problem are called specific instructions.
Non-specific instructions:
If the instructions to solve a problem are not clear and we have to extract them from problem statements are called non-specified instructions.
5. How does planning solution reduce the risk of failure?
Good planning is essential for providing the best solution. It ensures that you have everything you need for solving a problem. Hence it will minimize the risk of failure.
6. List the elements that we must consider while selecting a solution.
Following factors can be considered while selecting solution.
• Difficulty level
• Time to implement the solution
• Cost on implementation the solution
7. Differentiate between simple and complex problems.
Simple problems:
A simple problem requires less time and resources to be solved. It can be solved in simple steps.
Example: Turning on a fun.
Complex problems:
A complex problem requires more time and resources to be solved. It cannot be solved in simple steps.
Example: Drawing a car
8. What do you mean by pattern recognition in problem solving?
Pattern recognition:
It is a problem-solving technique in which we look for similarities among and within problems.
9. List down benefits of computational thinking.
Following are some benefits of computational thinking.
• Decomposition.
• Abstraction and generalization
• Pattern recognition
• Generalization
• Algorithm design
• Confidence in decision making
10. Differentiate between conditional and repetitive flow.
Conditional flow:
In a conditional flow, steps are executed only if the condition is true otherwise next step is executed.
Repetitive flow:
In repetitive flow, set of statements are executed again and again until a certain condition remains true.
Answer the questions in detail:
1. How can you say that a problem solving is helpful in everyday life?
We face problems in our everyday life. It can be a social problem, problem at work, school or in business, etc. These can be minor or major problems. If we take wrong decisions for solving the problems, we will suffer loss.
The problem-solving skills help us finding the solutions to the problems easily. They help us in growing our career and life. We can solve our problem in no time. We can save our time, money and other resources as well.
So, we can say that problem solving is helpful in everyday life.
2. Discuss the steps of problem solving process.
These are steps that you should follow in order to solve a problem efficiently:
1. Identify a Problem
We have to be clear and specific in identifying the problem. Once identified, the problem should be stated in simple and clear fashion hence it can be solved easily.
2. Defining a Problem
A problem is said to be well defined if it does not contain any ambiguity. It is clearly defined and it has a clear goal. If problem is clearly defined it can be solved easily.
3. Problem Analysis
Problem analysis is the process of defining a problem and decomposing a problem into smaller parts to identify possible inputs, processes and expected outputs related to the problem. It is process of figuring out 5 W’s i.e., What, When, Where, Who and Why from problem statement.
4. Planning solution
Good planning is essential for the successful execution of a solution. It ensures that you have everything you need and solve a problem. This will minimize risk of failure.
5. Testing and selecting best solution
We can use lists of advantages and disadvantages to evaluate and choose the best available solution to meet our needs.
Following factors can be considered while selecting solution;
• Difficulty level
• Time to implement the solution
• Cost on implementation the solution
3. What is deconstruction of a problem? List down its benefits.
Deconstruction of a problem
Deconstruction is the process of taking a big problem and breaking it down into a set of smaller problems. If you can solve all of the smaller problems you will have solved the big problem.
Benefits of Deconstruction of a problem
1. Smaller problems are easier to solve.
2. Each smaller problem can be solved independently of others.
3. Smaller problems can be tested independently.
4. What are the techniques used to deconstruction of a problem?
Techniques to deconstruct a problem
Following techniques can be used in deconstruction of a problem:
1. Separate root cause of the problem to navigate the problem space.
2. Draw limits of problem.
3. Identify statements which appear easier to solve.
4. Identify 5 W’s from problem statement (What, When, Who, Where, Why)
5. Start solving parts of problem (Easier to difficult)
6. Combine all sub-solutions to make a main solution.
5. How does computational thinking help us in solving a problem?
Computational thinking help us in solving a problem by following techniques.
Decomposition: We learn how to break down complicated problems into smaller problems.
Abstraction and Generalization: We can focus on the important information only, ignoring irrelevant detail.
Pattern Recognition: We look for similarities among and within problems
Generalization: We identify sequence of operations that are common among specific problems and to extend them to the general problems.
Algorithmic design: This design allows the people to follow the instructions to solve a problem.
Confidence in decision making: Algorithmic thinking improves the confidence in decision making.
Project Based Questions
1 Write an algorithm that create a pizza with 4 toppings.
2. Write an algorithm that gives the steps involved with brushing your teeth.
3. Write an algorithm to find sum and average of three numbers.
4. Write an algorithm to find product of two numbers.
5. Write an algorithm to find whether a number is even or odd.
6. Write two different algorithms to find product of two numbers and choose the best one among them.
7. Write an algorithm that allows a person to enter a number, algorithm will print table of that number up to 10.