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.
There's something that's been bothering me with the division algorithm for a while.
a = dq + r where r < |d| and a,d,q,r are integers. This can be used to find the multiplicative inverse of an integer in Z_m where m is an integer if certain conditions are satisfied. For example if I had two...
In the problems below A[1, ..., n] denotes an array consisting of arbitrary n real numbers, and A[j] denotes the element in the j-th place of the array A[1, ..., n].
1) Let k be a fixed natural number. Consider the family A_{k} of all arrays A[1, ..., n] satisfying that for every i ≤ n there...
Hi :smile:
This is a simple algothim problem,please help me solve it .I think its a greedy problem
Here it is:
-------------------
A native austratial named anatjari wants to cross a desert carrying only one bottle of water.He has a map that marks all the watering holes along the way...
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.
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...
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.
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...
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...
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...
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...
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...
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...
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...
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]]...
: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...
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...
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...
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...
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...
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...
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.
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...
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