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. T

    Worst runtime of an algorithm

    Hello guys,I decided to try and do a problem about analyzing the worst possible runtime of an algorithm.Since I'm a beginner and I want to do an understand this right I require some help. I came accros this problem in a book that uses the following algoritthm Input: A set of n points (x1, y1), ...
  2. W

    Using VEGAS Algorithm to Compute Integral of Flat Function with Localized Peaks

    I am attempting to compute the integral of a function that is mostly flat relative to a few localized peaks. These peaks are the bulk of the contribution to the integral. I decided to try the VEGAS algorithm to do this. I am running into some difficulty, so I am reaching out to YOU...
  3. B

    Efficiency and the Euclidean Algorithm

    1. Question Let b = r_0, r_1, r_2,... be the successive remainders in the Euclidean algorithm applied to a and b. Show that every two steps reduces the remainder by at least one half. In other words, verify that r_(i+2) < (1/2)r_i for every i = 0,1,2,... 2. Attempt at a solution I take an...
  4. W

    Stable/unstable algorithm

    Can anyone help in provong whether or not the algorithm r_n+1= r_n/1+sqrt(2-r_n) is stable. I have tried using error analysis but am struggling to get the algorithm in a form that can be easily dealt with. Thanks in advance
  5. A

    Haskell WalkSat algorithm implementation

    I need some help if possible with the following problem...The WalkSat algorithm takes a formula, a probability 0 =< p =< 1, and a boundary of maximum flips maxflips and returns a model that satisfies the formula or failure. The algorithm begins by assigning truth values to the atoms randomly...
  6. J

    How Does a Sentinel Value Work in an Algorithm?

    Hi Please have a look on this scanned page: http://img257.imageshack.us/img257/8175/chap11page191.jpg I humbly request you to be precise and to the point in your replies. I need you help and need to understand this as soon as possible. Thank a lot. Suppose there were 100 students and...
  7. G

    Looking for help on Lancsoz algorithm to solve schrodinger equ

    Dear frnds, if we take an hydrogen atom and we wish to find out the PD function of 1st, 2nd and 3rd orbital. please help me finding out some doc on it.
  8. C

    Dirac Algorithm in Python (or similar)

    I was wondering if anybody knows of any code available to perform tensor analysis in Python or in other language; I was wondering if there is any computational method for finding constraints in a lagrangian via the Dirac Algorithm.
  9. J

    Algorithm: largest of the four

    Write an algorithm to find the largest of the four numbers A, B, C, D. 1: See if A is greater than the three of the rest, if YES, then go to Step 5 2: See if B is greater than the two of the rest, if YES, then go to Step 5 3: See if C is greater than the last one, if YES, then go to Step 5...
  10. S

    Minimum degree of polynomial time NP complete problem algorithm

    So no one is quite sure that P != NP, although they tend to favor that relation. But I was curious, has anyone proved a minimum degree order to any algorithm that solves NP complete problems in polynomial time? In other words, they don't know if it can be done in polynomial time, but do they...
  11. H

    Algorithm to calculate root (or power) in computer

    I need an algorithm to calculate nth root or power of any given real number. "n" can be either integer or fractional, and is real. I found http://en.wikipedia.org/wiki/N-th_root_algorithm" , but it requires to calculate power in it, therefore I can't use it. Newton's method: x_{k+1} =...
  12. K

    Division Algorithm For Polynomials

    Im given two polynomials: f(x) =(2x^6) + (x^5) - (3x^4) + (4x^3) + (x^2) -1 and g(x)=(x^3)-(x^2)+2x+3 find polynomials Q(x),R(x) in the set of R[x] s.t f(x) =g(x)Q(X) +R(X) and deg(R)<deg(g) Am i even in the right area? and something to do with manipulating numbers in C[x]...
  13. V

    Using metropolis algorithm for 2D ising model

    Hi I'm looking for some help with trying to understand how to use the metropolis algorithm for the 2D ising model. In the problem i am trying to solve, the Hamiltonian is simply H= - sum(Si). I am given a probability function= exp[-H/T] / Z(T) where Z is the partition function which i found...
  14. J

    Understanding the Gerchberg-Saxton Algorithm through Convex Optimization

    Please help me understand the Gerchberg–Saxton algorithm what I comprehended so far 1) A source is shone on an object and produces a diffraction pattern in the diffraction plane. We do not know the dimensions of the object. 2) We are unable to calculate the phase of the of the wave, due...
  15. 0

    How does this number system conversion algorithm work?

    50 | 0 25 | 1 12 | 0 6 | 0 3 | 1 1 | 1 0 how does it work? (I know how to use the algorithm... my question is about how it can do the conversion)
  16. P

    Question about Metropolis Hastings algorithm

    Hello everyone, I am having a bit of trouble understanding the metropolis hastings algorithm which can be used to generate random samples from a distribution that can be difficult to sample directly from: As I understand it we sample from a proposal distribution (say a normal...
  17. S

    Algorithm for what should be a simple problem

    Homework Statement Suppose that you are given a sorted sequence of distinct integers {a1, a2, . . . , an}. Give an O(lg n) algorithm to determine whether there exists an i index such as ai = i. For example, in {−10,−3, 3, 5, 7}, a3 = 3. In {2, 3, 4, 5, 6, 7}, there is no such i...
  18. S

    Designing a Highway Bridge: Optimal Road Surface for Extreme Temperatures

    You are designing a highway bridge. In particular you are trying to determine how to put the road surface on the bridge. You live in an area where the maximum summertime temperature is 40 degrees centigrade and the minimum winter temperature is -30 degrees centigrade. The coefficient of linear...
  19. Y

    Find Sudoku Algorithm Solutions in Java - n Size

    I'm writing a program in java and I need to find an algorithm to calculate all possible sudoku solutions for a board of size n. I don't need to know how to solve it, just how many possibilities there are.
  20. T

    Genetic algorithm to create amoeba game

    Hi! I created an amoeba game where you can play against the computer. The AI searches for patterns such as "xxxxx", "oxxxxo", (as in 5-in-a-row, and 4 in a row with both sides open), and the rest (a total of 28 patterns) I could think of that lead the way to putting 5 marks in a row. Each...
  21. K

    Understanding a Complex Algorithm: Seeking Insight and Clarity

    from my reading to DFT I constructed this algorithm V ex...>\rho ...\varphi...SCF...new\varphi>>>new\rho ...energy what your opinion in this algorithm ... is lost to some thing ? and i need to some one tell me is density come from wave function or from V-external ?
  22. T

    Write this algorithm in pseudocode

    Homework Statement I have to write this algorithm in pseudocode that finds and displays the largest of a list of positive numbers entered by the user and the sum of the positive numbers. The user should indicate that he has finished entering numbers by entering a zero. For example the user...
  23. S

    Division algorithm in A[x] (A NOT a field)

    is it possible? I'm reading a proof where A is a local ring and f is a monic polynomial, v another polynomial in A[x] then the author says there is q,r with v=qf+r and degf<r. I thought the algorithm required divison of coefficients?! Maybe it's true we can always do this with f monic? thanks
  24. H

    A simple algorithm, with no use of the mass, to reproduce the 3 laws of Kepler

    Hello, I was drawing some curves on my computer when something appeared : it is possible to build trajectories that agree with all Kepler's laws with a very simple iterative process and very simple conditions. I wrote a paper to describe this fact and I built an online demonstrator to...
  25. Simfish

    Is the conjugate gradient algorithm susceptible to getting into local minima?

    What about the nonlinear forms of it? Or is it guaranteed to reach a global minimum?
  26. G

    NLP Algorithm Evaluation: Help?

    Hello guys, We're beginners here and please excuse us if our questions are inappropriate in any way. We have a statistics-related problem, and we'll explain it as short as possible. Here it goes. We're working on an algorithm that analyses text sentences (some key words and heuristic...
  27. E

    Finding "The Algorithm for Calculating Integrals" at ICSC 1990

    Hello, I am looking for this paper: The algorithm for calculating integrals of hypergeometric type functions and its realization in REDUCE system International Conference on Symbolic and Algebraic Computation archive Proceedings of the international symposium on Symbolic and algebraic...
  28. D

    Division Algorithm: 15÷29=0 R15 Linear Equation

    Find the quotient and the remainder when 15 is divided by 29. Use the division algorithm to write your answer as a linear equation (i.e., use the division algorithm to write 15 divided by 29 as a linear equation) I wrote 15=29*0+15 but this problem was marked wrong when I submitted it...
  29. S

    What is the meaning of M(n) in algorithm complexity analysis?

    I'm trying to teach myself some algorithm complexity and I've run into a problem. I'm starting to understand about O and o notation and big theta notation. I've run into notations like O(n^2 M(n)). Does this mean that the complexity is n^2 times whatever M(n) means? (Natural next question) what...
  30. L

    I would share my genetic algorithm subroutine

    Dear all, i wrote a fortran subroutine that implement a genetic algorithm in double precision. I would like share this code in order to improve and due to the lack of this kind (double precision) of genetic algorithm in fortran. My question is where i can do this? best regards
  31. K

    Abstract Algebra, Euclidean Algorithm

    Use the Euclidean Algorithm to find the gcd of the given polynomials: (x3-ix2+4x-4i)/(x2+1) in C[x] First I got x-i R: 3x-3i, then I took the 3x-3i into x2+1 & got 1/3 x R: 1+i. Then I was going to take 1+i into 3x-3i. However that never ends it seems, unless I just confused myself...
  32. P

    Sorting Algorithm to Rearrange Zeros at End - Help Needed

    I just wrote a big long post on this algorithm I'm working on to solve the determinant of an nxn matrix, but I got booted before I could post so it's all gone! I'm brand new to this forum. As I was writing, I solved most of the problem, but I'm still stuck with a sorting algorithm that I...
  33. H

    Light Tracker Project: Seeking Algorithm Help

    Hi every body... I have a light tracker project, so i will use a photo transistor and pic 16f877 micro controller.. but until now i don't have a complete algorithm and efficient one, of how such a tracker should work. please send me a detailed algorithm of how such a tracker should work...
  34. P

    CFD Algorithm: Writing Simple CFD Code

    Dear all, Anyone can tell me about the algorithm to write a simple CFD code to solve a flow problem.starting from grid gen, solver,post results. pls refer some site providing sample codes.
  35. P

    2D CFD Code Development with SIMPLER Algorithm and C

    Hi, I like to start writing 2d CFD code for laminar flow using SIMPLER algorithm using c. help me from where i get information abt grid generation methods and GUI. If anyone had written such codes can guide me.
  36. M

    Symmetric polynomial algorithm?

    Let f, g \in \mathbb{Z}[x, y, z] be given as follows: f = x^8 + y^8 + z^6 and g = x^3 +y^3 + z^3. Express if possible f and g as a polynomial in elementary symmetric polynomials in x, y, z. Professor claims there is an algorithm we were supposed to know for this question on the midterm. I...
  37. K

    Division algorithm for polynomials

    Homework Statement M and N are positive integers with M>N. The division algorithm for integers tells us there exists integers Q and R such that M=QN+R with 0\leqR<N. The division algorithm for real polynomials tells us that there exist real polynomials q and r such that xM - 1 = q(xN - 1) +...
  38. F

    C/C++ Adaptive step size algorithm in c++ for runge kutta

    Hey guys, Attempting to write an adaptive step size function into a 4th order runge kutta integrator for basic orbits. The problems (so far) are as follows: 1.) The step size does not seem to change as one would expect if the recursive definition of the StepSize function was working...
  39. A

    Expansion Algorithm: Acceleration Over Time

    What is the algorithm for expansion acceleration (here) over time? I have had no luck finding this, maybe I was looking in the wrong place in the library.
  40. pslarsen

    Search Algorithm for Finding Special Cells

    I am writing a programme which has to find specific cells with special properties. I don’t know where the cell are located by I have a pretty good idea so my programme can actually make qualified guesses. When I have guessed on a cell and it’s not the right one I have to check the cells lying...
  41. M

    Gaussian Elimation with Partial Pivoting Algorithm by hand

    Homework Statement The Gaussian Elimination with Partial Pivoting algorithm when applied to the following matrix A[-3 0 4; 5 2 -6; 0 0 1] Will construct matrices P, L, and U 1- What are the defining properties of the matrices P, L and U? 2- What relation do P, L, U and A always satisfy...
  42. M

    Milikan's Experiment Lab - Euclidean Algorithm

    Homework Statement Hey guys I need help with a lab I'm doing that is similar to the Milikan's experiment. I am given 10 bags each holding the same item (Jellybean) of various quantities. Each bag has a different mass. What I'm trying to figure out is the mass of the individual item, so mass...
  43. F

    Help with Algorithm: Find Output for DPBB2B1-595B

    Can anyone figure out the algorithm that produces these outputs from the inputs? Then tell me the output for the last input? I am trying to find the algorithm and the last output. Thank you in advance. flmustang69 gmail :smile: INPUT 796LQ01-595B OUTPUT...
  44. 2

    Factorising Algorithm: Solving AC=R

    Hey guys, Very quick question. Can anyone recommend an algorithm for factorising a number (no more than 10,000,000) which will factorise a number into two smaller numbers both of which fall within predetermined limits? I'm trying to find a variety of solutions to the problem AC=R where R is a...
  45. W

    Finding randomization algorithm

    Hello all, I am currently attempting to take a set of data I have acquired and trace it back to the initial algorithm that produced it. My problem is my math level is only at the level of differential equations and I do not have any knowledge in advanced statistical analysis. Anyone have...
  46. Borek

    Algorithm for cluster finding (?)

    OK, I admit I have no idea what is the correct terminology, so could be thread title is completely off. Imagine I have a graph of links between www pages. I suppose some of these pages are clustered - that is, they are heavily interlinked, but they don't link so extensively to other...
  47. M

    MATLAB HELP: We need expert matlab programmer for our echo suppression algorithm.

    Hello we are currently doing our thesis about echo suppression. We already have the algorithm but we don't have any directions on how we can start with our MATLAB program. It's going to be a lot of DSP stuff. we would be glad to pay you if you could help us out/make our program. Our algorithm is...
  48. D

    Ising Model & Wolff's algorithm in FORTRAN

    Hi, I have the problema of implementing wolff's algorithm for ising model in 2-D lattice. Has anyone ever done this algorithm in FORTRAN ? I have questions of how to join the clusters. Alexandre
  49. D

    Need general algorithm for finding dual bases

    hi, this is my first post on this site so please excuse me (and correct me) if i am not posting according to the guidelines. im studying right now linear transformations and I am a bit shaky concerning dual vector spaces. i understand the definition but am not sure how to apply it. what...
  50. S

    What is the Risch Algorithm?

    Risch Algorithm? Hi all, Lately i came across an indefinite integral, and among its solutions one was using Risch Algorithm. However, the solution was not in detail, it was more of an outline, so i was curious to find out more about this algorithm which allows one to find the antiderivative...
Back
Top