Vocabulary Algorithm - A precise sequence of instructions for processes that can be executed by a computer.

Slides:



Advertisements
Similar presentations
Md. Ahsan Arif, Assistant Professor, Dept. of CSE, AUB
Advertisements

Algorithms and Problem Solving-1 Algorithms and Problem Solving.
9-Aug-15 Vocabulary. Programming Vocabulary Watch closely, you might even want to take some notes. There’s a short quiz at the end of this presentation!
COMPUTING IN THE NATIONAL CURRICULUM. WHY?  The 2014 national curriculum introduces a new subject, computing, which replaces ICT. This represents continuity.
“The study of algorithms is the cornerstone of computer science.” Algorithms Fall 2011.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
CS221 Algorithm Basics. What is an algorithm? An algorithm is a list of instructions that transform input information into a desired output. Each instruction.
8.1 8 Algorithms Foundations of Computer Science  Cengage Learning.
Software Engineering Algorithms, Compilers, & Lifecycle.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Encryption with Keys and Passwords
How Do You Make a Program Wait?
AP CSP: Making Visualizations & Discovering a Data Story
AP CSP: Creating Functions & Top-Down Design
The Need for Algorithms
Creativity of Algorithms & Simple JavaScript Commands
JavaScript/ App Lab Programming:
Vocabulary byte - The technical term for 8 bits of data.
AP CSP: Cleaning Data & Creating Summary Tables
Algorithms and Problem Solving
Introduction: Computer programming
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
AP CSP: The Need for Programming Languages and Algorithms
Vocabulary Algorithm - A precise sequence of instructions for processes that can be executed by a computer Low level programming language: A programming.
Topic: Programming Languages and their Evolution + Intro to Scratch
AP Computer Science Principles
Unit 3: Lesson 1 - The Need for Programming Languages
Vocabulary byte - The technical term for 8 bits of data.
A mini-lesson brought to you by Sheon
IGCSE 6 Cambridge Effectiveness of algorithms Computer Science
GC211Data Structure Lecture2 Sara Alhajjam.
Unit 3 lesson 2&3 The Need For Algorithms- Creativity in Algorithms
Creativity in Algorithms
Lesson 5-15 AP Computer Science Principles
UNIT 3 – LESSON 5 Creating Functions.
The Binary Number System
The Need for Programming Languages
The Need for Algorithms 2 days
Looping and Random Numbers
By Dr. Abdulrahman H. Altalhi
Foundations of Programming: Introduction to Programming
Computer Programming.
Decomposition.
A mini-lesson brought to you by Sheon
What is a computer program?
Creativity in Algorithms
Lesson 2 Programming constructs – Algorithms – Scratch – Variables Intro.
Algorithms September 28, 2017.
Algorithm An algorithm is a finite set of steps required to solve a problem. An algorithm must have following properties: Input: An algorithm must have.
Fundamentals of Programming
Lesson 15: Processing Arrays
UNIT 3 CHAPTER 1 LESSON 4 Using Simple Commands.
Theory of Computation Turing Machines.
HAPPY NEW YEAR! Lesson 7: If-statements unplugged
This Lecture Substitution model
Algorithms and Problem Solving
Software Development Process
Unit 3 lesson 2-5 The Need For Algorithms- Creativity in Algorithms – Simple Commands - Functions Day 18.
U3L1 The Need For Programming
Unit 3: Lesson 1 - The Need for Programming Languages
Vocabulary Algorithm - A precise sequence of instructions for processes that can be executed by a computer Low level programming language: A programming.
This Lecture Substitution model
Computational Thinking
Basic Concepts of Algorithm
This Lecture Substitution model
Type Topic in here! Created by Educational Technology Network
U3L2 The Need For Algorithms
U3L8 Creating Functions with Parameters
U3L4 Using Simple Commands
Presentation transcript:

Vocabulary Algorithm - A precise sequence of instructions for processes that can be executed by a computer

U3L2 The Need For Algorithms CS Principles U3L2 The Need For Algorithms

U3L2 The Need For Algorithms Objectives SWBAT: Trace programs written in the "Human Machine Language" Develop an algorithm to find the smallest playing card in a row of cards Express an algorithm in the "Human Machine Language" Identify the properties of sequencing, selection and iteration the "Human Machine Language" Evaluate the correctness of algorithms expressed in the "Human Machine Language"

