Download presentation
Presentation is loading. Please wait.
Published byMaximilian Gaines Modified over 9 years ago
2
Algorithm An algorithm, named after the ninth century scholar Abu Jafar Muhammad Ibn Musu Al- Khowarizmi, is defined as follows: An algorithm is a set of rules for carrying out calculation either by hand or on a machine. An algorithm is a finite step-by-step procedure to achieve a required result. An algorithm is a sequence of computational steps that transform the input into the output.
3
An algorithm is the soul of a computer program. A code without an algorithm is like a missile without a radar. Like a body without a soul
4
Example-No: 01 Let's follow an example to help get an understanding of the algorithm concept. Let's say that you have a friend arriving at the airport, and your friend needs to get from the airport to your house. Here are four different algorithms that you might give your friend for getting to your home:airport The taxi algorithm: Go to the taxi stand. Get in a taxi. Give the driver my address. The call-me algorithm: When your plane arrives, call my cell phone.planecell phone Meet me outside baggage claim.baggage claim
5
Example-No: 01 The rent-a-car algorithm: Take the shuttle to the rental car place. Rent a car. Follow the directions to get to my house. The bus algorithm: Outside baggage claim, catch bus number 70. Transfer to bus 14 on Main Street. Get off on Elm street. Walk two blocks north to my house. All four of these algorithms accomplish exactly the same goal, but each algorithm does it in completely different way. Each algorithm also has a different cost and a different travel time.
6
Example-No: 02 The Classic Multiplication Algorithm 1. Multiplication, the American way: Multiply the multiplicand one after another by each digit of the multiplier taken from right to left.
7
Example-No: 02 2. Multiplication, the English way: Multiply the multiplicand one after another by each digit of the multiplier taken from left to right.
8
History of Algorithm Algorithms have a long history and the word can be traced back to the 9th century. At this time the Persian scientist, astronomer and mathematician Abdullah Muhammad bin Musa al-Khwarizmi, often cited as “The father of Algebra”, was indirect responsible for the creation of the term “Algorithm”. In the 12th century one of his books was translated into Latin, where his name was rendered in Latin as “Algorithmi”.
9
Computer Program To make a computer do anything, you have to write a computer program.computer program To write a computer program, you have to tell the computer, step by step, exactly what you want it to do. The computer then "executes" the program, following each step mechanically, to accomplish the end goal. When you are telling the computer what to do, you also get to choose how it's going to do it. That's where computer algorithms come in. The algorithm is the basic technique used to get the job done.
10
Serial and Parallel Algorithms Algorithms may be divided into two primary groups: serial algorithms, which are designed for serial execution, wherein each operation is enacted in a linear order; and parallel algorithms, used with computers running parallel processors, wherein a number of operations are run parallel to each other. Parallel algorithms also exist in the natural world.
11
Expressing Algorithms Algorithms can be expressed in many kinds of notation, including natural languages, pseudocode, flowcharts, programming languages or control tables (processed by interpreters).natural languagespseudocodeflowcharts programming languagescontrol tables interpreters Natural language expressions of algorithms tend to be verbose and ambiguous, and are rarely used for complex or technical algorithms. Pseudo-code, flowcharts and control tables are structured ways to express algorithms that avoid many of the ambiguities common in natural language statements. Programming languages are primarily intended for expressing algorithms in a form that can be executed by a computer, but are often used as a way to define or document algorithms.
12
Implementation Most algorithms are intended to be implemented as computer programs.computer programs However, algorithms are also implemented by other means, such as in a biological neural network (for example, the human brain implementing arithmetic or an insect looking for food), in an electrical circuit, or in a mechanical deviceneural networkhuman brainarithmeticelectrical circuit
13
Analysis of algorithms Analysis of algorithms is the branch of computer science that studies the performance of algorithms, especially their run time and space requirements. The practical goal of algorithm analysis is to predict the performance of different algorithms in order to guide design decisions. So the goal of algorithm analysis is to make meaningful comparisons between algorithms.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.