Algorithms 1 (Lecture 2 of CSE1301)

Slides:



Advertisements
Similar presentations
1 Objectives By the end of this lecture, students should: understand what an algorithms is appreciate the role of algorithm definitions in the problem.
Advertisements

Intro to Computer Programming Algorithms Lecture # 01 01/21/05
Overview of Programming and Problem Solving ROBERT REAVES.
Slides modified by Erin Chambers Problem Solving and Algorithm Design.
Algorithm –History Muhammad ibn Musa Al-Khwarizmi www -groups.dcs.st-andrews.ac.uk/~history/Mathematicians/Al- Khwarizmi.html Book on arithmetic:
Algorithms & Complexity
1 CSE1301 Computer Programming Lecture 3: Introduction to Algorithms.
Computer Programming Lecture 23. Summary of Previous Lecture In the previous lecture, we have learnt  Intellectual Property Types of Intellectual Property.
1 CSE1301 Computer Programming Lecture 2: Introduction to Algorithms.
1 Lecture 1: Course Overview Course: CSE 360 Instructor: Dr. Eric Torng TA: Huamin Chen.
This set of slides is provided by the author of the textbook1 Introductory Topics l Computer Programming l Programming Life-Cycle Phases l Creating an.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Lecture Notes 1/21/04 Program Design & Intro to Algorithms.
1 CSE1301 Computer Programming Lecture 2: Introduction to Algorithms.
1 Chapter 8 Designing Small Programs. 2 A ‘Procedure’ v A set of instructions which describe the steps to be followed in order to carry out an activity.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
1 TEL 104 / MKK Fundamental Programming: Lecture 2 Computer Systems Overview & Introduction to Algorithm.
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
Foundations of Problem Solving chapter 2 Dr Lahen Ouarbya.
1 Introduction to Computing Lecture 02: Introduction to Algorithms Dr. Bekir KARLIK Yasar University Department of Computer Engineering
Nattee Niparnan Dept. of Computer Engineering, Chulalongkorn University.
Introduction CSE 1310 – Introduction to Computers and Programming
Problem Solving Methods. CSCE 1062 Outline Problem Solving Methods Problem solving steps The analytical method The algorithmic method The software engineering.
Algorithm Design by Éva Tardos and Jon Kleinberg Slides by Kevin Wayne Copyright © 2004 Addison Wesley COS 423: Theory of Algorithms Kevin Wayne Princeton.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Computer Programming TCP1224 Chapter 3 Completing the Problem-Solving Process and Getting Started with C++
1 CSE Computer Programming “Using C-Language” Lectures 1.
1 BBG2 Algorithms Components of an Algorithm Instructor: M.Fatih AMASYALI
Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
1 CSE1301 Computer Programming Lecture 3: Components of an Algorithm.
Al-Khwarizmi 2 (Lecture 3 of CSE1301) Dr Damian Conway Room 132, Building 26 (Consult hours on the door)
Procedural Text A mini-lesson brought to you by Sheon.
Lecture 11: 10/1/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
1 CS161 Introduction to Computer Science Topic #9.
12/4/20151 Introduction To Computer Science Bina Ramamurthy.
1 CSE1301 Computer Programming Lecture 3: Components of an Algorithm.
… Computer Science Inside… Algorithm Development.
CSC 1051 M.A. Papalaskari, Villanova University Algorithms Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website:
CS001 Introduction to Programming Day 2 Sujana Jyothi
1 CSE1301 Computer Programming Lecture 4: Components of an Algorithm.
Chapter 7 What Can Computers Do For Me?. How important is the material in this chapter to understanding how a computer works? 4.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
Chapter 8 Systems of Linear Equations in Two Variables Section 8.3.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
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.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages.
Introduction to Problem Solving Programming is a problem solving activity. When you write a program, you are actually writing an instruction for the computer.
Comp1004: Programming in Java II Computational Thinking.
Introduction to Programming By: Prof. Muhammad Abu Baker Siddique 2 nd Lecture 1.
A mini-lesson brought to you by Sheon
ITEC113 Algorithms and Programming Techniques
Computer Programming Methodology Instructions thru hardware
DCP2073 Asas Pengaturcaraan C Lecture 3: Components of an Algorithm
ALGORITHMS CSC 171 LECTURE 1.
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
CSE1301 Computer Programming Lecture 2: Introduction to Algorithms
A mini-lesson brought to you by Sheon
Algorithms Chapter 3 With Question/Answer Animations
Comp1202: Building Better Programs
Programming We have seen various examples of programming languages
ICT Gaming Lesson 2.
Algorithms Algorithm. [webster.com] A procedure for solving a mathematical problem (as of finding the greatest common divisor) in a finite number of steps.
Algorithm: Word comes from Arabic Author Abū ‘Abdallāh Muḥammad ibn Mūsā al-Khwārizmī Algorism Algebra: Kitab al-Mukhtasar fi Hisab al-Jabr wal-Muqabala.
Chapter 2 – part a Brent M. Dingle Texas A&M University
5A-5B Number Sequences, 5C Arithmetic Sequences
Design and Analysis of Algorithms
Welcome to the most Amazing course there is 
Presentation transcript:

Algorithms 1 (Lecture 2 of CSE1301) Dr Damian Conway Room 132, Building 26 (Consult hours on the door)

Notice Thursday 9am-12pm prac in G13 has been moved to 10am-1pm in the same room. ALLOCATE+ will continue to show 9am, but it actually starts at 10am. If you need to be in the prac (e.g. Sci/Eng students), allocate yourself into the 9am G13 prac, but turn up at 10am.

Topics Solving problems Algorithms Values and variables

The Problem-solving Process How do we solve problems? We "just do". Guesswork-and-luck Trial-and-error Experience (possibly someone else's) "Scientifically"

The Problem-solving Process "Doctor, my head hurts" Analysis Patient has elevated pressure in anterior parietal lobe. Problem specification Design 1. Sterilize cranial saw 2. Anaesthetize patient 3. Remove top of skull 4. Get the big spoon... 5. etc., etc. Algorithm Implementation sterilize(saw, alcohol); raise_hammer(); lower hammer(fast); start(saw); /* etc. etc. */ Program Compilation 010011101011001010101010100101010101010011001010101010100101101001110101010101001001011101001111010101011111010101000110100001101... Executable (solution)

Algorithm A set of instructions specifying the steps required to accomplish some task

Algorithm Named after: Muhammad ibn Musa al-Khwarizmi circa 160-230 AH (780-850 CE) Wrote books on arithmetic (especially decimal numbers) and algebra

Algorithm Named after: Muhammad ibn Musa al-Khwarizmi

Algorithm Examples: A cooking recipe Assembly instructions for a model The rules of how to play a game VCR instructions Description of a martial arts technique Directions for driving from A to B A knitting pattern A car repair manual

Algorithm Examples: A cooking recipe Assembly instructions for a model The rules of how to play a game VCR instructions Description of a martial arts technique Directions for driving from A to B A knitting pattern A car repair manual

Algorithm Examples: Arroz con pollo Almond and honey slice

Components of an algorithm Variables and values Instructions Sequences Procedures Selections Repetitions

Values Represent quantities, amounts, or measurements May be numerical or alphabetic (or other more mysterious things) Often has a unit related to their purpose Examples: Recipe ingredients Hardware requirements

Variables Are containers for values Places to store values when we're not using them. May be restricted to containing a specific type of value (i.e. only stores integers) Examples: Little black book Cricket team

Reading Deitel & Deitel, C: How to program Chapter 1, Sections 1.1 to 1.10 Chapter 3, Sections 3.1 to 3.3