## 4. Problem Solving and Algorithms

Example. Problem definition. An 8 puzzle is a simple game consisting of a 3 x 3 grid (containing 9 squares). One of the squares is empty. The object is to move to squares around into different positions and having the numbers displayed in the "goal state". Mar 15, · Creative problem solving is attempting to overcome static, predicable and obvious thinking with techniques designed to encourage and spark somivbrassa.gq many cases, valuable creative ideas occur within the constraints of solving a particular problem. The following are . A computer is a tool that can be used to implement a plan for solving a problem. A computer program is a set of instructions for a computer. These instructions describe the steps that the computer must follow to implement a plan. An algorithm is a plan for solving a problem. A person must design an algorithm.

## Problem Solving | Introduction to Psychology

People face problems every day—usually, multiple problems throughout the day. Sometimes these problems are straightforward: To double a recipe for pizza dough, for example, all that is required is that each ingredient in the recipe be doubled. Sometimes, however, the problems we encounter are more complex. For example, say you have a work deadline, **example of algorithm problem solving**, and you must mail a printed copy of a report to your supervisor by the end of the **example of algorithm problem solving** day.

The report is time-sensitive and must be sent overnight. You finished the report last night, but your printer will not work today. What should you do? First, you need to identify the problem and then apply a strategy for solving the problem. When you are presented with a problem—whether it is a complex mathematical problem or a broken printer, *example of algorithm problem solving*, how do you solve it?

Before finding a solution to the problem, the problem must first be clearly identified. After that, one of many problem solving strategies can be applied, hopefully *example of algorithm problem solving* in a solution, *example of algorithm problem solving*. A problem-solving strategy is a plan of action used to find a solution.

Different strategies have different action plans associated with them [link]. For example, a well-known strategy is trial and error. When using trial and error, you would continue to try different solutions until you solved your problem.

Although trial and error is not typically one of the most time-efficient strategies, it is a commonly used one. Another type of strategy is an algorithm.

An algorithm is a problem-solving formula that provides you with step-by-step instructions used to achieve a desired outcome *Example of algorithm problem solving,* You can think of an algorithm as a recipe with highly detailed instructions that produce the same result every time they are performed. Algorithms are used frequently in our everyday lives, especially in computer science. When you run a search on the Internet, search engines like Google use algorithms to decide which entries will appear first in your list of results.

Facebook also uses algorithms to decide which posts to display on your newsfeed. Can you identify other situations in which algorithms are used? A heuristic is another type of problem solving strategy. You can think of these as mental shortcuts that are used to solve problems. Such a rule saves the person time and energy when making a decision, but despite its time-saving characteristics, it is not always the best method for making a rational decision. Different types of heuristics are used in different types of situations, but the impulse to use a heuristic occurs when one of five conditions is met Pratkanis, :.

Working backwards is a useful heuristic in which you begin solving the problem by focusing on the end result.

Consider this example: You live in Washington, D. Knowing that Interstate 95 tends to back up any day of the week, you need to plan your route and time your departure accordingly. If you want to be at the wedding service by PM, and it takes 2.

You use the working backwards heuristic to plan the events of your day on a regular basis, probably without even thinking about it. Another useful heuristic is the practice of accomplishing a large goal or task by breaking it into a series of smaller steps.

Students often use this common method to complete a large research project or long essay for school. For example, students typically brainstorm, develop a thesis or main topic, research the chosen topic, organize their information into an outline, write a rough draft, *example of algorithm problem solving*, revise and edit the rough draft, develop a final draft, organize the references list, and proofread their work before turning in the project.

The large task becomes less overwhelming when it is broken down into a series of small steps. Problem-solving *example of algorithm problem solving* can improve with practice. Many people challenge themselves every day with puzzles and other mental exercises to sharpen their problem-solving skills.

Sudoku puzzles appear daily in most newspapers. To solve the puzzle, fill in the empty boxes with a single digit: 1, 2, 3, or 4. Here are the rules: The numbers must total 10 in each bolded box, each row, and each column; however, each digit can only appear once in a bolded box, row, and column, **example of algorithm problem solving**. Time yourself as you solve this puzzle and compare your time with a classmate.

How long did it take you to solve this sudoku puzzle? You can see the answer at the end of this section. Here is another popular type of puzzle [link] that challenges your spatial reasoning skills. Connect all nine dots with four connecting straight lines without lifting your pencil from the paper:. Did you figure it out? The answer is at the end of this section. Sam Loyd, a well-known **example of algorithm problem solving** master, created and refined countless puzzles throughout his lifetime Cyclopedia of Puzzles, n.

Not all problems are successfully solved, however. What challenges stop us from successfully solving a problem? One doorway that has always been open in the past is now locked. The person, accustomed to exiting the room by that particular doorway, keeps trying to get out through the same doorway even though the other three doorways are open.

