Algorithms
This lesson explains what algorithms are and how they work in relation to computer science. It breaks the concept down to make it easier to understand.
OVERVIEW
Activity Overview:
This lesson explains what algorithms are and how they work in relation to computer science. It breaks the concept down to make it easier to understand.
Meta description
- Subject Area: Computer Science, Mathematics, Technology, Engineering
- Grade Level : 6-8
- Computer Science Domains:
- Algorithms and Programming
- Computer Science Principles:
- Fostering an Inclusive Computing Culture, Collaborating Around Computing, Recognizing and Defining Computational Problems, Developing and Using Abstractions, Creating Computational Artifacts, Communicating About Computing
- Materials:
- Website
- Considerations:
- Not really
Lesson Plan
Overview
This lesson explains what algorithms are and how they work in relation to computer science. It breaks the concept down to make it easier to understand.
ASSESSMENT PRE/POST-TEST
What is an algorithm Can Making a grilled cheese sandwich use an algorithm? Do algorithms solve problems more or less efficiently ?
OBJECTIVES
Students will be able to create a simple algorithm to solve a problem Students will be able to understand and define what an algorithm is Students will be able to identify 3 different types of computer algorithms
CATCH/HOOK
Play Numbers Guessing Game
The computer is going to randomly select an integer from 1 to 16. You’ll keep guessing
numbers until you find the computer’s number, and the computer will tell you each time if
your guess was too high or too low:
https://www.khanacademy.org/computing/computer-science/algorithms
Use Google Maps to find a route from Casper, Wy to Dallas Texas
Solve a maze to get from Start to Finish
ACTIVITY INSTRUCTIONS
Define Algorithm: a procedure or formula for solving a problem, based on conducting a sequence of specified actions.. Algorithms can perform calculation, data processing and automated reasoning tasks.
Watch video on Algorithms: https://youtu.be/CvSOaYi89B4 https://youtu.be/rL8X2mlNHPM
Work through website on Algorithms https://www.khanacademy.org/computing/computer-science/algorithms
Discuss algorithms in a “lay” analogy Let’s say that you have a friend arriving at the airport, and your friend needs to get from the airport to your house. Here are four different algorithms that you might give your friend for getting to your home: The taxi algorithm: Go to the taxi stand. Get in a taxi. Give the driver my address. The call-me algorithm: When your plane arrives, call my cell phone. Meet me outside baggage claim. The rent-a-car algorithm: Take the shuttle to the rental car place. Rent a car. Follow the directions to get to my house. The bus algorithm: Outside baggage claim, catch bus number 70. Transfer to bus 14 on Main Street. Get off on Elm street. Walk two blocks north to my house. All four of these algorithms accomplish exactly the same goal, but each algorithm does it in completely different way. Each algorithm also has a different cost and a different travel time. Taking a taxi, for example, is probably the fastest way, but also the most expensive. Taking the bus is definitely less expensive, but a whole lot slower. You choose the algorithm based on the circumstances. https://computer.howstuffworks.com/what-is-a-computer-algorithm.htm Discuss types of computer algorithms: In computer programming, there are often many different ways – algorithms – to accomplish any given task. Each algorithm has advantages and disadvantages in different situations. Sorting is one place where a lot of research has been done, because computers spend a lot of time sorting lists. Here are five different algorithms that are used in sorting: Bin sort Merge sort Bubble sort Shell sort Quicksort If you have a million integer values between 1 and 10 and you need to sort them, the bin sort is the right algorithm to use. If you have a million book titles, the quicksort might be the best algorithm. By knowing the strengths and weaknesses of the different algorithms, you pick the best one for the task at hand.
Students will write an algorithm to solve a problem ** See folder with exercises
Supplements
Any items in this section are the property & under the license of their respective owners.
REVIEW
Formative: Creating an algorithm example and writing a computer algorithm Summative: Quizlet covering algorithms
STANDARDS
| Type | Listing |
|---|---|
| CS Domains | Algorithms and Programming |
| CS Principles | Fostering an Inclusive Computing Culture, Collaborating Around Computing, Recognizing and Defining Computational Problems, Developing and Using Abstractions, Creating Computational Artifacts, Communicating About Computing |
| Other Content Standards |