The Purpose To connect the acts of writing “code” and designing algorithms, and to take some steps towards programming with code. To write instructions for a “Human Machine” to complete a tightly defined task with playing cards. We want to introduce the term algorithm and what designing an algorithm means in computer science (i.e. programming).

Step 1: Discover common instructions We then want to take a few steps to build up to writing an algorithm with “code”. Here are the basic steps of the lesson and their underlying purpose. When students write instructions to find the minimum card in a row of cards, we’ll discover that even though the words used might be different between groups, there is probably a lot of commonality to underlying actions we need shifting hands, picking up cards, comparing cards, jumping to a certain line in the instructions

Step 2: Agree on a minimal instruction set Recognizing these commonalities we can give names to a few commands and come to agreement about how they should be interpreted; this is the foundation for a “code”. We then provide a 5-instruction “human machine language” that is sufficient for implementing an algorithm to find the minimum card.

Step 3: Use the provided Human Machine Language “code” to implement an algorithm The art of programming is to solve computational problems using a provided language that controls the machine. We provide a simple, low-level, language for acting on playing cards. The point is to show that even when you know what the commands are, you still need to be creative to use them to solve a problem.

Why the Human Machine Language? This language bears a strong resemblance to so-called “low level” programming languages - a sparse, primitive set of commands to directly control the physical/electronic operations of a computing machine. Other programming languages are built on top of the low level languages to provide more abstraction and functionality that combines low level operations into commonly used procedures.

Recall the lessons learned about language Yesterday’s activity focused on the inherent difficulties of trying to express precise processes with written language. We arrived at a few conclusions… We need to agree on a set of commands and exactly what terms mean The fewer command we have, the easier it is to agree We want to know what are the “primitive” operations - the most basic set of operations that will allow us to do most of the tasks that the situation requires.

Vocabulary Algorithm - Algorithms are precise sequences of instructions for processes that can be executed by a computer and are implemented using programming languages.

Algorithms Language is important, but there is another part to programming. Once you have a well defined language you need to apply it to problems. The art (and science) of using a well-defined language of primitive operations to solve problems is the art and science of algorithms. The CS Principles definition of algorithm is: Algorithms are precise sequences of instructions for processes that can be executed by a computer and are implemented using programming languages. One way to think of the study of algorithms is that it is the study of processes – how can you use a small set of instructions to clearly and correctly define process that will solve some problem? Yesterday, with the LEGO blocks, you also attempted to design an algorithm. Any time you are trying to write a precise set of instructions for a process to solve a problem you are designing an algorithm. Today we’re going to get into algorithms a little more deeply.

Find the Minimum Card Algorithm Perhaps it goes without saying that in a Computer Science class we are concerned with not just any processes, but computational processes - ones that can be executed by a computer - which have specific sets of constraints. We often get started thinking about algorithms and computational processes by trying to rigorously act them out ourselves as a sort of “Human Machine”. When acting as a machine, we can keep the limitations of a computer in mind. In this activity you’re going to pretend that you are a “Human Machine” that operates on playing cards on the table.

Find the Minimum Card Algorithm Get clear on the task, rules, instructions With a partner act out an algorithm Write down the steps As you work consider the following: “How do you know when to stop?” “Do your instructions state where and how to start?” “Is it clear where to put cards back down after you’ve picked them up?”

Reflection “As we look at these algorithms you came up with, we can see they are not all the same. However, there are common things that you are all making the human machine do and commonalities in some of your instructions. Prompt: Can we define a language of common Human Machine commands for moving cards around? What are the commands or actions most of these instructions have in common?”

Commands for Algorithm SHIFT (hand) - some form of shifting hands one position down the row left or right MOVE (hand) - some form of moving a hand directly to a particular card based on its position in the list or to the position of one of the other hands. COMPARE - some way to compare cards and do something based on the result like: “if card in right hand is less than card in left hand then…” GO TO LINE - some way to jump to an earlier or later line in the program PICK CARD UP/PUT CARD DOWN - some way to do this that also makes clear where to put a card back down. Typically something like: “Put right hand card down into the right-most open space in the row of cards”