1 Pertemuan 01 Algorithm Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:

Slides:



Advertisements
Similar presentations
C Programming Technique – Firdaus-Harun.com
Advertisements

Algorithms An algorithm is a finite sequence of instructions, logic, an explicit step-by-step procedure for solving a problem. Specific algorithms sometimes.
PROBLEM SOLVING TECHNIQUES
CHAPTER 2 GC101 Program’s algorithm 1. COMMUNICATING WITH A COMPUTER  Programming languages bridge the gap between human thought processes and computer.
1 Pertemuan > > Matakuliah: >/ > Tahun: > Versi: >
1 Pertemuan 22 Radix Sort Matakuliah: T0016/Algoritma dan Pemrograman Tahun: 2005 Versi: versi 2.
Program Flowchart, Pseudocode & Algorithm development
Algorithms and Problem Solving
CHAPTER 1: AN OVERVIEW OF COMPUTERS AND LOGIC. Objectives 2  Understand computer components and operations  Describe the steps involved in the programming.
Mathematics for Computing Lecture 4: Algorithms and flowcharts Dr Andrew Purkiss-Trew Cancer Research UK
Computer Programming Rattapoom Waranusast Department of Electrical and Computer Engineering Faculty of Engineering, Naresuan University.
INTRODUCTION TO PROGRAMMING
1 Pertemuan 23 Object database design (Lanjutan bagian 2) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0.
1 Pertemuan 7 Future Continuous & Future Perfect Matakuliah: G0134/Grammar III Tahun: 2005 Versi: revisi 1.
1 Pertemuan 04 Expression Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:
1 Pertemuan 9 Making an outline Matakuliah: G1072 – Reading 1 Tahun: 2005 Versi: revisi 0.
1 Pertemuan 21 Parallelism and Superscalar Matakuliah: H0344/Organisasi dan Arsitektur Komputer Tahun: 2005 Versi: 1/1.
1 Pertemuan 07 Procedures Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:
1 Pertemuan 05 Selection Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:
1 Pertemuan 11 QUIZ Matakuliah: J0274/Akuntansi Manajemen Tahun: 2005 Versi: 01/00.
1 Pertemuan 20 Time & Condition Clauses with Future reference Matakuliah: G0134 – Grammar III Tahun: 2005 Versi: revisi 1.
1 Pertemuan 9 The Manipulative part of the object data model Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0.
1 Pertemuan 06 Repetition Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:
1 Pertemuan 03 Representing Data Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:
Pertemuan 25 Solusi Bisnis Terintegrasi Matakuliah: M0034 /Informasi dan Proses Bisnis Tahun: 2005 Versi: 01/05.
PRE-PROGRAMMING PHASE
Algorithm & Flowchart.
Fundamentals of C programming
Introduction to Programming Lecture Number:. What is Programming Programming is to instruct the computer on what it has to do in a language that the computer.
An ordered sequence of unambiguous and well-defined instructions that performs some task and halts in finite time Let's examine the four parts of this.
Algorithms Recipes for disaster?. Topics Covered Programming vs. problem solving What is an algorithm? Algorithm development common constructs (loops,
King Saud University College of applied studies and community services CSC 1101 Computer Programming I Lecture 2.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Flowcharts.
© 2011 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Stewart Venit ~ Elizabeth Drake Developing a Program.
Introduction to Algorithms Engineering 1D04, Teaching Session 1.
1 Pertemuan 25 Object Relational Database Management System Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0.
ALGORITHM List of instructions for carrying out some process step by step. A sequence of instructions which has a clear meaning and can performed with.
Algorithms & Flowchart
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
1 Program Planning and Design Important stages before actual program is written.
1 Pertemuan 25 Bahasa-bahasa Pemrograman Matakuliah: T0604-Pengantar Teknologi Informasi Tahun: 2008 Versi: 2.0/0.0 Williams, B.K, Stacy C. Sawyer (2007).
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Problem, Problem Solving, Algorithm & Flow Charts –Part 1 Presented By Manesh T Course:101 CS 101CS Manesh T1.
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,
ALGORITHMS AND FLOWCHARTS. Why Algorithm is needed? 2 Computer Program ? Set of instructions to perform some specific task Is Program itself a Software.
Flowcharts C++ Lab. Algorithm An informal definition of an algorithm is: a step-by-step method for solving a problem or doing a task. Input data A step-by-step.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
Flow Charts And Pseudo Codes Grade 12. An algorithm is a complete step-by- step procedure for solving a problem or accomplishing a task.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Algorithms and Flowcharts
Matakuliah : D0524 / Algoritma dan Pemrograman Komputer
Lesson 2 Flowcharting.
Problem , Problem Solving, Algorithm & Flow Charts –Part 1
Pertemuan 22 The Business Views of the Technology Architecture
1-1 Logic and Syntax A computer program is a solution to a problem.
Chapter 2- Visual Basic Schneider
ALGORITHMS AND FLOWCHARTS
ALGORITHM Basic CONCEPTS of Basic Concepts of Algorithm
Introduction to Computer Programming
Unit# 9: Computer Program Development
(Course Introduction)
Algorithms & Pseudocode
Chapter 2- Visual Basic Schneider
Introduction to Algorithms and Programming
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
ME 142 Engineering Computation I
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.
Basic Concepts of Algorithm
WRITING AN ALGORITHM, PSEUDOCODE, AND FLOWCHART LESSON 2.
Presentation transcript:

1 Pertemuan 01 Algorithm Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:

2 Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : Menerapkan prinsip – prinsip dasar algoritma menggunakan pseudo code dan flowchart

3 Outline Materi History of Algorithm Algorithm Definition Algorithm Implementation Examples of Algorithm

4 History of Algorithm The word algorithm comes from the name of the 9th century Persian mathematician Abu Abdullah Muhammad bin Musa al- Khwarizmi. The word algorism originally referred only to the rules of performing arithmetic using Arabic numerals but evolved into algorithm by the 18th century. The word has now evolved to include all definite procedures for solving problems or performing tasks. The first case of an algorithm written for a computer was Ada Byron's notes on the analytical engine written in 1842, for which she is considered by many to be the world's first programmer. The lack of mathematical rigor in the "well-defined procedure" definition of algorithms posed some difficulties for mathematicians and logicians of the 19th and early 20th centuries. This problem was largely solved with the description of the Turing machine, an abstract model of a computer formulated by Alan Turing. Nowadays, a formal criterion for an algorithm is that it is a procedure that can be implemented on a completely-specified Turing machine or one of the equivalent formalisms. Abu Abdullah Muhammad bin Musa al- Khwarizmi

5 Algorithm Definition Algorithm is a finite set of well-defined instructions for accomplishing some task which, given an initial state, will terminate in a corresponding recognizable end-state In short, algorithm is a step–by–step procedure to solve a problem Computer has no intelligence of its own – it cannot solve our mistakes!

6 Algorithm Implementation Flowchart –a schematic representation of a process. They are commonly used in business/economic presentations to help the audience visualize the content better, or to find flaws in the process Pseudocode –a generic way of describing an algorithm using the conventions of programming languages. As the name suggests, pseudocode generally does not actually use the syntax of any particular language; there is no systematic standard form, although any particular writer will generally borrow the appearance of a particular language –depending on the writer, pseudocode may therefore vary widely in style, from a near-exact imitation of a real programming language at one extreme, to a description approaching formatted prose at the other

7 Algorithm Implementation - Flowchart Common Flowchart Symbols Terminal : Start or end of a program Computational steps or processing function of a program Input or output operation Decision making and branching Connector or joining of two parts of program Flow Line

8 Algorithm Implementation - Flowchart A simple flowchart for what to do if a lamp doesn't work

9 Algorithm Examples – Wake Up We use algorithms all the time. Here is a typical algorithm for waking up in the morning. Wake-up algorithm: Get out of bed Brush teeth Eat breakfast Take shower Get dressed

10 Algorithm Examples – Temperature Conversion The local weather centre wants a computer program that will accept a temperature reading in degrees Fahrenheit as input, convert the value to degrees in Celsius and provide both values as output, for its hourly weather report. –Develop the program logic as flowchart and pseudocode needed to solve the problem

11 Algorithm Examples – Temperature Conversion Pseudocode: Input degreesF degreesC = (degreesF-32) * 5/9 Output degreesF and degreesC Start Input degreesF degreesC = (degreesF-32) * 5/9 Output degreesF and degrees C End Flowchart : Convert degreesF to degrees C Or

12 Algorithm Examples – Exercises Sales Application: –In a company, a salesperson’s pay is determined by how much they have sold in a month. Sales are of two types, items sold at regular price and those at sale price. Each person is paid a base amount of £920 plus a commission of 6% on regular-price sales and 3% on reduced-price sales. –Design the algorithm (program logic) to calculate their pay. Average Mark: –A student gains 45, 53, 58 marks in three tests. –Design an algorithm to input that information and output their average mark.