haihongyuan.com

# Problem Solving

Engineering H192 -Computer Programming

Winter QuarterProblem SolvingLecture 2The Ohio State University

Gateway Engineering Education CoalitionLect 2P. 1

Engineering H192 -Computer Programming

INTRODUCTION TO PROBLEM SOLVING?Engineers must analyze and solve a wide range

of technical problems. Some will be reasonably simple single-solution problems. Others will be open-ended and will likely require a team of engineers from several disciplines. Some

problems may have no clear solution.

Winter QuarterThe Ohio State University

Gateway Engineering Education CoalitionLect 2P. 2

Engineering H192 -Computer Programming

INTRODUCTION TO PROBLEM SOLVING?PROBLEM SOLVING INVOLVES:

–EXPERIENCE

–KNOWLEDGE

–PROCESS

–ART

FOCUS: Computer Assisted Problem Solving?Computers are good tools for solving rule-based

problems using decision rules

Winter QuarterThe Ohio State University

Gateway Engineering Education CoalitionLect 2P. 3

Engineering H192 -Computer Programming

SCIENCE AND ART

SOME SAY ENGINEERING PROBLEM SOLVING

REQUIRES A COMBINATION OF SCIENCE AND ART:

SCIENCE

?Math

?Physics

?ChemistryART?Judgment?Experience?Common-Sense

?Mechanics

?Etc.

Winter Quarter?Know-How?Etc.Lect 2P. 4The Ohio State University

Gateway Engineering Education Coalition

Engineering H192 -Computer Programming

THE ENGINEERING METHOD

?

?

?

?

?

?

?RECOGNIZE AND UNDERSTAND THE PROBLEMGATHER DATA (AND VERIFY ITS ACCURACY)SELECT GUIDING THEORIES AND PRINCIPLESMAKE ASSUMPTIONS WHEN NECESSARYSOLVE THE PROBLEMVERIFY THE RESULTSPRESENT THE SOLUTIONWinter QuarterThe Ohio State University

Gateway Engineering Education CoalitionLect 2P. 5

Engineering H192 -Computer Programming

ENGINEERING PROBLEM TYPES

?Create a new product

–Invention/conceptualization

–New/modified design of existing product?Cost reduction

–Do it faster, cheaper, better

–example:Personal computers

Winter QuarterThe Ohio State UniversityLect 2

Gateway Engineering Education CoalitionP. 6

Engineering H192 -Computer Programming

ENGINEERING PROBLEM TYPES

?Develop or change a procedure

–Example: Warehouse inventory --Instead of having 3 month's inventory go to "just in time"?Human factors

–Make our lives longer, better, easier

–Examples: cruise control, moving sidewalks,management tools

Winter QuarterThe Ohio State University

Gateway Engineering Education CoalitionLect 2P. 7

Engineering H192 -Computer Programming

TYPES OF INFORMATION

FOR PROBLEM SOLVING

?GIVENS: The initial condition of the problem?OPERATIONS: The various actions we are

allowed to perform

?GOALS: The desired final condition of the

problem

?PROBLEM STATE: The state of the problem at

any specific point in time

?SOLUTION: Completely specified the GIVENS,

OPERATIONS, GOALS, and succession of PROBLEM STATES to get to GOAL state

Winter QuarterThe Ohio State UniversityLect 2

Gateway Engineering Education CoalitionP. 8

Engineering H192 -Computer Programming

STEPS IN PROBLEM SOLVING

?IDENTIFY THE PROBLEM

–YOU CAN’T FIX IT IF YOU DON’T KNOW WHAT IS BROKEN.

?DETERMINE WHAT IS REQUIRED FOR THE

SOLUTION

–WHAT IS KNOWN?

–WHAT IS UNKNOWN?

–ANY RESTRICTIONS OR LIMITATIONS?

–ANY SPECIAL CASES?

Winter QuarterThe Ohio State University

Gateway Engineering Education CoalitionLect 2P. 9

Engineering H192 -Computer Programming

STEPS IN PROBLEM SOLVING (CONT’D)?DEVELOP A STEP-BY-STEP PLAN (ALGORITHM).

–HOW ARE YOU GOING TO FIX IT?

?OUTLINE THE SOLUTION IN A LOGIC DIAGRAM?EXECUTE THE PLAN.

–KEEP TRACK OF WHAT WORKS AND WHAT DOESN’T.

Winter QuarterThe Ohio State University

Gateway Engineering Education CoalitionLect 2P. 10

Engineering H192 -Computer Programming

STEPS IN PROBLEM SOLVING (CONT’D)?ANALYZE THE SOLUTION

–REVISE THE PLAN AND RE-EXECUTE AS NEEDED.

–KEEP THE GOOD PARTS OF THE PLAN AND ALTER THE NOT-SO-GOOD ONES.

?REPORT / DOCUMENT THE RESULTS

–LET YOUR BOSS KNOW HOW YOUR IDEA WORKED ( in a written report ).

Winter QuarterThe Ohio State University

Gateway Engineering Education CoalitionLect 2P. 11

Engineering H192 -Computer Programming

FAILURE IS THE MOTHER OF INVENTION:

