What is Algorithm: Definition and 721 Discussions

In mathematics and computer science, an algorithm ( (listen)) is a finite sequence of well-defined, computer-implementable instructions, typically to solve a class of specific problems or to perform a computation. Algorithms are always unambiguous and are used as specifications for performing calculations, data processing, automated reasoning, and other tasks. In contrast, a heuristic is a technique used in problem solving that uses practical methods and/or various estimates in order to produce solutions that may not be optimal but are sufficient given the circumstances. As an effective method, an algorithm can be expressed within a finite amount of space and time, and in a well-defined formal language for calculating a function. Starting from an initial state and initial input (perhaps empty), the instructions describe a computation that, when executed, proceeds through a finite number of well-defined successive states, eventually producing "output" and terminating at a final ending state. The transition from one state to the next is not necessarily deterministic; some algorithms, known as randomized algorithms, incorporate random input.The concept of algorithm has existed since antiquity. Arithmetic algorithms, such as a division algorithm, were used by ancient Babylonian mathematicians c. 2500 BC and Egyptian mathematicians c. 1550 BC. Greek mathematicians later used algorithms in 240 BC in the sieve of Eratosthenes for finding prime numbers, and the Euclidean algorithm for finding the greatest common divisor of two numbers. Arabic mathematicians such as al-Kindi in the 9th century used cryptographic algorithms for code-breaking, based on frequency analysis.The word algorithm itself is derived from the name of the 9th-century mathematician Muḥammad ibn Mūsā al-Khwārizmī, whose nisba (identifying him as from Khwarazm) was Latinized as Algoritmi. A partial formalization of the modern concept of algorithm began with attempts to solve the Entscheidungsproblem (decision problem) posed by David Hilbert in 1928. Later formalizations were framed as attempts to define "effective calculability" or "effective method". Those formalizations included the Gödel–Herbrand–Kleene recursive functions of 1930, 1934 and 1935, Alonzo Church's lambda calculus of 1936, Emil Post's Formulation 1 of 1936, and Alan Turing's Turing machines of 1936–37 and 1939.

