Thinking Slowly
Ryan: Introduction to Computational Reasoning Fall 2025
See also
Could You Do This?

The Lindy Hop, a form of western swing dance
What if we slow things down a little?
Cincinatti Lou
Thinking Slowly
Slow Down
Slow Down

THE
INFINITE CORRIDOR

What was Edgerton's Secret?
A very short flash at just the right moment.
And for slow motion video, a lot of very quick flashes in a sequence.
It's almost like decomposition
in time
Lessons from Lindy Beige's Video?
- Slow down
- Literally take things one step at a time
- Decompose larger problems into smaller problems
- Hide the detail of low level solutions so you can think about higher level logic
- Use abstraction to get a handle on things (e.g., type A and type B steps)
Lots More of Low Level Pieces
Musical Refresher: four beats to a bar

Challenge
Choreography a 32 Bar Routine
Break the Problem Down

Further Refinement

Refine Down to Step-Level

Just Learning to Adjust Focus
Stepwise Dinner
Let's Throw a Party

2020 Video
Stepwise Refinement
will take us
from this→

It's just
some food,
some games, and some dancing.
No biggie.
To this→
Let's Brainstorm
cheese
menu
chop veggies
toothpicks
rap
jazz
DJ
menu
appetizers
plates
forks
table cloth
board games
napkins
cards
chicken
kebabs
cleanup
shopping
spices
invites
games
condiments
snacks
cook
food
music
rock
cheese
menu
chop veggies
toothpicks
rap
jazz
DJ
menu
appetizers
plates
forks
table cloth
board games
napkins
cards
chicken
kebabs
cleanup
shopping
spices
invites
games
condiments
snacks
cook
food
music
rock
cheese
menu
chop veggies
toothpicks
rap
jazz
DJ
setup
appetizers
plates
forks
table cloth
board games
napkins
cards
chicken
kebabs
cleanup
shopping
spices
invites
games
condiments
snacks
cook
food
music
rock

Some Hierarchy Helps
STEPWISE REFINEMENT
HELPS
EVEN
MORE

Guest Lecture! Donald Knuth
Black Boxes
outputs
inputs






Black Boxes Are Everywhere
What Did I Do?
To look up "concatenate" in the dictionary I open the dictionary to about the middle and look at the page. Determine whether the target word is in front, behind, or actually on the page I am looking at. If it is on this page, scan until I find it. If it is in front of this page I take the pages of the first half of the dictionary and let them fall open to about the middle. I look at the page I am on and if the target word is there I scan to locate it. Otherwise I figure out if it is in front of behind where I am. I then repeat this technique for the pages in front or behind.
What Did I Do?
- select a page about midway through the dictionary
- determine if target word is before, on, or after this page
- if on this page, scan to word, and you are done.
- hold pages in front or behind as appropriate
- select a page about midway through
- repeat from step 2 above
What Did I Do?
split pages about half-way if target word on page done otherwise if before grab front half of pages else grab back half of pages repeat

Instruct a Robot to Find the Largest Card
The robot can only
Point at the cards as card1, card2, etc.
Read the value of a card.
Remember things.
Compare things.
Pseudocode
Pseudocode
def: pseudocode is a convention for using everyday language infused with a programing language sensibility for describing how to solve a problem.
pseudocode is used to help you think and to help you communicate your ideas to other humans.
pseudocode is iterative. version 0 is free form, version n is relatively formal (but you get to make up the rules)
Pseudocode
one convention: use indentation to show hierarchical logic
if hot day
go to pool
otherwise
go for bike ride
Pseudocode
To Make Tea for Someone
boil water obtain tea obtain cup ask milk & sugar if yes milk add milk if yes sugar add sugar stir serve
boil water obtain tea obtain cup ask milk & sugar if yes milk add milk if yes sugar add sugar stir serve
Pseudocode
Determine if number is even or odd
get number divide number by 2 record remainder if remainder = 0 print EVEN else print ODD
get number divide number by 2 record remainder if remainder = 0 print EVEN else print ODD
Pseudocode
Yes/No Decisions
Multiple Case Decisions
if expression action else other action
case expression value1 : action1 value2 : action2 ... valuen : actionn otherwise : defaultAction other action
"Robot" Pseudocode

bold text are "keywords" - generic things code can do
italics are for "objects"
ordinary text is an explanation
"append" means to add to the end of a list of things
"percept" refers to the information the robot takes in about the world
SMALL-CAPS() is for actions
whiteboard
Pseudocode

whiteboard
Q&A
Thinking Slowly I
By Dan Ryan
Thinking Slowly I
How learning to think slowly is the first step in computational reasoning.
- 326