U3L2 The Need For Algorithms

Slides:



Advertisements
Similar presentations
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Advertisements

Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
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!
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
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.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
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.
Introduction to computer software. Programming the computer Program, is a sequence of instructions, written to perform a specified task on a computer.
Encryption with Keys and Passwords
How Do You Make a Program Wait?
AP Computer Science Principals Course Importance and Overview
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
Presentation On Computer programming
Introduction: Computer programming
Vocabulary Big Data - “Big data is a broad term for datasets so large or complex that traditional data processing applications are inadequate.” Moore’s.
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.
AP Computer Science Principles
Unit 3: Lesson 1 - The Need for Programming Languages
Vocabulary byte - The technical term for 8 bits of data.
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
AP Computer Science Principals Course Importance and Overview
Vocabulary Algorithm - A precise sequence of instructions for processes that can be executed by a computer.
By Dr. Abdulrahman H. Altalhi
Foundations of Programming: Introduction to Programming
Computer Programming.
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
Computational Thinking for KS3
4. Computational Problem Solving
Algorithms and Problem Solving
Software Development Process
Unit 3 lesson 2-5 The Need For Algorithms- Creativity in Algorithms – Simple Commands - Functions Day 18.
AP Computer Science Principals Course Importance and Overview
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
Basic Concepts of Algorithm
This Lecture Substitution model
Type Topic in here! Created by Educational Technology Network
U3L8 Creating Functions with Parameters
U3L4 Using Simple Commands
Presentation transcript:

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"

U3L2 Vocabulary Algorithm - A precise sequence of instructions for processes that can be executed by a computer High Level Programming Language - A programming language with many commands and features designed to make common tasks easier to program. Any high level functionality is encapsulated as combinations of low level commands. Low Level Programming Language - A programming language that captures only the most primitive operations available to a machine. Anything that a computer can do can be represented with combinations of low level commands.

U3L2 Content: Why the Human Machine Language? This language bears a strong resemblance to so-called "low level" programming languages - 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. The most commonly known low level language is called Assembly Language 

Step 1: Discover common instructions We 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 we 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.

Recall the lessons learned about language (Day2) 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.

U3L2 Content (Day2)- 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 (Day2) 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(Day2) 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?”

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”

U3L2: 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?”