View More On Wikipedia.org
  1. A

    A thread for learning RSA algorithm

    Hai friends I am aravind,doing post graduate in computer science .In this thread I explain about the maths behind RSA algorithm in a simple way.I think this thread is useful for beginners who are interested in learning RSA algorithm.If anyone interested in this thread give reply.
  2. Loren Booda

    Does Deutsch's Algorithm Reveal Insights Into Prime Numbers?

    Does Deutsch's quantum algorithm provide any profound classical insight into the density of primes?
  3. H

    Finding K-Byte Substrings in Two Long Strings

    I have two very long strings of length s and t. I want to find every k-byte substring that occurs in both of them. What good ways are there to do that? My current algorithm is to store each k-byte substring of the first in a hash table, then look up every k-byte substring of the second. A...
  4. M

    Generate Permutations from Combinations Algorithm

    Does an algorithm exist for generating a particular permutation of a combination? You just input the combination and the position of the permutation and it outputs the permutation.
  5. Z

    How can the Metropolis-Hastings algorithm help simulate a Normal Distribution?

    I'm having trouble understanding how to find an expression for \pi(x) and \pi(y) in the relation: \alpha \left( {x,y} \right) = \min \left( {1,\frac{{\pi \left( y \right)q\left( {y,x} \right)}}{{\pi \left( x \right)q\left( {x,y} \right)}}} \right) For example, If I want to simulate Normal...
  6. G

    A question about graph algorithm

    Suppose there are 10 nodes in a graph, I need to generate edges between nodes, but there are two conditions to be satisfied: 1) each node can have maximize of two edges. 2) no loop in the graph. The question is how to run a program which gives an algorithm to generate such a graph randomly...
  7. S

    Proving Algorithm for Searching Sorted Array

    I have to come up with an algorithm to search a sorted array. Here it is: def binarySearch(inputArray, match): x = -1 start = 0 end = len(inputArray) - 1 while not start == end: midPt = (start + end) / 2 if match < inputArray[midPt]: end = midPt - 1...
  8. W

    What is the Best Way to Determine x Given y in a Sine Wave Algorithm?

    Hi, This maths stuff is tstarting to hurt my head! :p Ok, I want to use a sine wave to make objects appear at an increasing rate and then a decreasing rate. e.g. where: y=sin(x) y = interval before next object appears so in Maple that'd be: plot(sin(x)+1,x=Pi/2..Pi+(Pi/2)); Now I...
  9. F

    What is the loop invariant for proving the LCM algorithm?

    algorithm to prove lcm: a:=m b:=n while a != b if a < b a:= a + m else b:= b + n //postcondition: a is the lcm(m,n) what's the loop invariant?I thought it is(not sure): lcm(ak, bk) = lcm(ak/m, bk/n) *lcm(m,n) I am not sure and also impossible to prove my loop invariant...
  10. C

    An Algorithm to find a Prime Decompisition

    Hello all. I know there is a stupidly easy algorithm to find the prime decompision of a number (i.e. 2*2*2*3*5 is the p.d. of 120) but I can't for the life of me remember it. I need to do this operation on incredibly large numbers (~500 digits) so the naieve way of just starting at 2 and...
  11. N

    Find Area of Intersecting Planes - New Algorithm?

    hello grp... :smile: is there any algorithm of findin the total area of an intersecting plane. i have tried with set theory if a n b r two planes, area(a)+Area(b)-Area(a intersection b) but it takes such a long computation when u go on adding planes to the existing ones. I want to have...
  12. S

    How does the prime number algorithm determine if a number is prime or not?

    When trying to determine whether a number is prime or not, the following algorithm is often used: Test all numbers up to [sqrt[n]] ([x] is the ceiling of x) to see if any divide evenly into n. If any do, the number is not prime. My question is, why do you only have to test up to [sqrt[n]]...
  13. E

    Algorithm to find the train's location and velocity?

    :confused: I'm a silent viewer of this forum, and I came across a question I don't seem to manage...: A train is traveling along the Z axis (infinite on both sides). You have no information as of the train's direction or speed. At each time unit the train lends on a number. At each time unit...
  14. F

    What is the difference between assignment and comparison in VBScript?

    hello, i want to make a linear program which has such this conditional: if the inputs have 2 variables (ex. x & y) and make equations (ex. 2x + 3y <= 23, 5x + y <= 12) then both equation will shown in graphic. but if the inputs have more than 2 variables (ex. x, y & z) and have some...
  15. R

    Uncovering the Universal Algorithm

    Here is the definition of "algorithm": http://en.wikipedia.org/wiki/Algorithm DNA is an algorithm, a finite set of instructions, which can construct a carbon based life form. The life form physically contains the DNA and the DNA contains the life form in an "abstract" sense. At a...
  16. C

    Division Algorithm: Find q & r for a=-5286 and b=19

    If I have to find the quotient q and the remainder r and: a = -5286 b = 19 How do I go about writing down the steps for this algorithm? I know what the answer will be, but I need to be able to use the division algorithm to prove my answer. Like I know if: b > 0 and a < 0 (which in this...
  17. W

    Graph Theory: Dijkstra's Algorithm

    Hello, Does anyone know of an online resource which explains Dijkstra's Algorithm both in tabular form and graphical form? My text does an incredibly poor job explaining this algorithm. I sort of understand it graphically. But I have absolutely no idea what is going on when it comes to...
  18. A

    Understanding the Euclidean Algorithm: Solving for Relatively Prime Numbers

    I am little confused on this issue, actually the thing that is confusing me is my book. We all know the formula m=qn+r and 0<r<n In the formula we go until r=0, then you will know relativley prime. When given a problem, for example, (862,347) we have m=862 while n=347 so we have the...
  19. radagast

    Algorithm for matrix inversion

    Anybody know of a link to a page that describes an algorithm for matrix inversion. My old linear algebra book describes a 'by hand' method, but it's unsuitable for automating.
  20. A

    Algorithm of the numerical decision of stochastic Shrodinger equation.

    Prompt please where it is possible to find algorithm of the numerical decision of stochastic Shrodinger equation with casual potential having zero average and delta – correlated in space and time? The equation: i*a*dF/dt b*nabla*F-U*F=0 where i - imaginary unit, d/dt - partial...
  21. Moni

    Algorithm which is optimal for these geometry problems

    I don't know the optimal result but I gave some hint in that topic. Can anyone tell me the algorithm which is optimal for these geometry problems. http://acm.uva.es/board/viewtopic.php?t=2631
Back
Top