ECT Lesson Plan: Ciphering a Sentence

Lesson plan at a glance...

 Core subject(s) Computer Science Subject area(s) Algorithms and Complexity Suggested age 8 to 12 years old Prerequisites None Time Preparation: 5 to 10 minutes Instruction: 75 minutes Standards Core Subject: CCSS Math, CCSS ELA CS: CSTA, UK, Australia

In this lesson plan…

# Lesson Overview

A cipher is a message that has been written in such a way (encoded) that it is unreadable by others. In this lesson, students will use mapping to encode a sentence. Students who have ever played “Hangman” or watched Wheel of Fortune may find that those experiences help in this exercise. Students will work with a partner to create an algorithm that describes the encryption process. They will also examine encoded and decoded messages to recognize patterns to help decode messages and develop strategies to decompose the problem.

# Materials and Equipment

• For the student:
• Required: Journal
• Internet-connected computer (one (1) computer per student recommended)
• If not using a computer-based collaboration tool
• Markers/Whiteboard or Paper and Pen/Pencil

 If students are using computers, confirm that all students’ computers are turned on, logged-in, and connected to the Internet 5 to 10 minutes

# The Lesson

 Warm-up Activity: Forming a strategy 10 minutes Activity 1: Create the alphabet mapping 25 minutes Activity 2: Encode sentences 20 minutes Wrap-up Activity: Analysis and reflection 20 minutes

## Warm-up Activity: Forming a strategy (10 minutes)

Activity Overview: In this activity, students will think about strategies for sending messages that are guaranteed to be private.

 Activity: Choose one of the following student activities to start the lesson. Each warm-up activity is designed to prepare your students for the lesson. Have students answer the following question in either of the ways described below: Pretend for that you want to send a private message to a friend. The only way you can deliver the message is to write it on a board that is observable by anyone who passes by. What could you and your friend do to ensure that you are the only people who can understand the message? Journaling: Students respond to the question in their journal. Think-Pair Share: Instruct students to think for one minute about how they might accomplish the task. Then pair students to discuss their ideas and to agree by consensus on a strategy that would work. After 2 or 3 minutes, invite students to share their ideas in a large group discussion.

## Activity 1: Create the alphabet mapping (25 minutes)

Activity Overview: In this activity, students write rules for mapping and reordering the alphabet for encoding messages to create an algorithmic cipher.

Activity:

Use the rules below to create ciphers.

Create two rules for mapping the alphabet.

 Sample rules: The characters are divided into two groups: (1) characters for which the image of their uppercase form has an enclosed area (such as P or O) and (2) characters that do not have an enclosed area in in the image of their uppercase form (such as I or Z). Sort the two groups alphabetically, with group 1 first and then group 2.

Apply the rules.

 Applying rule 1: Group 1:  {A, B, D, O, P, Q, R}            Group 2: {C, E, F, G, H, I, J, K, L, M, N, S, T, U, V, W, X, Y, Z} Applying rule 2: A, B, D, O, P, Q, R, C, E, F, G, H, I, J, K, L, M, N, S, T, U, V, W, X, Y, Z

Place the letter sequence that resulted from Rule 2 in the second row of the following table beneath the number 1 to 26 (example completed below).

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

This table shows a one-to-one alphabet mapping (matching one letter with one number), Alphabet Mapping #1.

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 A B D O P Q R C E F G H I J K L M N S T U V W X Y Z

Now, invent a third rule and apply it to the above mapping to come up with another one-to-one alphabet mapping table. A third rule could be to place the even-number-mapped letters in alphabetical order followed by the odd-number-mapped letters in alphabetical order. Let’s call that Alphabet Mapping #2.

 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 2 2 3 2 4 2 5 2 6 B O Q C F H J L N T V X Z A D P R E G I K M S U W Y

 Teaching Tips: With older or more advanced groups, present the above steps to the class as an example in a large group before breaking students into pairs to create their own alphabet mappings.

## Activity 2: Encode sentences (20 minutes)

Activity Overview: In this activity, students will use the algorithm mappings from Activity 1 to encode sentences.

Activity:

Divide students in groups of two and tell them the following:

• Think of a simple message you would like to send to your partner.
1. Encode it three times: first use just Alphabet Mapping #1, then use just Alphabet Mapping #2, and then use both mappings from the previous activity.
 For example, if the sentence is: We drove to the gym. Using the Alphabet Mapping #1, we find each letter of the sentence in the second row of the table created in Activity 1. We replace the letter with the corresponding number in the first row. Please note that one must place letter breaks (the character “_”) and separate each word by a blank space. In this example, the encoded sentence is: 23_9 3_7_4_22_9 20_4     20_12_9    11_25_17

 Teaching Tips: If students created their own mappings in the previous activity, have them use those mappings in this activity.