THE STORY OF THE BEVERAGE CAN?PROBLEM: Keep food from spoiling

?SOLUTION: In 1809 Nicholas Appert invented a

process for preserving food in glass bottles by filling them with water to kill the bacteria. He was awarded 12 000 francs by the French government.–In 1810 Appert wrote a book L’art de Conserver (very successful and profitable).

Winter QuarterThe Ohio State University

Gateway Engineering Education CoalitionLect 2P. 12

Engineering H192 -Computer Programming

THE STORY OF THE BEVERAGE CAN

(continued)

?PROBLEM: Bottles break easily.

?SOLUTION: Peter Durand (London) devised a

sealed tin container.

?PROBLEM: How to open the tin. Soldiers used

knives, bayonets, and even rifle fire. A tin of

roast veal carried on one of William Parry’s Arctic expeditions bore the instruction, “Cut round on the top near the outer edge with a chisel and hammer.” The can (iron) was .2” thick and

weighed a pound (empty).

Winter QuarterThe Ohio State University

Gateway Engineering Education CoalitionLect 2P. 13

Engineering H192 -Computer Programming

THE STORY OF THE BEVERAGE CAN

(continued)

?SOLUTION(S):

–1. Use steel (stronger and thinner).

–2. Create specialized tools for opening cans

?1858 Ezra Warner (Connecticut) got a patent for a can opener that was describes as “Part bayonet, part sickle [with a] large curved blade.”

?1870 William Lyman (Connecticut) patented a can opener with a wheel that revolved around a center hole punched in the can.

Winter QuarterThe Ohio State University

Gateway Engineering Education CoalitionLect 2P. 14

Engineering H192 -Computer Programming

THE STORY OF THE BEVERAGE CAN

(continued)

?PROBLEM: Lyman’s can opener had to be

adjusted for each can size and the punching of the center hole had to be exact.

?SOLUTION: Modern style can opener was

patented in 1925. There is still room for

improvement.

Winter QuarterThe Ohio State UniversityLect 2

Gateway Engineering Education CoalitionP. 15

Engineering H192 -Computer Programming

THE STORY OF THE BEVERAGE CAN

(continued)

?PROBLEM: Thin cans lacked stiffness and

buckled.

?SOLUTION(S):

–1. Add a rim at top and bottom.

–2. Corrugate the sides.

Winter QuarterThe Ohio State UniversityLect 2

Gateway Engineering Education CoalitionP. 16

Engineering H192 -Computer Programming

THE STORY OF THE BEVERAGE CAN

(continued)

?PROBLEM: Beverage cans opened with can

openers had jagged edges and too big an

opening.

?SOLUTION: The “Church Key” can opener.

?PROBLEM: It kept getting lost or you didn’t have

it with you when you needed it.

?SOLUTION: Cans with discardable pull tabs,

called pop tops.

Winter QuarterThe Ohio State University

Gateway Engineering Education CoalitionLect 2P. 17

Engineering H192 -Computer Programming

THE STORY OF THE BEVERAGE CAN

(continued)

?PROBLEM: What to do with pull tabs after

removal?

–Make chains? –Artistic

–Drop them in the can? –Dangerous

?SOLUTION: Pop tops that stay attached to the

can.

?PROBLEM: Some people with long finger nails or

weak, arthritic fingers cannot open them.

?AND SO ON, AND ON, AND ON, AND …...

Winter QuarterThe Ohio State University

Gateway Engineering Education CoalitionLect 2P. 18

Engineering H192 -Computer Programming

PROBLEM SOLVING EXAMPLE

Problem: Fill a bottle with stones

Instructions:

?Document any assumptions that may be

required

?Write a step-by-step procedure for solving

the problem

?Do this in pairs first then have a solution

Winter QuarterThe Ohio State University

Gateway Engineering Education CoalitionLect 2P. 19

Engineering H192 -Computer Programming

PROBLEM SOLVING EXAMPLE

Assumptions:

?Bottle is present

?

?

?

?

Winter QuarterThe Ohio State University

Gateway Engineering Education CoalitionLect 2P. 20

Engineering H192 -Computer Programming

PROBLEM SOLVING EXAMPLE

Assumptions:

?Bottle is present

?Stones are present

?There are enough stones to fill bottle?Bottle is empty (or at least not full)

?Some (or all) stones fit through openingWinter QuarterThe Ohio State UniversityLect 2

Gateway Engineering Education CoalitionP. 21

Engineering H192 -Computer Programming

PROBLEM SOLVING EXAMPLE

Algorithm:

1. Set bottle upright near stones2.

3.

4.

5.

6.

7.

Winter QuarterThe Ohio State University

Gateway Engineering Education CoalitionLect 2P. 22

Engineering H192 -Computer Programming

PROBLEM SOLVING EXAMPLE

Algorithm:

1. Set bottle upright near stones

2. Check to see if bottle is full. If so, then

go to Step #6

3. Pick up a stone and try to put it in bottle

4. If stone too large to fit, discard stone, and

go to Step #3

5. Otherwise, the stone fits, go to Step #2

6. Stop

Winter QuarterThe Ohio State University

Gateway Engineering Education CoalitionLect 2P. 23