AI Tutor
How do engineers program a self-driving car to navigate city streets without crashing?
They don't write one massive instruction; they use decomposition, which means breaking down a large, complicated problem into smaller, manageable sub-problems.
Once you break a problem into smaller steps, how do you turn those steps into a visual plan that a computer can follow?

The Three-Step Decomposition Method

To solve any real-world problem, we follow three clear stages: identify the main goal, list the atomic steps (single actions that cannot be divided further), and map the decisions.
In a flowchart, we use rounded ovals for Terminators (Start/End), rectangles for Processes (actions), and diamonds for Decisions (questions with Yes/No paths).
Let's put this into practice with a real-world system: building an automatic pet feeder.

Worked Example: Automatic Pet Feeder

Our goal is simple: dispense food when the bowl is empty, but only if the food hopper is not empty.
Let's decompose this task into three specific sub-problems: checking sensor inputs, making a dispensing decision, and triggering the motor action.