Polya’s Problem Solving Techniques
Tags: algorithms, test
Published: 2021-11-03 14:23:04

I want to talk about a book that I read long ago about problem solving, problem solving is an important skill for anyone but especially important for developers and engineers!

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yh9zdo2lxqpm3kv9a0ex.jpg)

In 1945 George Polya published a book How To Solve It and sold over one million copies. I'm gonna make a resume and reuse some content from his book, therefore I'll try to summarize everything here! 

Polya identified **4 basic principles** of problem solving.

 
##First Principle: Understand the Problem

First of all a very easy thing to ask yourself is, Do I understand the meaning of the questions/problem.

• Do you understand all the words used in stating the problem?
• What are you asked to find or show?
• Can you restate the problem in your own words?
• Can you think of a picture or diagram that might help you understand the
problem?
• Is there enough information to enable you to find a solution?

##Polya’s Second Principle: Devise a Plan

Sun-Tzu said: Plan for what is difficult while it is easy, do what is great while it is small.

Making a plan is one of the first steps to solve any problems. There is many approach to conceive a successful plan. 

*Guess and check 
*Look for a pattern
*Make an orderly list 
*Draw a picture
*Eliminate the possibilities 
*Solve a simpler problem
*Use symmetry 
*Use a model
*Consider special cases 
*Work backwards
*Use direct reasoning 
*Use a formula
*Solve an equation 
*Be ingenious

My favorites are: Trying to find pattern, going backward, Solve a simpler problem, which means simply dividing a big problem into smaller problems.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5hxgunbm3ukmrx5auiat.jpg)



##Polya’s Third Principle: Carry Out the Plan

Follow what you planned step by step. During the process patience is important but don't waste time on things that don't work or disturb other parts of your plan. 


##Polya’s Fourth Principle: Look Back

Coming back to our previous steps is the last step.
Taking time to redo, is a simple way to get a better understanding. It's great to summarize what worked and what didn't. 


####1. Understand the Problem

• First. You have to understand 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?


####2. Devising a Plan

• Find the connection between the data and the unknown. 
  Auxiliary problems needs to be considered.
• Have you seen it before? Or have you seen the same problem 
  in a slightly different form?

• Look at the unknown! Try to think of a familiar problem 
  having the same or a similar unknown.
• Here is a problem related to yours and solved before. Could 
  you use it(StackOverflow, Github)?

• Could you restate the problem? 
• If you cannot solve the proposed problem, try to solve 
  first some related problem. 

• Could you imagine a more accessible related problem? 
• Could you change the unknown or data, or both if necessary, 
  so that the new unknown and the new data are nearer to each 
  other?

• Did you use all the data? Did you use the whole condition? 
  Have you taken into account all essential notions involved 
  in the problem?

####3. Carrying Out The Plan

• Third. Carry out your plan.
• Carry 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?

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/djm8cc0yb45dtp3yhytv.jpeg) 

####4. Looking Back

• Examine the solution obtained.
• Can you check the result? Can you check the argument?
• Can you derive the solution differently? Can you see it at a glance?
• Can you use the result, or the method, for some other problem?

I really recommend you to read How to Solve It: A New Aspect of Mathematical Method. 

Credits to berkeley who published for free another resume of Polya works, which inspired me to do this one.
https://math.berkeley.edu/~gmelvin/polya.pdf 

##Conclusion:

**Time to solve your fizzbuzz issue with Polya's help**

Feel free to @ me on Twitter with your opinion & feedback about my article; Constructive feedback is welcome.