Day 1 - Introduction to Algorithms
Day 1: Introduction to Algorithms
Learning Objectives
- AAP-1.A: Represent algorithmic processes without using a programming language.
- AAP-2.A: Express an algorithm that uses sequencing without using a programming language.
Essential Questions
- What is an algorithm and how do we represent it?
- How do algorithms help us solve problems in computing and everyday life?
Materials Needed
- Presentation slides on algorithms
- Handouts with everyday algorithms
- Flowchart and pseudocode templates
- Markers and large paper for algorithm visualization
- Exit ticket templates
Vocabulary
- Algorithm
- Pseudocode
- Flowchart
- Sequence
- Step
- Input
- Output
- Deterministic
Procedure (50 minutes)
Opening (10 minutes)
-
Welcome and Introduction (5 minutes)
- Introduce the Algorithms and Programming Big Idea in AP CSP
- Explain that this is the third of five big ideas in the course
- Share the learning objectives for the unit
- Connect to previous units (Creative Development, Data)
-
Activating Prior Knowledge (5 minutes)
- Ask students: "What do you think an algorithm is?"
- Have students share examples of algorithms they might use in daily life
- Create a class definition of "algorithm"
Main Activities (30 minutes)
-
Mini-Lecture: What is an Algorithm? (10 minutes)
- Define algorithm: a finite sequence of instructions to solve a problem or accomplish a task
- Explain key characteristics of algorithms:
- Precise and unambiguous steps
- Finite number of steps
- Produces a result or accomplishes a task
- Deterministic (same input always produces same output)
- Discuss examples of algorithms in everyday life:
- Recipes
- Directions to a location
- Assembly instructions
- Explain the importance of algorithms in computing
-
Activity: Develop Algorithms for Everyday Tasks (10 minutes)
- Divide students into small groups (3-4 students)
- Assign each group an everyday task (e.g., making a sandwich, tying shoes, etc.)
- Groups develop detailed step-by-step algorithms for their task
- Emphasize the need for precision and clarity
- Have groups exchange algorithms and attempt to follow them exactly
- Discuss any ambiguities or missing steps discovered
-
Introduction to Algorithm Representation (10 minutes)
- Explain different ways to represent algorithms:
- Natural language
- Pseudocode (code-like language without strict syntax)
- Flowcharts (visual representation with symbols)
- Demonstrate how to convert a simple algorithm between representations
- Show examples of well-written pseudocode and clear flowcharts
- Discuss when each representation might be most useful
- Explain different ways to represent algorithms:
Closing (10 minutes)
-
Group Sharing (5 minutes)
- Have 1-2 groups share their algorithms
- Class provides feedback on clarity and completeness
- Discuss challenges in creating precise algorithms
-
Exit Ticket (5 minutes)
- Students create an algorithm for a simple task (e.g., calculating the average of three numbers)
- Represent the algorithm using both pseudocode and a flowchart
- Submit before leaving class
Assessment
- Formative: Quality of group algorithms and participation in discussions
- Exit Ticket: Accuracy and clarity of individual algorithm representations
Differentiation
For Advanced Students
- Create algorithms for more complex tasks
- Identify potential edge cases or exceptions in algorithms
- Compare multiple solutions to the same problem
For Struggling Students
- Provide algorithm templates or starting points
- Offer more structured tasks with clearer steps
- Use visual aids to support algorithm development
Homework/Extension
- Find an example of an algorithm used in the real world and describe it
- Create an algorithm for a morning routine or other personal process
- Research the history of algorithms and identify a significant historical algorithm
Teacher Notes
- Emphasize that algorithms are not just for computers but are a way of thinking about problem-solving
- Watch for overly vague steps in student algorithms and encourage specificity
- Make connections to how algorithms will be implemented in code in future lessons
- Consider collecting examples of student-created algorithms to use as examples/non-examples in future classes
- Remind students that the ability to represent algorithms without code is an important skill for the AP exam