Algorithm Definition and 724 Threads

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

    Multiple birth and cut algorithm

    Hi there I have found an algorithm within the literature that is known as multiple birth and cut. It is in a word fantastic! It seems like it has the potential to solve a problem I have been fighting with. I have been tasked with detecting nuclei in histopathology images and so far the...
  2. J

    How Does the Modulus Operator Work in Coin Change Algorithms?

    only had a brief intro to algorithms like this Given an amount of money A between.01 and .99, this determines the breakdown of A into quarters (q) dimes (d) nickels (n) pennies (p) q:=A div 25 A:=A mod 25 d:= A div 10 A:= A mod 10 n:= A div 5 p:= A mod 5 I have to trace the...
  3. N

    Optimal algorithm for scanning servers.

    I'm writing a piece of software and need to find an optimal algorithm for scanning servers. Basically I'm given a list of N IP addresses, each IP address has two associated datetime values: The time the server was last known to be online and the time of the last connection attempt. Given these...
  4. B

    C# Can someone help me fix the loudness issue with my pink noise algorithm?

    Can someone go over the pink noise algorithm for ? I am not really understand how to make pink noise this is what I did : for (int n = 0; n < sampleCount; n++) { Frequency_Start = rnd1.Next(8); Frequency_End = Frequency_Start * 2...
  5. V

    Protein electrophoresis algorithm

    Hello I'm trying to implement a application that will scan the electrophoresis gels and draw a graphic of the proteins: albumin, alpha1, alpha2, beta1, beta2 and gamma. The problem is that the resulted graphic is not as it should be. Albumin percentage is too low and the rest of the proteins...
  6. J

    Algorithm to partition a complex equation into 2 master equations

    My Calculus tool is coming along. The only thing left is to write some it's helper functions, such as the one described below: void CalculusWizard::partitionEquation(const std::string & eq, std::string & eq1, std::string & eq2, CalcWizConsts::eqOps & oper) { /* Given an equation eq, partion...
  7. A

    MATLAB Optimization using genetic algorithm in matlab

    For my B.Eng project, I'm optimizing the thermal efficiency of a boiler using genetic algorithm in MATLAB. I'm finding it very tough to write my fitness function, constraint equations and upload my initial population which is a set of data from my case study plant. for boiler thermal...
  8. M

    Algorithm for assembling quadrilateral mesh in FEM

    Hi all, I have co-ordinates of 4 vertices of quadrilateral for every element in mesh. I assembled such elements by moving single, separate point in whole domain and compared it's coordinate with all vertices of quadrilateral. Above technique work properly, but it required rectangle element...
  9. J

    Java Javascript squareroot algorithm and machine epsilon

    So I made a little application to show the steps of approximating a squareroot using the Babylonian Method: http://jaminweb.com/squarerootCalc.html It's not working all the time. When I do the squareroot of 25 starting with an initial guess of 3.1, it works: Applying...
  10. E

    MHB Constructing a matrix version of the transformation algorithm?

    Algorithms like the transformation algorithm: $(x, y)$ --> $(\frac{x}{k} + p, ay + d)$ are not generally used in mathematics. Instead, we use matrices. Multiplying matrixes: you multiply a row of the first matrix by a column of the second. Use the following example: $ \begin{bmatrix}x & y...
  11. J

    I've reached a dead end in my algorithm

    I'm trying to write a function that takes as parameters two strings, textStart and textTarget, and prints out the steps necessary to transform transform the first into the second, with the allowed steps being: (1) Add a character somewhere in textStart (2) Remove a character somewhere...
  12. 1

    Can someone explain Euclid's Algorithm to me?

    My book is utterly useless - it vaguely gives me a history behind it, its motivations, and then lists an example in which it precedes to write a bunch of utterly false statements and then just.. spits out the answer. Can someone explain to me what on Earth is going on in the attached picture...
  13. chimath35

    Division Algorithm: Understand Unique c & d

    So, the division algorithm states that if a and b are integers with a>0 then there exist c and d integers such that 0<=d<a b=ac+d d and c are unique Now I don't understand d and c being unique. For example 4*3 + 3 = 15 where a=4 c=3 d=3 b=15 c and d are not unique, or maybe I don't...
  14. R

    Solving Algorithm Homework: PrintSpaces(j+1) Error?

    Homework Statement In the given picture below The Attempt at a Solution Im stuck after the begin How can I carry out the printSpaces(j+1) if the value of j wasn't given? Is there an error in the question or is there something that I am not seeing :/
  15. 5

    Algorithm for fibonacci sequence

    Homework Statement create an algorithm for a Fibonacci sequence that will return the f value in f(n) = f(n-1)+f(n-2) Homework Equations f(n) = f(n-1)+f(n-2) The Attempt at a Solution I have tried several ways to create an algorithm that will sum the two previous numbers but always end up...
  16. P

    Can we view the hanoi tower algorithm as the following way?

    the well known hanoi tower algorithm is as follow: public static void hanoi(int n,int a,int b,int c) ( if(n>0) ( hanoi(n-1,a,c,b); move(a,b); hanoi(n-1,c,b,a); ) ) my problem is : can we handle this algorithm in this method? we can regard three places as one place...
  17. J

    Need help designing an algorithm for similarities between words

    For fun, I'm trying to make a C++ program that takes a word from the user and comes up with an ordered list of suggested words, similar to the kind of thing you have on your cell phone when sending SMS messages. So far I have: An std::vector<std::string> of the 5000 most common English...
  18. A

    Comp Sci C++ Character Processing Algorithm

    Homework Statement Hey guys! Thanks for taking the time to help me out, I really appreciate it. I am in my second semester of college, taking my first C++ course, and I had never programmed before this class so I am kind of stuck on a problem. I have almost the entire assignment figured out...
  19. O

    Labeling Algorithms in LaTeX Thesis: Figures or Algorithms?

    I am using latex for my thesis. Should I label my algorithms as figures, or algorithms? If algorithms, how do I reference them in the text? For figures I say, (Fig. 1). For algorithms? (Algo. 1), (Algorithm 1)? Thanks
  20. esis

    MHB Algorithm for finding all the borders of R in all dimensions?

    Hey Guys! To begin with, I apologize if I am using the wrong terminology. I've just begun learning about linear algebra. So I was working on a problem in the book "Introduction to Linear Algebra" by Gilbert Strang, fourth edition (problems 9 and 11 on p. 8). Problem 9: If three corners of a...
  21. N

    Algorithm for Generating Percentage Amounts

    Hey guys, Not totally sure this thread belongs in this section, feel free to move. I'm trying to formulate an algorithm for an unusual problem. - Generate a pie chart with X number of wedges. - Each wedge is X percentage bigger then the one before it. - Percentage amounts of all...
  22. S

    Deutsch-Jozsa algorithm modification

    Homework Statement Suppose we have a function F: {0,1}^n -> {0,1} that satisfy the following promise: either 1)F evaluates to 0 on the first 2^(n-1) inputs and to 1 on the second 2^(n-1) inputs (inputs are in lexicographical order) OR 2)the number of evaluations to 0 in the first...
  23. T

    SVD Low-Rank Approximation Algorithm

    I'm looking for a concise description of an algorithm for low-rank approximation via SVD. I've seen a number of articles referring to Lanczos method and finding eigenvalues but nothing going all the way to determining all the matrices involved in the low-rank SVD of a given matrix. Any...
  24. T

    Using dual solution and max flow algorithm to find min cost flow

    Homework Statement For directed graph ##G=(V,E)## with edge capacities ##w:E\to\mathbb{R}^+##, edge costs ##c:E\to\mathbb{R}^+## and node balances ##b:V\to\mathbb{R}##, let $$\begin{array}{llr}\max & \sum_{e\in V}c(e)f(e) \\ \text{s.t.} & \sum_{(u,v)\in E}f(u,v)-\sum_{(v,u)\in E}f(v,u)=b(u) &...
  25. J

    What sort of Math do I need for a plagiarism detection algorithm?

    I'm trying to figure out the theory behind a simple plagiarism detection algorithm I'm making. The essence is that it's a function f:S×S→[0, 1] where S is the set of all strings and [0, 1] is the plagiarism quotient with 0 being no plagiarism and 1 being a completely copied string (that...
  26. 4

    Prove equivalence of elementary operations in Gauss Algorithm

    Homework Statement Prove that replacing one equation in a system of linear equations by a non-zero multiple of itself does not change the solution of the system. The Attempt at a Solution I'm still relatively new to proofs, so this is what I have come up with: Let S be a system of...
  27. O

    Graph Theory - Max. Independent set algorithm

    Graph Theory -- Max. Independent set algorithm Homework Statement Design a polynomial time greedy algorithm to compute a maximum independent set for a graph. Explain the algorithm and compute T_w(n). Homework Equations The Attempt at a Solution My terse and informal...
  28. Sudharaka

    MHB Minimal Polynomial Finding Algorithm

    Hi everyone, :) This is one of the thoughts that I got after thinking about finding the minimal polynomial of a matrix. I know that the minimal polynomial is easy to find when a matrix is diagonalizable. Then the minimal polynomial only consist all the distinct linear factors of the...
  29. Jameson

    MHB Log likelihood function and EM algorithm

    I'm going to start by asking about an example from class and then hopefully use that to work on the problem I need to solve. Here is an example: Let's say we have a multinomial distribution $x \sim M(n;.5+.25\theta,0.25(1-\theta),0.25(1-\theta),0.5\theta)$. The likelihood function of $\theta$...
  30. G

    Algorithm Time Complexity in Big Theta: Solving an Asymptotic Analysis Problem

    Homework Statement i've been asked to find the asymptotic time complexity of an algorithm in Big Theta 78045522000 + n^{2}log^{3}n + n^{3}logn + 200n + 45^{n} Homework Equations The Attempt at a Solution from my understanding Big Theta is a tight/exact bound, but I'm not...
  31. I

    Linear Algebra Matrix Addition Algorithm

    Homework Statement let L and M be two symmetric nxn matrices. develop an algorithm to compute C=L+M, taking advantage of symmetry for each matrix. Your algorithm should overite B and C. What is the flop-count? Homework Equations How to minimize the number of flop count? I want to make...
  32. A

    Java How to Adapt the Nelder Mead Algorithm for a Custom Function in Java?

    Hi This is a question somewhere between maths and numerical methods... I am using the algorithm for Nelder Mead found here: http://www.ssl.berkeley.edu/~mlampton/neldermead.java in java. It works nicely with the two example functions - rosen and parab. I am trying to adjust it to my function...
  33. .Scott

    Flexibility in Grover's Algorithm?

    Grover's Algorithm is a QM process for finding a high-scoring element in a large data base. (http://arxiv.org/abs/quantph/0010040) My specific curiosity if of a biological system that would generate a superpositioning of data that represented potential intentions, to estimate the...
  34. B

    Dsp algorithm for voice analysis

    What are good dsp algorithms for voices analysis? input from a computer microphone
  35. B

    Algorithm for Playoff Scenarios?

    If you follow professional golf, you know that the final playoff event before the Tour Championship starts tomorrow. During the regular season, in addition to tons of money, the players earn points according to how they finish in each event. The points charts are here...
  36. J

    Algorithm to find the submatrix with the greatest sum of its elements?

    This is a challenge problem I thought of: Given a real-valued matrix A, develop an algorithm that finds the submatrix with the greatest sum of its element. (If there's a tie, just return an arbitrary submatrix that's tied for the win.) Is there a way other than brute force?
  37. maistral

    Step by step algorithm to calculate VLE data from Redlich-Kwong?

    I keep on reading that VLE data may be calculated from the Redlich-Kwong. In line with this, I have these questions: 1) How accurate is the VLE data generated with the Redlich-Kwong as compared to using the vapor pressures to calculate these VLE data? 2) Can you guys give me a link, or even...
  38. C

    Best algorithm for an object that moves across an area

    Imagine a rectangular plane with dimensions X and Y. On that plane is a car. The car is about Z meters wide (the front bumper width, or up-down width in the image below). The car travels at a velocity v and moves across the entire surface as shown below: The car in the image above can move...
  39. J

    Can I Create a Fair Match Schedule for a Competition with Less Than 60 Teams?

    Hello, I am having a competition with up to 60 teams. My idea was to break the 60 teams into 10 groups of 6 teams each and run a Round Robin tournament for each individual group. Simple. Here is my problem: What if less than 60 teams show up to the competition (i.e. 58 teams)...
  40. I

    Hough algorithm to deskew an image

    https://en.wikipedia.org/wiki/Hough_transform http://www.codeproject.com/Articles/13615/How-to-deskew-an-image I follow the second link but since I am a complete novice in image processing, I am having a hard time to figure out what it is all about and how to determine the point to make the...
  41. J

    MHB Fleury's Algorithm: Finding Next Edge

    Using Fleury’s Algorithm in the graph to the bottom left, I deleted three edges and I got the graph to the bottom right. If I am currently at the starred vertex, list all possibilities for the edge I should travel next. A B Left graph 3 2 C D 1E F A B...
  42. C

    Combinatorics - UEFA Champions League Draw Algorithm

    Homework Statement I need to create a draw algorithm similar to the UEFA Champions League / Europa League draw. Example: I have 32 teams, up to 5 teams can be from the same country. I need to create: A) pairs (round robin style), no 2 teams from the same country can meet B)...
  43. J

    MHB How can an algorithm determine if a list is sorted?

    The question is as follows: "How does the algorithm know when the list is sorted?" Is this the correct answer to this question: The array is already sorted, but an algorithm does not know if it is completed. The algorithm need one whole pass without any swap to know it is sorted.
  44. B

    Algorithm for isotope distribution

    Does anyone know where I can find a clean algorithm into which the input is the number of atoms of each element in my molecule and number of isotopes of each element present in the molecule, the Ar of each isotope of each element, and the fraction of the element as a whole which that isotope...
  45. B

    Proving termination and correctness of the algorithm

    I've been trying to prove the following, without much success. Let ##B## and ##C## be nonempty finite subsets of an ordered field ##\mathbb{F}##. Define the swapping operation ##S## as follows: It takes an element ##b## from ##B##, an element ##c## from ##C##, removes ##b## from ##B## and gives...
  46. S

    Levenberg-Marquardt Algorithm for more than one function

    I have been looking how to use the Levenberg Marqurdt algorithm for minimizing the errors of two functions at the same time. I looked up this topic in the internet and the only useful thing I found was a thread between "I like Serena" and "thomas430" in summer 2011...
  47. matqkks

    MHB How best to teach the division algorithm?

    What is the best way to introduce the division algorithm? Are there real life examples of an application of this algorithm. At present I state and prove the division algorithm and then do some numerical examples but most of the students find this approach pretty dry and boring. I would like to...
  48. matqkks

    How best to teach the division algorithm?

    What is the best way to introduce the division algorithm? Are there real life examples of an application of this algorithm. At present I state and prove the division algorithm and then do some numerical examples but most of the students find this approach pretty dry and boring. I would like to...
  49. A

    Understand the Metropolis Algorithm - Physics Student Guide

    Can someone tell me how the Metropolis Algorithm selects configurations for further iterations? I am an undergraduate physics student and I don't know a lot of statistics. Also, I want to read more about the Metropolis Algorithm. Please help me with some good links. Thank You
Back
Top