Download presentation
Presentation is loading. Please wait.
Published byBlaise Barrett Modified over 8 years ago
1
1
2
A step by step process to solve any problem is called algorithm. Algorithm is a process which take some values as input and provide us output. So it convert input into output. 2
3
A computer algorithm is a detailed step-by- step method for solving a problem by using a computer. An algorithm is a sequence of unambiguous instructions for solving a problem in a finite amount of time. An Algorithm is well defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values as output. More generally, an Algorithm is any well defined computational procedure that takes collection of elements as input and produces a collection of elements as output. 3
4
4 The word Algorithm comes from the name of the muslim author Abu Ja’far Mohammad ibn Musa al- Khowarizmi. He was born in the eighth century at Khwarizm. Much of al-Khwarizmi’s work was written in a book titled al Kitab al-mukhatasar fi hisab al-jabr wa’l- muqabalah It is from the titles of these writings and his name that the words algebra and algorithm are derived. As a result of his work, al-Khwarizmi is regarded as the most outstanding mathematician of his time.
5
Most basic and popular algorithms are ◦ Sorting algorithms ◦ Searching algorithms 5
6
Mainly, it depends upon various factors, for example in case of sorting ◦ The number of items to be sorted ◦ The extent to which the items are already sorted ◦ Possible restrictions on the item values ◦ The kind of storage device to be used etc. 6
7
Problem The statement of the problem specifies, in general terms, the desired input/output relationship. Algorithm The algorithm describes a specific computational procedure for achieving input/output relationship. Example One might need to sort a sequence of numbers into non-decreasing order. Algorithms Various algorithms e.g. merge sort, quick sort, heap sorts etc. 7
8
Analysis independent of the variations in ◦ Machine ◦ Operating system ◦ Programming languages ◦ Compiler etc. Low-level details will not be considered Our model will be an abstraction of a standard generic single-processor machine, called a random access machine or RAM 8
9
A RAM is assumed to be an idealized machine ◦ Infinitely large random-access memory ◦ Instructions execute sequentially Every instruction is in fact a basic operation on two values in the machines memory which takes unit time. These might be characters or integers. Example of basic operations include ◦ Assigning a value to a variable ◦ Arithmetic operation (+, -, ×, /) on integers ◦ Performing any comparison e.g. a < b ◦ Boolean operations ◦ Accessing an element of an array. 9
10
Algorithms help us to understand scalability. Performance often draws the line between what is feasible and what is impossible. Algorithmic mathematics provides a languagefor talking about program behavior. Performance is the currency of computing. Speed is fun! 10
11
Input:sequence 〈 a1, a2, …, an 〉 of numbers. Output: 〈 a'1, a'2, …, a'n 〉 such that a'1≤a'2≤…≤a'n. Example: Input:8 2 4 9 3 6 Output:2 3 4 6 8 9 11
12
A good understanding of algorithms is essential for a good understanding of the most basic element of computer science: programming. Unlike a program, an algorithm is a mathematical entity, which is independent of a specific programming language, machine, or compiler. Thus, in some sense, algorithm 1. INTRODUCTION design is all about the mathematical theory behind the design of good programs. 12
13
13 The fact is that many of the courses in computer science deal with efficient algorithms and data structure
14
14 compilers operating systems databases artificial intelegence computer graphics networks
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.