## Lesson Summary

Summary

This is the first day of a two-session lesson sequence with topics covered by mini-lectures, explorations, and practice exercises.

Outcomes

• Students will be able to answer the question, "What is an algorithm?"
• Students will explore algorithms described in English
• Students will understand Magic Square construction and parallel algorithms

Overview

1. Getting Started (5 min)
2. Activities (40 min)
3. Wrap-Up (5 min)

## CSP Objectives

Big Idea - Abstraction
• EU 2.2 - Multiple levels of abstraction are used to write programs or create other computational artifacts.
• LO 2.2.1 - Develop an abstraction when writing a program or creating other computational artifacts. [P2]
• EK 2.2.1A - The process of developing an abstraction involves removing detail and generalizing functionality.
• EK 2.2.1B - An abstraction extracts common features from specific examples in order to generalize concepts.
• EK 2.2.1C - An abstraction generalizes functionality with input parameters that allow software reuse.
Big Idea - Algorithms
• EU 4.1 - Algorithms are precise sequences of instructions for processes that can be executed by a computer and are implemented using programming languages.
• LO 4.1.1 - Develop an algorithm for implementation in a program. [P2]
• EK 4.1.1A - Sequencing, selection, and iteration are building blocks of algorithms.
• EK 4.1.1B - Sequencing is the application of each step of an algorithm in the order in which the statements are given.
• EK 4.1.1H - Different algorithms can be developed to solve the same problem.
• LO 4.1.2 - Express an algorithm in a language. [P5]
• EK 4.1.2A - Languages for algorithms include natural language, pseudocode, and visual and textual programming languages.
• EK 4.1.2B - Natural language and pseudocode describe algorithms so that humans can understand them.
• EK 4.1.2C - Algorithms described in programming languages can be executed on a computer.
• EK 4.1.2G - Every algorithm can be constructed using only sequencing, selection, and iteration.
• EK 4.1.2I - Clarity and readability are important considerations when expressing an algorithm in a language.
Big Idea - Programming
• EU 5.2 - People write programs to execute algorithms.
• LO 5.2.1 - Explain how programs implement algorithms. [P3]
• EK 5.2.1H - A process may execute on one or several CPUs.

## Math Common Core Practice:

• MP1: Make sense of problems and persevere in solving them.
• MP2: Reason abstractly and quantitatively.
• MP7: Look for and make use of structure.

## Common Core Math:

• A-SSE.1-2: Interpret the structure of expressions
• A-SSE.3-4: Write expressions in equivalent forms to solve problems

## Common Core ELA:

• RST 12.3 - Precisely follow a complex multistep procedure
• RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
• WHST 12.4 - Produce clear and coherent writing in which the development, organization, and style are appropriate to task, purpose, and audience

## NGSS Practices:

• 2. Developing and using models
• 5. Using mathematics and computational thinking
• 6. Constructing explanations (for science) and designing solutions (engineering)

## Key Concepts

Students will provide a definition of "algorithm".

Students will identify the characteristics of describing algorithms in English, pseudocode, or a programming language.

Students will demonstrate an understanding that there are different algorithms for different situations, such as parallel processing for multiple CPUs.

## Essential Questions

• How are vastly different kinds of data, physical phenomena, and mathematical concepts represented on a computer?
• How are algorithms implemented and executed on computers and computational devices?

## Teacher Resources

Student computer usage for this lesson is: none

PowerPoint Slides for mini-lectures (AlgorithmsPseudocode1.pptx in the Lesson Resources folder)

Excel sheet summary for creating a 4-by-4 Magic Square (MagicSquare4by4.xls in the Lesson Resources folder)

(optional) 16 papers, each with a number from 1-16 on it for students to use when acting out the magic square.

# Getting Started (5 min)

• Journal Entry Review

–Small group, then large group, review of two previous homework assignments (students were assigned to use two sources to find definitions of "algorithm" and were assigned to write down the steps involved in a daily task – creating a peanut butter and jelly sandwich; getting to school; brushing teeth; completing homework; etc…) The definitions, sources, and algorithm steps were to have been entered into their journal.

- Have students consider solving problems alone or with others. Point out that some computers have more than one processor and an algorithm can be written to do 2 or more processes in parallel. Consider some complications that might arise in the simple algorithms that have been developed by students if there were multiple CPUs.

# Activities (40 min)

• Guided Activity 1

– Act out selected homework “steps of a daily task” to highlight the potential ambiguity of English instructions.

• Mini-lecture 1

– Review Understanding by Design (UBD)-style slide for “Algorithms and Pseudocode: Need to Understand / Important to Know or Do / Worth Being Familiar With” (slide 2 of AlgorithmsPseudocode1.pptx presentation in Lesson Resources folder).

• Guided Activity 2

– Class creates a 4-by-4 Magic Square, as described in MagicSquare4by4.xls in Lesson Resources folder. Sixteen students should be chosen to represent the sixteen numbers, and physically move into the 16 spaces following the algorithm in this document.  (This provides an example of a “simple” algorithm that solves a more complex problem; it also gets the students out of their seats and moving around).

Reflect: Would it be easier or harder for 2 people to work on this together? (multiple CPUs or parallel processing)

• Mini-lecture 2

–In AlgorithmsPseudocode1.pptx (presentation in Lesson Resources folder), walk through “Main Ideas”; “Representing Algorithms”; and “Sequential Algorithms” slides, including pseudocode circle example.

# Wrap Up (5 min)

• Review concept of "algorithm"
• Review concept of multiprocessor algorithms that use parallel processing.
• Homework: Assign students to write pseudocode for selected algebraic computations.

## Options for Differentiated Instruction

"In your words" pair/share as the concept of what an algorithm is (and what is not an algorithm -- e.g. "sort the numbers") is developed.

Class-wide development of the graphical organizer should be facilitated with scaffolding to support students who are having difficulty with the concept.

## Formative Assessment

The following "Checks for Understanding" could be used to guide the students towards the two learning objectives.

Objective: Students will be expected to learn to provide a definition of "algorithm".

1. Example/Non-Example:  As the class develops a consensus definition of "algorithm," a list of daily living tasks and technical tasks will be discussed to see if their description can match the definition.
2. Exit Ticket:  As students leave the room they will hand the teacher a definition of "algorithm", in their own words, plus an example.  The teacher will use these to guide the next day's instruction.

Objective:  Students will learn to identify the characteristics of describing algorithms in English, pseudocode, or in a programming language.

1. Graphic Organizer:  As the characteristics of English, pseudocode, and a programming language are compared and contrasted, a table will be created on the board that captures the dimensions of what the students discuss.  The students will score the result as to how well it helps their understanding of the concept.  When it is "very good," we will capture it for their use.

## Summative Assessment

Students will research formal definitions of algorithms.  These will be entered into their journals and pair-shared with a peer.

Students will write out the sequence of steps in one or more daily living tasks, such as "brushing their teeth" or "building a peanut butter and jelly sandwich."  These will be entered into their jourmals and pair-shared with a peer.  Selected solutions will be "acted out" in the classroom.