# Thread: What is the difference between one Algorithm and one Implementation

1. ## What is the difference between one Algorithm and one Implementation

Hello everyone ! I am thinking about the general concept of one ALgorithm.

Does exist real separation between algorithm and code in C (which is an implementation of algorithm)???

We can call one program as algorithm? Or only as "Implementation in C of C algorithm"

For Instance , We assume that we have the simple algorithm (comparison of 2 integers) :

Figure A (Algorithm in Pseudo-Code):

if a is higher from b

Put higher=a;

otherwise

if a is less from b

Put higher=b;

Figure B ( Implementation in C ) :

Code:
```

...

if(a>b)
higher=a;
else
higher=b;

printf("%d",higher);```
Now... We can call A as "basic algorithm" and B as "implementation in C of this algorithm" or also we can call B as algorithm in C? or (both of them? Implementation and algorithm????)

2. No, C does not know how to run pseudo-code. C is C... thus you need to write your "code" in C syntax.

3. Therefore algorithm is algorithm and C implementation of this algorithm is C implementation?

Can we call a C programm(code) as C algorithm???
Or Algorithm is Algorithm and when we use this concept
we actually mean the pseudo-code and not C or php or Python implementation????
This is what I am asking...

I understand that my question is not actually clear but I am trying to do clear....

Mr. Lnx

4. An algorithm is the set of steps you take to solve a problem, and C is a programming language. An algorithm is separate from any language, and can be expressed and implemented, in many different ways, including paper and pencil.

An algorithm is the set of steps you take to solve a problem, and C is a programming language. An algorithm is separate from any language, and can be expressed and implemented, in many different ways, including paper and pencil.
Hence , the summary is :

An algorithm is language independent unlike a computer program???

Mr. Lnx

6. as Adak points out... an algorythm is the plan from which you write your program.

7. Originally Posted by CommonTater
as Adak points out... an algorythm is the plan from which you write your program.
HMMMM Adak tolds me that an algorithm is different from any language and it can be expressed and implemented with many different ways. So it depends on a syntax of language (everytime) due to this difference it can be expressed and implemented in different ways .
Am I right???

I read here some very interesting and exact opinions and I want to summarize in my notebook these as a finally results.

Thank you

Mr. Lnx

8. Originally Posted by Mr.Lnx
Hence , the summary is :

An algorithm is language independent unlike a computer program???
An algorithm is everything independent. It is the process itself, pretty much an intangible thing.
Even pseudocode is really just a description or representation of an algorithm, typically not being able to be executed by machines in that form.
An implementation refers to one of potentially an unlimited number of possible representations of the algorithm, that can be executed by a computer.

9. Originally Posted by iMalc
An algorithm is everything independent. It is the process itself, pretty much an intangible thing.
Even pseudocode is really just a description or representation of an algorithm, typically not being able to be executed by machines in that form.
An implementation refers to one of potentially an unlimited number of possible representations of the algorithm, that can be executed by a computer.
Ok I get it!

Perfect definition , thank you!

thank all of you

Because with the combination of your answers I understood this basic concept of general programming

Mr. Lnx