Using Algorithms Copyright © 2008 by Helene G. Kershner.

Slides:



Advertisements
Similar presentations
GCSE Computing Lesson 5.
Advertisements

Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
CHAPTER 2 GC101 Program’s algorithm 1. COMMUNICATING WITH A COMPUTER  Programming languages bridge the gap between human thought processes and computer.
Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
Chapter 1 - An Introduction to Computers and Problem Solving
PROGRAMMING Introduction To Programming Definition Types Of Programming Languages Programming Language Paradigm Translator
CS Section 600 CS Section 002 Dr. Angela Guercio Spring 2010.
Why Program? CSE111 – Great ideas in Computer Science Clearly programming fits here Programming is a Great Idea in Computer Science. It has allowed computers.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer Programming.
Lecture Notes 1/21/04 Program Design & Intro to Algorithms.
Chapter 16 Programming and Languages: Telling the Computer What to Do.
Introduction to a Programming Environment
An Introduction to Programming with C++ Fifth Edition Chapter 1 An Introduction to Programming.
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
Copyright © 2001 by Wiley. All rights reserved. Chapter 1: Introduction to Programming and Visual Basic Computer Operations What is Programming? OOED Programming.
Chapter 1 Introduction to Programming. Computer Hardware CPU Memory –Main or primary –Secondary or auxiliary Input device(s) Output device(s)
Course: Introduction to Computers
Activity 1 - WBs 5 mins Go online and spend a moment trying to find out the difference between: HIGH LEVEL programming languages and LOW LEVEL programming.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Top-Down Design and Modular Development
An Introduction to Programming with C++ Sixth Edition
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
1 2. Program Construction in Java Programming Fundamentals.
Algorithms CS139 – Aug 30, Problem Solving Your roommate, who is taking CS139, is in a panic. He is worried that he might lose his financial aid.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Basic of Programming Language Skill Area Computer System Computer Program Programming Language Programmer Translators.
Theory of Programming Languages Introduction. What is a Programming Language? John von Neumann (1940’s) –Stored program concept –CPU actions determined.
FOUNDATION IN INFORMATION TECHNOLOGY (CS-T-101) TOPIC : INFORMATION SYSTEM – SOFTWARE.
Structured Programming (4 Credits)
5.0 PROGRAMMING Duration: 10 weeks Prepared by Ong Lay Peng Copyright © 2007.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
Algorithms CS280 – 10/20/05. Announcement  Part 1 of project 2 due.  Read chapters 10, 7 for this unit  Tuesday we will also be in the classroom We.
Programming Introduction. What is a program? Computers cannot think for themselves, they can only follow instructions. A program is a set of instructions.
How to develop a program CSE 160 University of Washington 1.
WHAT IS THIS? Clue…it’s a drink SIMPLE SEQUENCE CONTROL STRUCTURE Introduction A computer is an extremely powerful, fast machine. In less than a second,
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Software. Introduction n A computer can’t do anything without a program of instructions. n A program is a set of instructions a computer carries out.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
| MSC 8102:PROGRAMMING CONCEPTS By Vincent Omwenga, PhD. 1.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Programming Languages
Algorithms and Flowcharts
Algorithms Sept 4, Tuesday’s Lab You developed an algorithm Input – an 8 ½ x 11 inch piece of paper Audience – Fellow classmates Process – Instructions.
Programming what is C++
Topic: Programming Languages and their Evolution + Intro to Scratch
Copyright © 2008 by Helene G. Kershner
1. Introduction A microprocessor executes instructions given by the user Instructions should be in a language known to the microprocessor Microprocessor.
Copyright © 2008 by Helene G. Kershner
Using Algorithms Copyright © 2008 by Helene G. Kershner.
Introduction to Computer Programming
Teaching Computing to GCSE
Unit# 8: Introduction to Computer Programming
TRANSLATORS AND IDEs Key Revision Points.
Using Algorithms Copyright © 2008 by Helene G. Kershner.
Problem Solving Techniques
Algorithm The key is the step-by-step instructions.
Karel the Robot – Making Decisions
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
The Programming Process
Programming What?! How?!.
ICT Programming Lesson 1:
Algorithm The key is the step-by-step instructions.
An Introduction to Programming with C++ Fifth Edition
Quiz: Computational Thinking
CS105 Introduction to Computer Concepts Intro to programming
WRITING AN ALGORITHM, PSEUDOCODE, AND FLOWCHART LESSON 2.
Presentation transcript:

