The second step is to devise a plan. One of the suggestions for devising a plan is to use a model. A model is an example on a smaller l scale. In this case, a simulation can be used for a model. Steps for Playing Guess My Number 1. Player 1 thinks of a number within a range, say from 1 to 100. 2. Player 1 tells Player 2, “I am thinking of a number between 1 and 100 guess my number.” 3. Player 2 makes a guess. 4. Make a decision about the guess. A. If the guess equals the number, Player 2 wins. Game over. B. If the guess is too high, Player 1 says, “Too high. Guess again.” Go to Step 3. C. If the guess is too low, Player 1 says, “Too low. Guess again.” Go to Step 3. The next step is to carry out the plan. To do this, two players need to follow the algorithm to play the game. The final step is to evaluate the success of the plan. Is the plan successful? The algorithm tells the players how to play the game. However, a step is missing from this model. How does the game end if Player 2 does not guess the number? The game could be limited to a certain number of guesses. Or the game could go until Player 2 gives up. The algorithm should be updated to include a means to end the game. Carl Friedrich Gauss is one of the most important mathematicians of all time. When he was in elementary school in the 1700s, his teacher gave him the problem, “Find the sum of the first 100 whole numbers.” Gauss thought it wasw busywork, so he found a quick way to solve the problem by solving a simpler Car l Frie d ric h Gauss is o ne of the most important m at h ematicians o f a ll time. When h e was in e lementary school in t h e 1700s, h is teac h er g ave h im t h e pro bl em, “Find the sum of the fir st 1 00 whole numbers. Gauss t h ou gh t it as b usywor k , so h e f oun d a quic k way to so l ve t h e p ro bl em b y so l ving a s impler problemproblem.. FYI FYI A s st rategy y for f solving a problem p requiringg value es is to find n a pattern. Look L at several examplesp a le of th t he proble l em for common mo attributes. After e r finding nd the h pattern r n, make a statement t for a solutio i on . A famous a problem m is the fence post t prob p o bl em. A fence c e will be built t t th at is 12 yards long. on Each E fence c e post is one yard ya away from the e next x t post. The problem ob is to find nd out how many fence fe e posts will be needed ne for the e fence. f Drawing g a diagram on scra r at ch h paper p may be the best t s st rategy. Do not fo or get e t the posts at each end d of o the fence. How w many n fence posts and rail sections ti are there? Wh ha t is is the relationship between ee the number of f f fe nce c posts and rail sections?t io If R is the numbe b er of o f rail sections and P is the number of fence posts, write a simple e eq uation to show th t he re r el ationship. This problem can be solved using a computer because the algorithm is an equation.a eq ti Coding Conundrum Patterns sunlover/Shutterstock.com This fence has posts and rail sections between each post. Copyright Goodheart-Willcox Co., Inc. Chapter 2 Solving Problems 29
Previous Page Next Page