0% found this document useful (0 votes)
84 views

Algorithm: Is A Finite Set of Precise Instructions For Performing A Computation or For Solving A Problem

An algorithm is a set of precise instructions to perform a computation or solve a problem. The term originated from the name of the 9th century mathematician al-Khwarizmi, whose treatise on the Hindu-Arabic numeral system was translated to Latin as "Algoritmi". An algorithm takes an input, processes it according to the set of instructions, and provides an output.

Uploaded by

evamagtibay
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views

Algorithm: Is A Finite Set of Precise Instructions For Performing A Computation or For Solving A Problem

An algorithm is a set of precise instructions to perform a computation or solve a problem. The term originated from the name of the 9th century mathematician al-Khwarizmi, whose treatise on the Hindu-Arabic numeral system was translated to Latin as "Algoritmi". An algorithm takes an input, processes it according to the set of instructions, and provides an output.

Uploaded by

evamagtibay
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Algorithm

Is a finite set of precise instructions for performing a computation or for solving a problem.

Abu Abdallah Muammad ibn Ms al-Khwrizm) the famous mathematician, astronomer and geographer, a scholar in the House of Baghdad.
He wrote a treatise in 825 AD, On Calculation with Hindu Numerals. It was translated into Latin in the 12th century as Algoritmi on the numbers of the Indians, where Algoritmi was the translators rendition of the authors name; but people misunderstanding the title treated Algoritmi as a Latin plural and this led to the word algorithm (Latin algorismus) coming to mean calculation method. The intrusive th is most likely due to a false cognate with the Greek (arithmos) meaning numbers

Notion of Algorithm
Problem to be solved

Algorithm created for performing particular task

INPUT

Computer

OUTPUT

The basic idea behind algorithms--and really, programs in general--is to decide what you want to accomplish and then keep breaking it into steps. For example, say you want to play tennis. You might have to do the following:

1. Call some friends and invite them to play. 2. Gather your stuff. 3. Drive to the tennis court.

Be more specific and cover every possible result

1. Call a friend and invite them to play. If the friend says no, repeat this step with another friend. If the friend says yes, go to Step #2. 2. Decide a time and location to play. 3. Locate your tennis racket. 4. Put your tennis racket in your car. 5. Ten minutes before [time] occurs, drive to [location].

Describe an algorithm for finding the maximum (largest) value in a finite sequence of integers. Solution: using English Language 1. Set the temporary maximum equal to the first integer in the sequence. (The temporary maximum will be the largest integer examined at any stage of the procedure.) 2. Compare the next integer in the sequence to the temporary maximum equal to this integer. 3. Repeat the previous step if there are more integers in the sequence. 4. Stop when there are no integers left in the sequence. The temporary maximum at this point is the largest integer in he sequence.

Solution: using Programming Language Procedure max(aa,,a: integers) max:= a for i:=2 to n if max< a then max:= a

You might also like