Fundraise on MathsGee
First time here? Checkout the FAQs!
x

*Math Image Search only works best with zoomed in and well cropped math screenshots. Check DEMO

0 like 0 dislike
102 views
What is an algorithm?
in Mathematics by Diamond (57,849 points) | 102 views

1 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 Diamond (57,849 points)

Related questions

0 like 0 dislike
1 answer
asked Nov 2, 2021 in Teaching & Learning by MathsGee Platinum (130,882 points) | 146 views
0 like 0 dislike
1 answer
asked Feb 3 in Advertising & Marketing by MathsGee Platinum (130,882 points) | 115 views
0 like 0 dislike
1 answer
asked Feb 3 in Advertising & Marketing by MathsGee Platinum (130,882 points) | 89 views
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
1 like 0 dislike
1 answer
asked Jul 28 in Mathematics by MathsGee Platinum (130,882 points) | 16 views
1 like 0 dislike
1 answer
1 like 0 dislike
1 answer
asked Jul 27 in Data Science & Statistics by Gauss Diamond (57,849 points) | 17 views
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
1 like 0 dislike
1 answer
asked Jul 1 in Research Design by Gauss Diamond (57,849 points) | 26 views
1 like 0 dislike
0 answers
0 like 0 dislike
0 answers
asked Jun 9 in Mathematics by Gauss Diamond (57,849 points) | 38 views
0 like 0 dislike
1 answer

Join the MathsGee Learning Club where you get study and financial support for success from our community. CONNECT - LEARN - FUNDRAISE


On the MathsGee Learning Club, you can:


1. Ask questions


2. Answer questions


3. Vote on Questions and Answers


4. Start a Fundraiser


5. Tip your favourite community member(s)


6. Create Live Video Tutorials (Paid/Free)


7. Join Live Video Tutorials (Paid/Free)


8. Earn points for participating



Posting on the MathsGee Learning Club


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




CLUB RULES


1. Answers to questions will be posted immediately after moderation


2. Questions will be queued for posting immediately after moderation


3. Depending on how many posts we receive, you could be waiting up to 24 hours for your post to appear. But, please be patient as posts will appear after they pass our moderation.


MathsGee Android Q&A