Decomposition Intro Slides Module 01
DECOMPOSITION
Breaking the complex into the manageable.
System Blueprint Series
The PB&J Robot
Imagine you are talking to a robot. It has no common sense. It only understands literal, atomic instructions.
"How do I make a sandwich?"
"Put peanut butter on bread." (Fail! Where is the bread? Is the jar open?)
"Grasp the handle of the bread bag with thumb and forefinger."
Atomic Level Thinking
Core Definition
Breakdown
Dividing a complex problem or system into smaller, more manageable parts.
Atomicity
The state where a task cannot be broken down further without losing meaning.
Dependency
Understanding that some tasks MUST happen before others can begin.
Task Dependencies
Computers and teams need to know the Order of Operations.
1
Sequential: A -> B -> C
2
Parallel: A and B can happen at once
Example: Boiling Pasta
Fill Pot No Dependency
Boil Water Depends on Filling
Add Salt Depends on Boiling
Workshop Goal
"Organize the School Dance Disaster"
We are going to take a massive, stressful event and decompose it into 4 sub-categories and at least 20 atomic tasks.
Dance Disaster Worksheet Dance Disaster
Decomposition Workshop | Lesson 1.1
NAME:
DATE:
The Scenario
The school principal has just tasked you with organizing the "Glow-in-the-Dark Winter Formal". It's happening in exactly 4 weeks. You have a budget, 500 expected guests, and zero planning done. It's a "Big, Amorphous Problem." Your job is to decompose this disaster into actionable steps.
1 PHASE 1: CATEGORY BREAKDOWN
Break the massive project into 4 logical sub-categories (e.g., Logistics, Promotion).
Sub-Category A
Initial Ideas...
Sub-Category B
Initial Ideas...
Sub-Category C
Initial Ideas...
Sub-Category D
Initial Ideas...
2 PHASE 2: ATOMIC TASKING
Select ONE of your sub-categories from Phase 1. Break it down into 5 atomic tasks that a "robot" could execute. No task should be vague.
SUB-CATEGORY SELECTED: __________________________________________________
# Task Description (Atomic Level) Dependency (What must happen first?) 1 2 3 4 5
3 REFLECTION
Why is it important to identify dependencies BEFORE starting work on a complex project?
What happens to your "Atomic Tasks" if you realize a task is actually still too complex?
Computational Thinking Foundation Unit 01 | Lesson 01 Standard CT.1.1
Pattern Recognition Slides Module 02
Pattern Recognition
Finding the signals in the noise.
Data Hunter Series
Cipher Challenge
Observe these three strings. What is the Repeating Key?
AFX-7 J9 QLP-2 J9 MKZ-4
WRE-1 J9 PLO-9 J9 TUV-0
BGT-5 J9 YHN-6 J9 RFC-8
Pattern recognition allows us to simplify complex data sets into rules.
Core Concepts
Finding Similiarities
Looking for common characteristics or trends shared across different problems or objects.
Generalization
Creating a solution that works for a group of things, rather than just one specific instance.
Identifying the
Loop Opportunity
The Efficiency Engine
Pattern recognition leads directly to two vital coding structures:
Loops
"Do the same thing X times."
Functions
"Define once, reuse many times."
Can you spot the outliers?
Cipher Hunter
Mission Objective
You will analyze three distinct data "leaks." Your goal is to identify the pattern and propose a single rule that describes all the data.
Cipher Hunter Activity Cipher Hunter
Pattern Recognition Protocol | Unit 02
ID:
TIMESTAMP:
Mission Briefing
Intelligence has intercepted three distinct data streams. We suspect a common logic governs these sequences. Your task is to find the repeating pattern and generalize the rule. This will allow our systems to predict future data without manual review.
1 STREAM 01: STRING SEQUENCING
1. [X-01] [X-02] [Y-99] [X-03] [X-04] [Y-99]
2. [A-50] [A-60] [Y-99] [A-70] [A-80] [Y-99]
3. [K-11] [K-12] [Y-99] [K-13] [K-14] [Y-99]
What is the repeating element? (The constant)
Define the General Rule for this stream:
2 STREAM 02: INCREMENTAL LOGIC
DATA_A: 10, 20, 30, 40, 50, 60, 70, 80
DATA_B: 105, 115, 125, 135, 145, 155, 165, 175
DATA_C: 22.5, 32.5, 42.5, 52.5, 62.5, 72.5, 82.5, 92.5
What is the "Change Value" per step?
How would you program a loop for this?
3 STREAM 03: COORDINATE MAPPING
Analyze the coordinates below. Find the rule that governs where the "System Crash" occurs.
Event 1 (Crash)
X: 10 | Y: 10
Event 2 (Stable)
X: 05 | Y: 08
Event 3 (Crash)
X: 12 | Y: 12
Event 4 (Stable)
X: 20 | Y: 15
Event 5 (Crash)
X: 08 | Y: 08
Event 6 (Stable)
X: 10 | Y: 09
Generalize the Crash Rule:
"A system crash occurs whenever..."
4 SYSTEM DESIGN REFLECTION
How does recognizing a pattern allow a programmer to use a Loop instead of writing every line manually?
In Stream 03, why is it better to have a single "Rule" than to list every single coordinate that crashes?
Computational Thinking Foundation Unit 01 | Lesson 02 Standard CT.1.2
Abstraction Slides Module 03
ABSTRACTION
Removing the noise to find the essence.
System Modeling Series
The Map Paradox
A "perfectly accurate" map of a city would be the size of the city itself. It would be useless.
The Lesson:
To be useful, a model MUST lie about certain details.
Topological vs. Geographical
What is Abstraction?
FILTERING OUT DETAIL
TO FOCUS ON ESSENTIALS.
Irrelevant Detail
The color of the train, the smell of the station, the exact curve of the track.
Essential Data
The order of stations, the transfer points, the line connections.
Models in CS
User Profiles
Does the database need to know your favorite color? Or just your login ID?
E-Commerce Item
Ignore the fabric texture; focus on the weight, price, and stock count.
Weather Apps
Forget individual clouds; use numerical averages for temperature and wind.
Transit Architect
Mission Objective
Take a "messy" hand-drawn map of a park with bike paths. Abstract it into a clean, topological model where only junctions and paths matter.
Transit Architect Activity Transit Architect
Abstraction & System Modeling | Unit 03
ARCHITECT:
REVISION:
Project Brief
The city of Labyrinthia has a beautiful but confusing park called "Thicket Garden." Tourists keep getting lost because the current map shows every single tree, fountain, and squirrel nest. Your mission is to create a Topological Abstract Map.
Ignore the scenery. Focus only on the Junctions (Points) and the Paths (Edges) that connect them.
Abstraction Principle:
"Omit the irrelevant. Amplify the essential."
1 DETAIL FILTERING
List 3 details from a real park that are IRRELEVANT to navigating a bike path system.
2 THE DATA MODEL
Read the messy description of Thicket Garden below. Extract the "Node" data.
"The entrance is at the South Gate (A) . A winding, gravel path leads North for 2 miles to the Stone Fountain (B) . If you turn East from the fountain, you'll cross a wooden bridge to the Duck Pond (C) . Alternatively, head West from the fountain through a dense oak forest to reach the Old Clocktower (D) . Finally, a direct path connects the Duck Pond (C) and the Clocktower (D) around the back of the gardens."
Node ID Real-World Entity Connections (Edges) A South Gate Connects to B B C D
3 THE ABSTRACT MODEL
Draw your topological map here. Use ONLY circles for Nodes and straight lines for Edges. Do not draw trees or grass!
Modeling Canvas
Computational Thinking Foundation Unit 01 | Lesson 03 Standard CT.1.3
Logic Logic Slides Module 04
Logic Blueprinting
Writing the instructions for the machine.
Algorithm Architect Series
System Error
WHILE (Hungry == True):
Eat_Pizza()
What happens if the robot never gets full?
The Infinite Loop
Logic must have an exit condition.
Flowchart Grammar
Start
Terminator: Starts/Ends
Process
Rectangle: Action/Step
?
Diamond: Decision (Yes/No)
Visualizing the
Decision Tree
What is Pseudocode?
It's a way of writing logic that is human-readable but structurally sound.
No strict syntax rules.
Uses Indentation for nesting.
Focuses on the "how" of the logic.
// Evening Routine
IF time > 9:00 PM THEN
Turn_Off_Screen()
Go_To_Sleep()
ELSE
Keep_Gaming()
END IF
Logic Flow
Mission Objective
You will take a broken flowchart and debug it to prevent errors. Then, you will translate a complex real-world logic puzzle into structured pseudocode.
Logic Flow Worksheet Logic Flow
Pseudocode & Flowcharting | Unit 04
SYSTEMS ANALYST:
DATE_STAMP:
1 DEBUGGING PROTOCOL
The flowchart below describes the logic for an automatic smart-lamp. However, there is a Critical Logic Error that will cause the lamp to stay on forever once it gets dark.
Start
Read Light Level
Is Dark?
YES
Turn Lamp ON
NO
Turn Lamp OFF
Stops Here!
Analysis:
The program reaches "Turn Lamp ON" and then stops. It never checks the light level again.
How would you fix the logic flow? (Describe the arrow/loop that is missing):
2 PSEUDOCODE SYNTHESIS
Translate the following human procedure into structured pseudocode. Remember to use IF/ELSE and proper indentation.
"We need a logic system for a vending machine. If the user puts in enough money and the item is in stock, give them the item and the change. If they have enough money but it's out of stock, give them back their money. If they don't have enough money, tell them to add more."
// Vending Machine Logic
Computational Thinking Foundation Unit 01 | Lesson 04 Standard CT.1.4
Edge Case Slides CAUTION: SYSTEM STRESS TEST IN PROGRESS // CAUTION: SYSTEM STRESS TEST IN PROGRESS
CAUTION: SYSTEM STRESS TEST IN PROGRESS // CAUTION: SYSTEM STRESS TEST IN PROGRESS
Module 05
The Stress Test
Finding where the logic breaks.
Logic Verification Series
Edge Cases
Most algorithms work for the Common Case (the expected path).
An Edge Case is a problem or situation that occurs only at an extreme (maximum or minimum) operating parameter.
Example: Age Verification
Common Case: User enters "25"
Edge Cases:
- User enters "0"
- User enters "-5"
- User enters "10,000"
- User leaves it blank
Manual Verification
Zero Values
What happens if the input is empty or zero?
Overflow
What happens if the number is too big for the system?
Unexpected Types
Asking for a number, getting a word.
The Trade-Off
You are no longer the Author.
You are the Compiler.
"When you read a peer's algorithm, follow it literally. If they didn't say to turn, walk through the wall. If they didn't say to stop, keep walking until the paper ends."
Algorithm Stress Test
The Maze Challenge
Trade your algorithms. One student acts as the "Computer" and tries to break the code. The other acts as the "Debugger" to fix it.
Algorithm Stress Test Activity Stress Test
Logic Verification Protocol | Unit 05
AUTHOR:
VERIFIER:
1 THE BLUEPRINT
Write the pseudocode for a robot to escape a simple maze. Use "Move_Forward()", "Turn_Left()", and "Turn_Right()". Include logic for "If path is blocked...".
// Escape Algorithm
2 VERIFICATION LOG
Trade papers with a partner. You are now the "Computer." Read their code and try to find an Edge Case where the robot crashes or gets stuck.
Test Case 01: The "Infinite T-Junction"
What happens if the robot has two paths available at once? Does the code specify which one to take?
Test Case 02: The "Dead End"
What happens if the robot hits a wall on all sides? Does the code have an "ELSE" or a turn-around command?
General Bug Report
Describe any other point where the logic was ambiguous or literal instructions failed.
3 FINAL REFINEMENT
Based on your partner's feedback, what is the ONE line of code you would change or add to make your algorithm "indestructible"?
// Patch 1.0.1:
Computational Thinking Foundation Unit 01 | Lesson 05 Standard CT.1.5