[Go to site: main page, start]

0% found this document useful (0 votes)
6 views10 pages

Algorithmic Problem-Solving Strategies

The document discusses the process of algorithmic problem-solving, outlining George Pólya's four phases: understanding the problem, devising a plan, carrying out the plan, and looking back. It emphasizes the importance of various problem-solving strategies such as trial and error, heuristics, and algorithmic approaches, which enhance adaptability and efficiency in finding solutions. Additionally, it details the steps involved in solving problems using computers, from understanding the problem to evaluating the solution.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views10 pages

Algorithmic Problem-Solving Strategies

The document discusses the process of algorithmic problem-solving, outlining George Pólya's four phases: understanding the problem, devising a plan, carrying out the plan, and looking back. It emphasizes the importance of various problem-solving strategies such as trial and error, heuristics, and algorithmic approaches, which enhance adaptability and efficiency in finding solutions. Additionally, it details the steps involved in solving problems using computers, from understanding the problem to evaluating the solution.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

programming,

which involves creating a sequence of instructions, or code, that a


computer can execute to tackle computational problems.

The language used to write this code is known as a programming


language.
an algorithm, which represents the abstract method for solving a
problem.
objective of algorithmic problem-solving is to develop an effective
algorithm that addresses specific computational challenges.
it is not always necessary to write code to appreciate algorithmic
problem-solving, engaging in the programming process often deepens
understanding and helps in discovering more efficient and straight
forward solutions to complex issues
An algorithm is a set of well-defined steps and instructions that can be
translated into a form, usually known as the code or program, that is
executable by a computing device

George Pólya (1887-1985) conceptualized the process and captured it in


the famous book ”How To Solve It”. In his book, Pólya enumerates
four phases a problem solver has to go through
• Phase 1: Understanding the problem.
– What is the unknown? What are the data?
– What is the condition? Is it possible to satisfy the condition? Is the
condition sufficient to determine the unknown? Or is it insufficient? Or
redundant? Or contradictory?
– Draw a figure. Introduce suitable notation.
– Separate the various parts of the condition. Can you write them
down? •
Phase 2: Devising a plan.
– Have you seen it before? Or have you seen the same problem in a
slightly different form?
– Do you know a related problem?
– Look at the unknown! Try to think of a familiar problem having the
same or similar unknown.
– Split the problem into smaller, simpler sub-problems.
– If you cannot solve the proposed problem try to solve first some
related problem. Or solve a more general problem. Or a special case of
the problem. Or solve a part of the problem.
Phase 3: Carrying out the plan.
– Carrying out your plan of the solution, check each step.
– Can you see clearly that the step is correct?
– Can you prove that it is correct?

• Phase 4: Looking back.


– Can you check the result?
– Can you derive the result differently?
– Can you use the result, or the method, for some other problem?

Problem-Solving Strategies
Problem-solving strategies are essential tools that enable you to
effectively tackle a wide range of challenges by providing structured
methods to analyze, understand, and resolve problems.

These strategies include systematic approaches such as

●​ Trial and Error,


●​ Heuristics,
●​ Means-Ends Analysis, and
●​ Backtracking,
Importance of Understanding Multiple
Problem-Solving Strategies
Adaptability: Different problems require different approaches.
Understanding multiple strategies allows

for flexibility and adaptability in problemsolving.

Efficiency Some strategies are more effective for specific types of


problems.
Having a repertoire of strategies

can save time and resources

Improved Diverse strategies offer multiple perspectives and potential


Outcomes solutions,

increasing the likelihood of finding optimal solutions

Skill Exposure to various strategies enhances cognitive skills,


Development critical thinking, and creativity

1 Trial And Error Problem-Solving Strategy


The trial-and-error problem-solving strategy
involves
attempting different solutions and learning from mistakes
until a successful outcome is achieved.
It is a fundamental method that
relies on experimentation and iteration,
rather than systematic or analytical approaches.

Eg: you have forgotten the password to your online account,


and there is no password recovery option available.
You decide to use trial and error to regain access

steps process example


Initial Attempts start by trying passwords you password123,”
commonly use ”Qwerty2024,”
”MyDogTommy.
Learning from None of these initial attempts incorporating your
Mistakes work. birthdate,

You then recall that you pet’s name,


sometimes use a combination
of personal information favorite sports team
Refinement After several failed attempts, ”NeeNeeyaayirikkuka#

you remember you recently


started using a new format
for your passwords,

combining a favorite quote


with special characters
Success Eventually, NeeNeeyaayirikkuka#2
024
through persistent trial and
error,
you hit upon the correct
password
. This method is practical when there is no clear pathway to the solution
and allows for discovering the correct answer through persistence and
adaptability.

