2 - 3
# Algorithms: Basics

**Revision Date:** Jul 23, 2015
(Version 1.2)

**Duration:** 1 50-minute session

0b10 - 0b11

Unit 2. Developing Programming Tools

**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**

- Getting Started (5 min)
- Activities (40 min)
- Wrap-Up (5 min)

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

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

- 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

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

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

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

- 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?

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.

- 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.

- 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).

- 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.

- Review concept of "algorithm"
- Homework: Assign students to write pseudocode for selected algebraic computations.

"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.

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".

- 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.
- 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.

- 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.

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.