menu

arrow_back What is an algorithm?

by SIlver Status
(18,455 points)
in Mathematics
13 views
What is an algorithm?

1 Answer

Best answer
0 like 0 dislike
 
Best answer

An algorithm is a specific set of actions that when carried out on data (input) of the allowed type will produce an output. This is the meaning in mathematical discourse. There are related meanings in use:


- The algorithm may be implemented as a program in a computer language. This program may itself be referred to as the algorithm.
- In texts on the subject of algorithm, the word may be given a mathematical definition, turning an algorithm into a mathematical object (compare the uses of proof).


Example

One might express a simpleminded algorithm for calculating a zero of a function \(f(x)\) using Newton's Method by saying
"Start with a guess \(x\) and calculate \(x-\frac{f(x)}{f^{\prime}(x)}\) repeatedly until
\(f(x)\) gets sufficiently close to 0 or the process has gone on too long."
One could spell this out in more detail this way:
1. Choose an accuracy \(\epsilon\), the maximum number of iterations \(N\), and a guess \(s\).
2. Let \(n=0\).
3. If \(\left|f^{\prime}(s)\right|<\epsilon\) then stop with the message "derivative too small".
4. Replace \(n\) by \(n+1\).
5. If \(n>N\), then stop with the message "too many iterations".
6. Let \(r=s-\frac{f(s)}{f^{\prime}(s)}\).
7. If \(|f(r)|<\epsilon\) then stop; otherwise go to step 3 with \(s\) replaced by \(r\).

Observe that neither description of the algorithm is in a programming language, but that the second one is precise enough that it could be translated into most programming languages quite easily. Nevertheless, it is not a program.

by SIlver Status
(18,455 points)

Related questions


Notice: Undefined index: avatar in /home/customer/www/mathsgee.com/public_html/qa-theme/AVEN/qa-theme.php on line 993
What is a learning community?
1 answer 35 views
What is a learning community?What is a learning community? ...
by MathsGee Platinum
(106,962 points)
asked in Teaching & Learning Nov 2, 2021
close

Notice: Undefined index: avatar in /home/customer/www/mathsgee.com/public_html/qa-theme/AVEN/qa-theme.php on line 993
Speak the answer. What is 2 + 2 ?
0 answers 9 views
Speak the answer. What is 2 + 2 ? Speak the answer. What is 2 + 2 ? &nbsp; &nbsp; ...
by MathsGee Platinum
(106,962 points)
asked in Mathematics Jan 11
close

Notice: Undefined index: avatar in /home/customer/www/mathsgee.com/public_html/qa-theme/AVEN/qa-theme.php on line 993
What is a time series?
1 answer 8 views
What is a time series?What is a time series? ...
by MathsGee Platinum
(106,962 points)
asked in Data Science & Statistics Jan 24
close

Notice: Undefined index: avatar in /home/customer/www/mathsgee.com/public_html/qa-theme/AVEN/qa-theme.php on line 993
What is financial risk?
1 answer 27 views
What is financial risk?What is financial risk? ...
by MathsGee Platinum
(106,962 points)
asked in Economics & Finance Nov 3, 2021
close

Notice: Undefined index: avatar in /home/customer/www/mathsgee.com/public_html/qa-theme/AVEN/qa-theme.php on line 993
What is business risk?
1 answer 24 views
What is business risk?What is business risk? ...
by MathsGee Platinum
(106,962 points)
asked in Economics & Finance Nov 3, 2021
close

Notice: Undefined index: avatar in /home/customer/www/mathsgee.com/public_html/qa-theme/AVEN/qa-theme.php on line 993
What is chapterization?
1 answer 51 views
What is chapterization?What is chapterization? ...
by MathsGee Platinum
(106,962 points)
asked in Data Science & Statistics Oct 6, 2021
close

Notice: Undefined index: avatar in /home/customer/www/mathsgee.com/public_html/qa-theme/AVEN/qa-theme.php on line 993
WHat are the keywords for MathsGe QnA?
1 answer 81.7K views
WHat are the keywords for MathsGe QnA?WHat are the keywords for MathsGee QnA? ...
by MathsGee Platinum
(106,962 points)
asked in Marketing Apr 25, 2020
close

Join the MathsGee Homework Help Q&A club where you get study support for success from our verified experts. Subscribe for only R100 per month or R960 per year.


On the MathsGee Homework Help Q&A learning community, you can:


  1. Ask questions
  2. Answer questions
  3. Comment on Answers
  4. Vote on Questions and Answers
  5. Donate to your favourite users
  6. Create/Take Live Video Lessons

Posting on the MathsGee Homework Help Q&A learning community


  1. Remember the human
  2. Behave like you would in real life
  3. Look for the original source of content
  4. Search for duplicates before posting
  5. Read the community's rules

MathsGee is Zero-Rated (You do not need data to access) on: Telkom |Dimension Data | Rain | MWEB

MathsGee Tools

Math Worksheet Generator

Math Algebra Solver

Trigonometry Simulations

Vectors Simulations

Matrix Arithmetic Simulations

Matrix Transformations Simulations

Quadratic Equations Simulations

Probability & Statistics Simulations

PHET Simulations

Visual Statistics

Management Leadership | MathsGee ZOOM | eBook | H5P