answer question
I399 – Problem solving Techniques
Lecture 7
Today
Midterm
P a r t 1:
W h y
Why we do this
Critical thinking!
Problem solving!
Keys to Mastery
Repetition
Challenge
Define the Problem
don't jump into trying to solve
read
re read
remain open minded
clarify
break it down
refine/be specific
figure out whys of the problem
P a r t 2:
Q u e s t i o n 1
1. You have 20 coins in a row. Ten are heads up, ten are tails up. The order is random. You also have a robot that can perform 4 different actions:
Move itself one coin's width to the left or right at a time.
See the heads/tails status of the two coins directly in front of it.
Flip over both of the two coins that it sees.
Remember a number
Can you give the robot a set of instructions that will result in all 20 coins eventually being turned heads up using only the capabilities outlined above? If not, why? If so, what are the instructions?
Understand
Look for relations
Activity revisited
Can we flip successive pairs to leave only heads facing up?
Activity revisited
Either increase heads by 2
Decrease heads by 2
Or number remains unchanged
Simplify
Simplify
Simplify
Simplify
Simplify
Simplify
Simplify
Simplify
Activity revisited
look at 2 coins in front
if left is a tails, flip both
move one step to the right
repeat from 2
Activity revisited
remember the number 1
look at the 2 coins the robot can see
if left is a tails, flip both
move one step to the right
increase the number remembered by one
if only one coin can be seen in front of robot:
If number matches number of coins, Finish
otherwise: take one step to the left
swap all instances of left and right
change number remembered to 1
repeat from 3
Number: 1
Number: 1
Number: 2
Number: 2
Number: 3
Number: 3
Number: 4
Number: 5
Number: 6
Number: 6
Number: 6
Number: 6
Number: 1
Number: 1
Number: 2