Using Algorithms Copyright © 2008 by Helene G. Kershner

Using Algorithms Algorithm? What’s an Algorithm? An algorithm is a procedure for solving a problem. An algorithm need not be complex Recipe Directions Even heating a TV dinner has instructions So, an algorithm is a step-by-step set of instructions, that if carried out exactly, solves the problem. Copyright © 2008 by Helene G. Kershner

Algorithms Making a plan is designing an algorithm In many situations we do this unconsciously In other situations we cannot let our unconscious work on its own. Grocery shop Plan a party Write a 20 page research paper In each of the cases above what do we do first? Grab a piece of paper Make of list of tasks Copyright © 2008 by Helene G. Kershner

Algorithms A large complex task, like planning a large party, or writing a 20 page paper is unmanageable if attacked as a whole. Top-down analysis – break it down into its basic parts. This is not a computer technique, it is a life skill Let’s look at the research paper Copyright © 2008 by Helene G. Kershner

Algorithms – A Research Paper What is the topic of the paper? Every paper starts with three basic parts Introduction Paper Conclusion Tell them, tell them what you are going to tell them, tell them what you told them In 20 pages, intro should be 2-3 page, conclusion should be 3-4 pages, this leaves 14 pages to make our case. Now break down these 14 pages into smaller parts Background, current theories, future research Copyright © 2008 by Helene G. Kershner

An Algorithm Copyright © 2008 by Helene G. Kershner

An Algorithm Copyright © 2008 by Helene G. Kershner

An Algorithm Copyright © 2008 by Helene G. Kershner

An Algorithm Copyright © 2008 by Helene G. Kershner

An Algorithm Copyright © 2008 by Helene G. Kershner

An Algorithm Copyright © 2008 by Helene G. Kershner

An Algorithm Copyright © 2008 by Helene G. Kershner

Using Algorithms The key is the step-by-step instructions. A computer is a machine designed to follow specific instructions very rapidly; BUT The computer does only and exactly what it is told. Computers cannot think! Computers cannot make assumptions Copyright © 2008 by Helene G. Kershner

Algorithms An algorithm written so that it can be carried out by a computer is called a program. To be understood by a computer, the program or algorithm must be written in a programming language. Copyright © 2008 by Helene G. Kershner

Algorithms – Problem Solving Steps People naturally think at a level of abstraction far too complex for even the most abstract and futuristic computer. Get simple, get “stupid”, make NO assumptions. 1. Define the problem 2. Define the output 3. Define the input 4. Define the initial algorithm 5. Refine the algorithm 6. Define the program Copyright © 2008 by Helene G. Kershner

Algorithms There are three large classes of programming languages: Machine Language Code used to communicate with a particular computer Instructions are coded as groups of 1’s and 0’s Can be thought of as the computer’s “native” language Language is machine-dependent, each type of computer has its own code Every statement in machine language contains an instruction and the data or the location of the data that the instruction will use. Very difficult for humans to use Copyright © 2008 by Helene G. Kershner

Algorithms Assembly Language: Instead of long series of 1’s and 0’s uses abbreviations of mnemonics Ex. SUB for subtract, CLR for clear, or MOV for move Data is represented directly as numeric quantities or variables. Compared to machine language, much easier for people to use and understand Machine dependent, different computers require different assembly languages Must be translated into machine language for the computer to understand program Copyright © 2008 by Helene G. Kershner

Algorithms High Level Language: Structure more like natural language (Ex. English) with a limited set of rules Must be translated into machine language for the computer to understand program One statement may translate into many machine language statements Largely machine independent Easier to use by people Copyright © 2008 by Helene G. Kershner