Algorithm Algorithm is a step-by-step procedure or formula or set of instruction for solving a problem Its written in English language or natural language.

Slides:



Advertisements
Similar presentations
CS 240 Computer Programming 1
Advertisements

PROBLEM SOLVING TECHNIQUES
PSEUDOCODE & FLOW CHART
Prof. B. I. Khodanpur HOD – Dept. of CSE R. V. College of Engineering
Flowcharts Amir Haider Lecturer NFC IEFR. Introduction The flowchart is a means of visually presenting the flow of data through an information processing.
Reference :Understanding Computers
CS 240 Computer Programming 1
INTRODUCTION TO PROGRAMMING
Flowcharts.
Al-Karma Language School Computer Department Prep. 3.
ITEC113 Algorithms and Programming Techniques
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
Chapter 3 Planning Your Solution
The Program Design Phases
Review Algorithm Analysis Problem Solving Space Complexity
Programming Logic and System Analysis
Algorithm & Flowchart.
Fundamentals of C programming
Looping While-continue.
Introduction to Algorithms By Mr. Venkatadri. M. Two Phases of Programming A typical programming task can be divided into two phases: Problem solving.
Software Life Cycle What Requirements Gathering, Problem definition
Chapter 2 Problem Solving On A Computer 2.1 Problem Solving Steps Solving a problem on a computer requires steps similar to those followed when solving.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
1 Section 2.1 Algorithms. 2 Algorithm A finite set of precise instructions for performing a computation or for solving a problem.
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific.
The Hashemite University Computer Engineering Department
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,
Flowchart. a diagram of the sequence of movements or actions of people or things involved in a complex system or activity. a graphical representation.
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.
STEP 3- DEVELOP AN ALGORITHM At this stage we break down the problem into simple manageable steps so that they can be handled easily.
Program Program is a collection of instructions that will perform some task.
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
Program Design & Development EE 201 C7-1 Spring
 Problem Analysis  Coding  Debugging  Testing.
Chapter One Problem Solving
Unit 3: ALGORITHMS AND FLOWCHARTS
2008/09/22: Lecture 6 CMSC 104, Section 0101 John Y. Park
Flowcharting Guidelines
Chapter 2- Visual Basic Schneider
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Algorithms An algorithm is a sequence of steps written in the form of English phrases that specific the tasks that are performed while solving the problem.It.
Lecture 2 Introduction to Programming
2.0 Problem Solving PROGRAM DESIGN
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Programming Logic n Techniques
PROBLEM SOLVING AND OFFICE AUTOMATION
Unit# 9: Computer Program Development
Problem Solving Techniques
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Chapter 2- Visual Basic Schneider
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Introduction to Algorithms and Programming
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Chapter 2- Visual Basic Schneider
ME 142 Engineering Computation I
How Are Algorithms Developed?
Software Development Process
Click to add Text Computers & Instructions. Computers are given instructions in the form of computer programs that are created through the development.
Lecture 7 Algorithm Design & Implementation. All problems can be solved by employing any one of the following building blocks or their combinations 1.
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Basic Concepts of Algorithm
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
WJEC GCSE Computer Science
WRITING AN ALGORITHM, PSEUDOCODE, AND FLOWCHART LESSON 2.
Presentation transcript:

Algorithm Algorithm is a step-by-step procedure or formula or set of instruction for solving a problem Its written in English language or natural language Characteristic of Algorithm It has finite number of inputs It terminates aft6er a finite number of steps Instruction are precise and unambiguous Operation specified can be done exactly and in finite amount of time There might be multiple input for a single output

Factor which determines Quality of Algorithm: Algorithm should be relative fast (number of steps to be minimum) Cost consideration for implementation should be minimum

Pseudocode It is an Intermediate code Pseudo – Imitation & code – set of instruction written in programming language It emphasize the design aspects of computer program Pseudocode is also called as PDL (Program Design Language) half between English and programming language

Pseudocode Keywords Input – Read, Prompt and obtain Initialize - Set, Initialize Output – Display , Print Add one - increment

Flowcharts flowchart is a diagrammatic representation of an algorithm It illustrates the sequence of operations to be performed to get the solution of a problem It is a blue print

Flow chart symbols

Guidelines for flow chart `requirement should be in logical order It should clear, neat and easy to follow Direction (left to right, top to bottom) It should have logical start and end To reduce the flow line usage of connector is important Intersection of flow line should be avoided In process symbol only one flow line should come out of it And only one flow line should enter the decision box Only one flow line should be used in conjunction with terminal symbol

Advantages Communication Makes logic easier Effective analysis Proper documentation Efficient coding Proper debugging and testing Efficient program maintenance

Limitations Complex logic Alteration and modification Reproduction – design Cost and time factor No updating

Example Algorithm and flowchart Example . Design an algorithm and the corresponding flowchart for adding the test scores as given below: 26, 49, 98, 87, 62, 75

Algorithm Step 1. Start Step 2. Sum = 0 Step 3. Get the first testscore Step 4. Add first testscore to sum Step 5. Get the second testscore Step 6. Add to sum Step 7. Get the third testscore Step 8. Add to sum

Algorithm Step 9. Get the Forth testscore Step 10. Add to sum Step 11. Get the fifth testscore Step 12. Add to sum Step 13. Get the sixth testscore Step 14. Add to sum Step 15. Output the sum Step 16. Stop

Flow chart

Flowchart