Algorithmic Problem-Solving Strategy


An algorithm is a step-by-step,
logical procedure
that guarantees a solution to a problem.
It is systematic and follows a defined sequence of operations,
ensuring consistency and accuracy in finding the correct solution.

steps process
Gather Ingredients Measure out 2 cups of flour,
1 cup of sugar,
2 eggs,
1 2 cup of butter,
1 teaspoon of baking powder,
1 cup of milk.

Preheat Oven Set the oven to 175°C.

Mix Ingredients In a bowl, combine the flour,


baking powder, and sugar.

In another bowl, beat the eggs and


then mix in the butter and milk.
Gradually combine the wet and dry
ingredients, stirring until smooth

Prepare Baking Pan Grease a baking pan with butter or


cooking spray

Pour Batter Pour the batter into the prepared pan

Bake Place the pan in the preheated oven


and bake for 30-35 minutes

Check for Doneness Insert a toothpick into the center of the


cake. If it comes out clean, the cake is
done

Cool and Serve Let the cake cool before serving

Heuristic Problem-Solving Strategy


A heuristic is a practical approach to problem-solving
based on experience and intuition.
It does not guarantee a perfect solution but provides a good enough solution
quickly,
often through rules of thumb or educated guesses.

When driving in a city with frequent traffic congestion, you might use a
heuristic approach to find the fastest route to your destination:
Rule of Thumb You know from experience that
certain streets are typically less
congested during rush hour

Current Conditions You use a traffic app to check


current traffic conditions,

looking for red or yellow indicators


on major road

Alternative Routes You consider side streets and


shortcuts you have used before that
tend to be less busy

Decision Based on the app and your


knowledge,
you decide to avoid the main
highway
(which shows heavy congestion)
and take a series of back roads that
usually have lighter traffic

this heuristic approach does not guarantee


that you will find the absolute fastest route,
it combines your experience and real-time data
to make an informed,
efficient decision,
likely saving you time compared to blindly following the main routes.

how computers can be put to solving problems?


The Problem solving process

1. Understand the problem:


Effective problem-solving demands a thorough knowledge of the problem
domain.
Once you have identified the problem, its exact nature must be sought and
defined.
The problem
context,
Objectives,
and constraints
if any are to be understood properly.

techniques used to gather information about a problem.


conducting interviews and sending questionnaires to the stakeholders
(people who are concerned with the problem). ​
Segmenting a big problem into simple manageable ones often helps you to
develop a clear picture of the problem.

2. Formulate a model for the solution:


If the problem is understood, next step to devise a solution.
You should now identify
the various ways to solve the problem.
●​ Brainstorming commonly used techniques
for generating a large number of ideas
within a short time.
●​ Brainwriting and Mind mapping are two alternative techniques that
you can employ here.
The generated ideas are then transformed into a conceptual model that can be
easily converted to a solution.
Mathematical modeling and simulation modeling are two popular
modeling techniques that you could adopt.

Whatever the modeling technique is, ensure the defined model accurately
reflects the conceived ideas.
3. Develop an algorithm:
Once a list of possible solutions is determined, they have to be translated into
formal representations – algorithms.
In this step assess the pros and cons of each algorithm to select the best
one.
The assessment factors memory, time, and lines of code.
4. Code the algorithm:
The interesting part of the process!
Coding!
you implement it as an executable program, when you determine the best.

5. Test the program:


Nobody is perfect!
Once you are done, you have to inspect its correctness.
This is formally called testing.
During testing,
evaluated as to whether it produces the desired output.
Any unexpected output is an error.
executed with different sets of inputs to detect errors.
It is impossible to test the program with all possible inputs.
Instead, a smaller set of representative inputs called test suite is identified
and if the program runs correctly on the test suite, then it is concluded that
the program will probably be correct for all inputs.
You can get the help of automated testing tools to generate a test suite for
your code.
Closely associated with testing is the process of debugging which involves
fixing or resolving the errors (technically called bugs) identified during
testing.
Testing and debugging should be repeated until all errors are fixed.
6. Evaluate the solution:
This final step is crucial to ensure that the program effectively addresses the
problem and attains the desired objectives.
You have to first define the evaluation criteria. These could include metrics
like efficiency, feasibility, and scalability, a few to mention.
The potential risks that could arise with the program’s deployment are also to
be assessed. Collect quantitative and qualitative feedback from the
stakeholders.
Based on the feedback, you have to work on making necessary improvements
to the program. Nevertheless, the refined code should also be subject to
rigorous testing

You might also like