5.8. Analyzing Algorithms

This lesson has students compare the efficiencies of searching and sorting algorithms. Students need to reason about the algorithms and evaluate the experimental data to evaluate their efficiency.

CSP Framework
Big Idea 3: Algorithms and Programming (AAP)
Enduring Understanding AAP-2: The way statements are sequenced and combined in a program determines the computed result. Programs incorporate iteration and selection constructs to represent repetition and make decisions to handle varied input values.
Learning Objective AAP-2.B: Represent a step-by-step algorithmic process using sequential code statements.
Enduring Understanding AAP-4: There exist problems that computers cannot solve, and even when a computer can solve a problem, it may not be able to do so in a reasonable amount of time.
Learning Objective AAP-4.A.a: For determining the efficiency of an algorithm: a. Explain the difference between algorithms that run in reasonable time and those that do not.
Learning Objective AAP-4.A.b: For determining the efficiency of an algorithm: b. Identify situations where a heuristic solution may be more appropriate.

Professional Development

The Student Lesson: Complete the activities for Mobile CSP Unit 5: Lesson 5.7 Analyzing Algorithms.

Materials

5.8.1. Learning Activities

Estimated Length: 90 minutes

  • Hook/Motivation (5 minutes): Have students hypothesize about which sort and search algorithms are the fastest. Have them explain their reasoning. (They should identify radix/bucket sort and binary search of the ones covered.) Explanation: we reason about algorithms (formally/mathematically - analytically and experimenting - empirically) to determine their efficiences
  • Experiences and Explorations (75 minutes):
    • Lecture - Analyzing Search: Give the presentation about analyzing search algorithms (or show the video).
    • Activity - Search Experiment: Have students complete the search experiment, recording results and then plotting them on graph paper or the given spreadsheet. Emphasize that this is a worst-case analysis.
    • Lecture - Analyzing Sort: Give the presentation about analyzing sort algorithms (or show the video).
    • Activity - Sort Experiment: Have students complete the sort experiment, recording results and then plotting them on graph paper or the given spreadsheet. Emphasize that this is a worst-case analysis.
  • Rethink, Reflect and/or Revise (10 minutes): Have students share the results of their experiments and complete their portfolio reflections

5.8.2. Professional Development Reflection

Discuss the following questions with other teachers in your professional development program.

  • How does this lesson encourage students to think analytically and empirically about algorithms?
    I am confident I can teach this lesson to my students.
  • 1. Strongly Agree
  • 2. Agree
  • 3. Neutral
  • 4. Disagree
  • 5. Strongly Disagree

Before you keep reading...

Runestone Academy can only continue if we get support from individuals like you. As a student you are well aware of the high cost of textbooks. Our mission is to provide great books to you for free, but we ask that you consider a $10 donation, more if you can or less if $10 is a burden.