{"id":3094,"date":"2019-09-25T10:18:27","date_gmt":"2019-09-25T16:18:27","guid":{"rendered":"https:\/\/alliwalk.com\/blog\/?p=3094"},"modified":"2019-10-28T09:21:44","modified_gmt":"2019-10-28T15:21:44","slug":"solving-design-problems-like-a-mathematician","status":"publish","type":"post","link":"https:\/\/alliwalk.com\/blog\/2019\/09\/solving-design-problems-like-a-mathematician\/","title":{"rendered":"Solving Design Problems like a Mathematician"},"content":{"rendered":"<p>In a recent FreeCodeCamp forum, someone asked a question about journaling:<\/p>\n<p style=\"padding-left: 30px;\"><em>Hi coders,<\/em><br \/>\n<em>While looking for the source for my project, I saw that some programmers or developers wrote a kind of diary to keep track of the code. I think it\u2019s nice, but I was wondering exactly how you can structure a diary and if any of you use this to write code.\u00a0<\/em><a href=\"https:\/\/www.freecodecamp.org\/forum\/t\/programming-journal\/315832\">Question here.<\/a><\/p>\n<p>Good question. I&#8217;ve seen other people use diaries or online journals, or those things people use&#8230;writing logs or whatever. \ud83d\ude42<\/p>\n<p>Anyway, the only reply includes <a href=\"https:\/\/routley.io\/posts\/logbook\/\">a link about using a &#8220;logbook&#8221;<\/a>. On the link page, the author references George P\u00f3lya\u00a0and his book\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/How_to_Solve_It\">How to Solve It<\/a>. I had never heard of this person or his book, so I did a little research.<\/p>\n<h3>George P\u00f3lya, (1887 &#8211; 1985)<\/h3>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/George_P%C3%B3lya\">George P\u00f3lya<\/a> was a Hungarian-born mathematician who was known for his mathematics work, as well as his work in heuristics. <a href=\"https:\/\/en.wikipedia.org\/wiki\/Heuristic\">Heuristics<\/a> is &#8220;any approach to problem solving or self-discovery that employs a practical method&#8221;.<\/p>\n<p style=\"padding-left: 30px;\"><em>&#8220;Examples that employ heuristics include using a\u00a0rule of thumb, an\u00a0educated guess, an\u00a0intuitive\u00a0judgment, a\u00a0guesstimate,\u00a0profiling, or\u00a0<a title=\"Common sense\" href=\"https:\/\/en.wikipedia.org\/wiki\/Common_sense\">common sense<\/a>.&#8221;<\/em><\/p>\n<p>He\u00a0wrote a book about solving problems using common sense principles.<\/p>\n<figure style=\"width: 247px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/How_to_Solve_It\"><img loading=\"lazy\" class=\"size-medium\" src=\"https:\/\/upload.wikimedia.org\/wikipedia\/en\/9\/91\/HowToSolveIt.jpg\" width=\"247\" height=\"369\" \/><\/a><figcaption class=\"wp-caption-text\">1st edition cover of &#8220;How to Solve It&#8221;, published in 1945, by George P\u00f3lya, a Hungarian mathematician.<\/figcaption><\/figure>\n<h3>The George P\u00f3lya Method of Solving Problems<\/h3>\n<p>The <a href=\"https:\/\/en.wikipedia.org\/wiki\/How_to_Solve_It\">Wikipedia page<\/a>\u00a0shows that\u00a0P\u00f3lya\u00a0lays out some pretty good heuristics for solving problems. Although he intended for these strategies to be used for solving math problems, I think they could be used to provide a structured method for solving almost any difficult problem.<\/p>\n<h3>The P\u00f3lya problem solving method involves 4 principles:<\/h3>\n<ol>\n<li>First, you have to\u00a0<i>understand\u00a0the\u00a0problem<\/i>.<\/li>\n<li>After understanding,\u00a0<i>make a plan<\/i>.<\/li>\n<li><i>Carry out the plan<\/i>.<\/li>\n<li><i>Look back<\/i>\u00a0on your work.<span style=\"font-size: 12px;\">\u00a0<\/span>How could it be better?<\/li>\n<\/ol>\n<p>So how does it work?<\/p>\n<h3>Principle 1: Understand the Problem<\/h3>\n<p>P\u00f3lya based the first principle, <em>Understand the Problem<\/em>, on the idea that math students struggled to solve problems due to a\u00a0lack of understanding\u00a0the problem in full or in part. His technique involved coaching teachers to prompt students with the following questions:<\/p>\n<ul>\n<li>What are you asked to find or show?<\/li>\n<li>Can you restate the problem in your own words?<\/li>\n<li>Can you think of a picture or a diagram that might help you understand the problem?<\/li>\n<li>Is there enough information to enable you to find a solution?<\/li>\n<li>Do you understand all the words used in stating the problem?<\/li>\n<li>Do you need to ask a question to get the answer?<\/li>\n<\/ul>\n<p>Essentially one should not move past principle one until a constructive answer can be given. It&#8217;s not clear from the Wikipedia entry if a constructive answer is required for\u00a0each question or the entire problem.<\/p>\n<h3>\u00a0Principle 2: Make a Plan<\/h3>\n<p>Basically he felt that a person gets better at selecting a good plan\/strategy the more times they solve problems. Here&#8217;s a big list of strategies:<\/p>\n<ul>\n<li>Guess and check<\/li>\n<li>Make an orderly list<\/li>\n<li>Eliminate possibilities<\/li>\n<li>Use symmetry<\/li>\n<li>Consider special cases<\/li>\n<li>Use direct reasoning<\/li>\n<li>Solve an equation<\/li>\n<li>Look for a pattern<\/li>\n<li>Draw a picture<\/li>\n<li>Solve a simpler problem<\/li>\n<li>Use a model<\/li>\n<li>Work backward<\/li>\n<li>Use a formula<\/li>\n<li>Be creative &#8211; <em>(&#8220;[Have] patience to wait until the bright idea appears&#8221;)<\/em><\/li>\n<li>Applying these rules to devise a plan takes your own skill and judgement &#8211; <em>(&#8220;Always use your own brain first&#8221;)<\/em><\/li>\n<\/ul>\n<h3>Principle 3: Carry out the plan<\/h3>\n<p>Simple enough, but the main problem people have with this step is giving up too soon. For that, the Wikipedia entry says:<\/p>\n<p><em>&#8220;In general, all you need is care and patience, given that you have the necessary skills. Persist with the plan that you have chosen. If it continues not to work, discard it and choose another.&#8221;<\/em><\/p>\n<h3>Principle 4: Review, Reflect and Extrapolate<\/h3>\n<p>Take a look at what you&#8217;ve done, and evaluate how well it worked (or didn&#8217;t), and see how you can use what you&#8217;ve discovered for future problems.<\/p>\n<hr \/>\n<p><strong>Finding the book:<\/strong><\/p>\n<pre>If you want to find this book, I recommend trying <a href=\"https:\/\/www.worldcat.org\/\">your library<\/a>. I found it by searching for \"how to solve it book pdf\" (Google suggested the \"pdf\") and I found a copy.<\/pre>\n<hr \/>\n<h4><em>Update:<\/em><\/h4>\n<p><em>An earlier version of this post included an account of how I applied Polya&#8217;s technique to my portfolio changes. A follow-up\u00a0post will focus on that account.<\/em><\/p>\n<h2><\/h2>\n","protected":false},"excerpt":{"rendered":"<p>While reading a forum discussion on FreeCodeCamp, I came across a reference to George P\u00f3lya&#8217;s book, &#8220;How to Solve a Problem&#8221;. In this post, I review P\u00f3lya&#8217;s problem solving strategy. <\/p>\n","protected":false},"author":1,"featured_media":3254,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[211,37,1,8,3],"tags":[540,541,353,537,370],"_links":{"self":[{"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/posts\/3094"}],"collection":[{"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/comments?post=3094"}],"version-history":[{"count":24,"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/posts\/3094\/revisions"}],"predecessor-version":[{"id":3256,"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/posts\/3094\/revisions\/3256"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/media\/3254"}],"wp:attachment":[{"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/media?parent=3094"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/categories?post=3094"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alliwalk.com\/blog\/wp-json\/wp\/v2\/tags?post=3094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}