## Wrap-up Activity: Analysis and reflection (20 minutes)

Activity Overview: In this activity, students will decompose their own ciphers, how ciphers might be represented with a computer program, and some of the issues in breaking and designing ciphers (recognizing patterns).

 Activity: Tell students to discuss and record answers to the following questions in their journals with their partners. Which Alphabet Mapping (1 or 2) is easier to use to encode a message? Are the rules used for Alphabet Mapping #1 clear and easy to understand?  How could you improve the rules? Is your new rule for Alphabet Mapping #2 clear and easy to understand? How could you improve your rule? How would you implement your cipher in a computer program?  Could you break down the problem and write the sequence of steps (an algorithm) that describes the process?   Imagine that another person gives you an encoded message and you do not know the mapping tables. How would you go about deciphering or decoding the sentences?  What patterns would you look for to help you discover the one-to-one mapping? If someone wants to come up with a cipher that is very difficult to for others to decode, what are some of the strategies that he or she should consider to break down the problem (decomposition)?

 Assessment: Collect students’ reflections. Assess for thoughtful, complete responses.

# Learning Objectives and Standards

 Learning Objectives Standards LO1: Students will be able to analyze a problem and suggest possible solutions. Computer Science CSTA L1:6.CT.6: Understand the connections between computer science and other fields. CCSS.MATH.PRACTICE.MP1: Make sense of problems and persevere in solving them. LO2: Students will be able to create an encoding scheme that is usable and reversible. Computer Science CSTA L1:6.CT.6 LO3: Students will be able to encode and decode simple messages. Computer Science CSTA L1:6.CT.6 Common Core CCSS.ELA-LITERACY.RF.3.3/4.3/5.3 Know and apply grade-level phonics and word analysis skills in decoding words. CCSS.ELA-LITERACY.RF.3.3A/4.3A/5.3.A Use combined knowledge of all letter-sound correspondences, syllabication patterns, and morphology (e.g., roots and affixes) to read accurately unfamiliar multisyllabic words in context and out of context. LO4: Students will be able to verbalize a plan (an algorithm) for the encoding process. Computer Science CSTA L1:6.CT.1: Understand and use the basic steps in algorithmic problem-solving (e.g., problem statement and exploration, examination of sample instances, design, implementation and testing). UK 2.3: Use logical reasoning to explain how some simple algorithms work and to detect and correct errors in algorithms and programs. Common Core CCSS.ELA-LITERACY.SL.3.4/4.4/5.4/6.4/7.4 Report on a topic or text, tell a story, or recount an experience with appropriate facts and relevant, descriptive details, speaking clearly at an understandable pace. Or present claims and findings, emphasizing salient points in a focused, coherent manner with pertinent descriptions, facts, details, and examples; use appropriate eye contact, adequate volume, and clear pronunciation. LO5: Students will be able to identify language patterns that would be useful in decrypting coded messages. Computer Science AUSTRALIA 4.4 (Creating digital solutions by): Define simple problems, and describe and follow a sequence of steps and decisions (algorithms) needed to solve them. CSTA L1:6.CT.2: Develop a simple understanding of an algorithm (e.g., search, sequence of events or sorting) using computer-free exercises Common Core CCSS.ELA-LITERACY.RF.3.3/4.3/5.3 Know and apply grade-level phonics and word analysis skills in decoding words. CCSS.ELA-LITERACY.RF.3.3A/4.3A/5.3.A Use combined knowledge of all letter-sound correspondences, syllabication patterns, and morphology (e.g., roots and affixes) to read accurately unfamiliar multisyllabic words in context and out of context. Common Core CCSS.MATH.PRACTICE.MP7: Look for and make use of structure.

## Lesson Vocabulary

 Term Definition For Additional Information Encryption The process of encoding messages or information in such a way that only authorized parties can read it http://en.wikipedia.org/wiki/Encryption Decryption The process of decoding messages or information in such a way that only authorized parties can read it http://en.wikipedia.org/wiki/Encryption Cipher An encoded/encrypted message http://en.wikipedia.org/wiki/Cipher Algorithm A step-by-step set of operations performed to solve a problem http://en.wikipedia.org/wiki/Algorithm

## Computational Thinking Concepts

 Concept Definition Algorithm Design Creating an ordered series of instructions for solving similar problems Pattern Recognition Observing patterns and regularities in data Decomposition Breaking down data, processes or problems into smaller, manageable parts

Non-profit Tax ID # 203478467