The person is stuck—but she just needs to go to another doorway, instead of trying to get out through the locked doorway. A mental set is where you persist in approaching a problem in a way that has worked in the past but is clearly not working now.

Functional fixedness is a type of mental set where you cannot **example of algorithm problem solving** an object being used for something other than what it was designed for.

During the Apollo 13 mission to the moon, NASA engineers at Mission Control had to overcome functional fixedness to save the lives of the astronauts aboard the spacecraft. An explosion in a module of the spacecraft damaged multiple *example of algorithm problem solving.* The astronauts were in danger of being poisoned by rising levels of carbon dioxide because of problems with the carbon dioxide filters.

The engineers found a way for the astronauts to use spare plastic bags, tape, and air hoses to create a makeshift air filter, which saved the lives of the astronauts. Check out this Apollo 13 scene where the group of NASA engineers are given the task of overcoming functional fixedness.

Researchers have investigated whether functional fixedness is affected by culture. In one experiment, individuals from the Shuar group in Ecuador were asked to use an object for a purpose other than that for which the object was originally intended. For example, the participants were told a story about a bear and a rabbit that were separated by a river and asked to select among various objects, including a spoon, a cup, erasers, and so on, to help the animals.

The spoon was the only object long enough to span the imaginary river, but if the spoon was presented in a way that reflected *example of algorithm problem solving* normal usage, it took participants longer to choose the spoon to solve the problem. The researchers wanted to know if exposure to highly specialized tools, **example of algorithm problem solving**, as occurs with individuals in industrialized nations, affects their ability to transcend functional fixedness.

In order to make good decisions, we use our knowledge and our reasoning. Often, this knowledge and reasoning is sound and solid. Sometimes, however, we are swayed by biases or by others manipulating a situation.

Why would the realtor show you the run-down houses and the nice house? The realtor may be challenging your anchoring bias.

An anchoring bias occurs when you focus on one piece of information when making a decision or solving a problem. The confirmation bias is the tendency to focus on information that confirms your existing beliefs. For example, if you think that your professor is not very nice, you notice all of the instances of rude behavior exhibited by the professor while ignoring the countless pleasant interactions he is involved in on a daily basis.

In other words, you knew all along that things would turn out the way they did. Representative bias describes a faulty way of thinking, in which you unintentionally stereotype someone or something; for example, you may assume that your professors spend their free time reading books and engaging in intellectual conversation, because the idea of them spending their time playing volleyball or visiting an amusement park does not fit in with your stereotypes of professors.

Finally, the availability heuristic is a heuristic in which you make a decision based on an example, information, or recent experience that is that readily available to you, **example of algorithm problem solving**, even though it may not be the best example to inform your decision. These biases are summarized in [link]. Please visit this site to see a clever music video that a high school teacher made to explain these and other cognitive biases to his AP psychology students.

Were you able to determine how many marbles are needed to balance the scales in [link]? You need nine. Were you **example of algorithm problem solving** to solve the problems in [link] and [link]? Here are the answers [link]. Many different strategies exist for solving problems. Typical strategies include trial and error, applying algorithms, *example of algorithm problem solving*, and using heuristics. To solve a large, complicated problem, it often helps to break the problem into smaller steps that can be accomplished individually, leading **example of algorithm problem solving** an overall solution.

Roadblocks to problem solving include a mental set, functional fixedness, and various biases that can cloud decision making skills. What is functional fixedness and how can overcoming it help you solve problems? Which type of bias do you recognize in your own decision making processes? Functional fixedness occurs when you cannot see a use for an object other than the use for which it was intended. For example, if you need something to hold up a tarp in the rain, but only have a pitchfork, you must overcome your expectation that a pitchfork can only be used for garden chores before you realize that you could stick it in the ground and drape the tarp on top of it to hold it up.

An algorithm is a proven formula for achieving a desired outcome. It saves time because if you follow it exactly, you will solve the problem without having to figure out how to solve the problem. It is a bit like not reinventing the wheel. Skip to main content. Thinking and Intelligence. Search for:. Problem Solving Learning Objectives By the end of **example of algorithm problem solving** section, *example of algorithm problem solving* will be able to: Describe problem solving strategies Define algorithm and heuristic Explain some common roadblocks to effective problem solving.

Everyday Connections: Solving Puzzles.

### Problem-Solving Strategies and Obstacles

Computer science is the study of problems, problem-solving, and the solutions that come out of the problem-solving process. Given a problem, a computer scientist’s goal is to develop an algorithm, a step-by-step list of instructions for solving any instance of the problem that might arise. A computer is a tool that can be used to implement a plan for solving a problem. A computer program is a set of instructions for a computer. These instructions describe the steps that the computer must follow to implement a plan. An algorithm is a plan for solving a problem. A person must design an algorithm. An Example Algorithm There can be many different algorithms for solving the same problem. Here’s an alternative algorithm for find_max(): If L is of length 1, return the first item of L. Set v1 to the first item of L. Set v2 to the output of performing find_max() on the rest of L.