22
Problem Solving: Practice & Approaches 1. Practice solving a variety of problems 2. Strategies for solving problems 3. More Practice 1

Problem Solving: Practice & Approaches

  • Upload
    tadeo

  • View
    74

  • Download
    1

Embed Size (px)

DESCRIPTION

Problem Solving: Practice & Approaches. Practice solving a variety of problems Strategies for solving problems More Practice. General Idea of This Lesson. Programming is like learning a language - PowerPoint PPT Presentation

Citation preview

Page 1: Problem Solving:  Practice & Approaches

1

Problem Solving: Practice & Approaches

1. Practice solving a variety of problems2. Strategies for solving problems3. More Practice

Page 2: Problem Solving:  Practice & Approaches

2

General Idea of This Lesson

• Programming is like learning a language– You need to learn the vocabulary (keywords), grammar (syntax), and

how to use punctuation (symbols)

• Problem solving is like learning to cook– A novice chef has a recipe – An master chef can create their own recipe

Both tasks require practice!

Page 3: Problem Solving:  Practice & Approaches

3

Review: Scientific Problem-Solving Method

1. Problem Statement2. Diagram3. Theory4. Assumptions5. Solution Steps6. Identify Results & Verify Accuracy7. Computerize the solution

a. Deduce the algorithm from step 5b. Translate the algorithm to lines of codec. Verify Results

Page 4: Problem Solving:  Practice & Approaches

4

Example #1: Balancing a fulcrum

A 30-kg child and a 20-kg child sit on a 5.00-m long teeter-totter. Where should the fulcrum be placed so the two children balance? (Note: an object is in static equilibrium when all moments balance.)

Using the supplied worksheet, solve the problem with the people sitting next to you.

Page 5: Problem Solving:  Practice & Approaches

5

Example #1: Balancing a fulcrum

1. Problem Statement:a) Givens:

b) Find:

2. Diagram

Page 6: Problem Solving:  Practice & Approaches

6

Example #1: Balancing a fulcrum

3. Theory

4. Assumptions

1

2

3

Page 7: Problem Solving:  Practice & Approaches

7

Example #1: Balancing a fulcrum

5. Solution Steps

Page 8: Problem Solving:  Practice & Approaches

8

Example #1: Balancing a fulcrum

6. Identify results and verify

Does this make sense?– Units?– Overall Dimension?– Easy to imagine!– Can you rerun the analyses with other givens using Step 5?

This is the key to Computer Programming!!

Page 9: Problem Solving:  Practice & Approaches

9

Problem Solving Strategies

• The trouble with Step 5: “Solution Steps”

There can be many approaches to solving the same problem

• Creativity is an important component on how we view and approach problems:

Page 10: Problem Solving:  Practice & Approaches

10

Creativity

• Connect the following 9 dots with four continuous lines without lifting your pencil

Sometimes you will need to think outside the box

Page 11: Problem Solving:  Practice & Approaches

11

Problem Solving Strategies (Polya, 1945)

• Utilize analogies– Flow through a piping system can be modeled with electronics

Resistors – Fluid FrictionCapacitors – Holdup tanksBatteries – Pumps

• Work Auxiliary Problems– Remove some constraints

• Generalize the problem Ex: L1 = m2 * L / (m1 + m2)

Page 12: Problem Solving:  Practice & Approaches

12

Problem Solving Strategies (Polya, 1945)

• Decompose & Recombine problems– Break the problem into individual components

Calculate Cost of Area(𝑝2+1 ) (𝑞2+1 ) (𝑟2+1 ) (𝑠2+1 )

𝑝𝑞𝑟𝑠 ≥16

Prove the following equation

2 x 2 x 2 x 2 = 16

Page 13: Problem Solving:  Practice & Approaches

13

Problem Solving Strategies (Polya, 1945)

• Work backwards from the solutionEx: Measure exactly 7 oz. of liquid from a large

container using only a 5 oz. container and an 8 oz. Container

Solution:8 5 7?

Page 14: Problem Solving:  Practice & Approaches

14

Example #2: Fuel tank design

A fuel tank is to be constructed that will hold 5 x 105 L. The shape is cylindrical with a hemisphere top and a cylindrical midsection. Costs to construct the cylindrical portion will be $300/m2 of surface area and $400/m2 of surface area of the hemispheres. What is the tank dimension that will result in the lowest dollar cost?

Page 15: Problem Solving:  Practice & Approaches

15

1. Problem Statement:a) Givens:

b) Find:

2. Diagram

Example #2: Fuel tank design

R

H

Page 16: Problem Solving:  Practice & Approaches

16

Example #2: Fuel tank design

3. Theory

4. Assumptions

1

2

3

4

Page 17: Problem Solving:  Practice & Approaches

17

Example #2: Fuel tank design

5. Solution Steps

Page 18: Problem Solving:  Practice & Approaches

18

Example #2: Fuel tank design

5. Solution Steps

Page 19: Problem Solving:  Practice & Approaches

19

Example #2: Fuel tank design

5. Solution Steps

R

Page 20: Problem Solving:  Practice & Approaches

20

Example #2: Fuel tank design

6. Identify results and Verify

Does this make sense?– Units?– Overall Dimension?– Can you rerun the analyses with other givens using Step 5?

Page 21: Problem Solving:  Practice & Approaches

21

Wrapping Up

• Utilize the 7 step process before you begin programming• Be clear about your approach• Think creatively• Use a couple of strategies when understanding a problem• Practice!• Use Matlab to make your life easier

Page 22: Problem Solving:  Practice & Approaches

22

Try it yourself

• What if the fuel tank had two hemispheres?

R

H

A fuel tank is to be constructed that will hold 5 x 105 L. The shape is cylindrical with a hemisphere top, a hemisphere base and, and a cylindrical midsection. Costs to construct the cylindrical portion will be $250/m2 of surface area and $300/m2 of surface area of the hemispheres. What is the tank dimension that will result in the lowest dollar cost?