The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages - More
> Software Design
|
What is an Algorithm?
Discuss What is an Algorithm? in the Software Design forum on Dev Shed. What is an Algorithm? Software design forum discussing design principles and non-language specific algorithms. Get help with logic, algebraic, or relational concepts.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

May 14th, 2002, 08:53 PM
|
 |
Happy Monkey
|
|
Join Date: Nov 2001
Location: UK (University of Kentucky)
|
|
|
What is an Algorithm?
I know I am showing my ignorance when I say this, but what is an Algorithm? How is it used and can I use it in my PHP scripts?
Thanks in Advance!
Sam Powers
__________________
|

May 15th, 2002, 05:33 AM
|
 |
yet another member
|
|
Join Date: Feb 2001
Posts: 262
Time spent in forums: 7 m 52 sec
Reputation Power: 13
|
|
|
Hi!
An algorithm is a non-ambiguous set of step-by-step actions to be taken in order to solve a problem. Often this is rendered in pseudo code (abstracted from any PHP or other).
A PHP program would be one (of many possible) implementations of this algorithm.
Am I missing something? Any informatics pros here?
Regards,
Atrus.
|

May 15th, 2002, 06:18 AM
|
 |
Wiking
|
|
Join Date: Sep 2000
Location: Sweden
|
|
Found this somewhere:
Algorithm is the process of abstracting the data, operations, and semantics of a problem, and then creating solutions out of those abstractions.
Info about the guy who is said to have invented this stuff-> http://www-groups.dcs.st-and.ac.uk/...-Khwarizmi.html
//NoXcuz
__________________
UN*X is sexy!
who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep
|

May 25th, 2002, 09:00 PM
|
|
Junior Member
|
|
Join Date: May 2002
Location: Canada
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
al·go·rithm n.
A step-by-step problem-solving procedure, especially an established, recursive computational procedure for solving a problem in a finite number of steps.
|

June 1st, 2002, 09:09 PM
|
 |
Contributing User
|
|
Join Date: May 2001
Posts: 465
Time spent in forums: 3 h 46 m 15 sec
Reputation Power: 13
|
|
|
Basically that's... programming! Except that it refers to actual code itself, as far as this forum is concerned, that's it.
|

July 5th, 2002, 10:26 AM
|
|
Canta como rafaé
|
|
Join Date: Feb 2001
Location: Barcelona
Posts: 74
Time spent in forums: < 1 sec
Reputation Power: 13
|
|
|
An algorithm is the process to solve a problem not necessarily depending on computers.
"sum 1 to the variable i" is implemented as $i = $i + 1 in PHP or i++ in C.
__________________
Thrasher
'Y se ahogaron los dooos
No eran duros pa pagar, cuñaaoo !!'
El vagamundo - El risitas y su cuñao
|

July 10th, 2002, 07:49 PM
|
|
Junior Member
|
|
Join Date: Jul 2002
Location: Belgrade, Yugoslavia
Posts: 7
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Algorithms
While most agree that algorithm can't be precisely defined in terms required for further manipulation, most "describe" it in a way as given above, or as a:
"description of proccesses involved in solving a particular task"
Though commonly used in computer science, it's roots are in mathematics, and that's what brings maths into computer science (actually vice versa, if we take a look at the history).
The main points about algorithms are:
1. what input is a particular algorithm expecting?
2. what output will it give if input was "correct" (as expected)?
3. what time will it take to complete ("efficiency" and directly related "complexity" of an algorithm)?
This means that given same input data, a particular algorithm is expected to give same output in about the same time (counted in time units particular for a machine type and speed), no matter what language it is implemented in (C, C++, Java, PHP, Perl, Python, and lots of others most probably never heard of).
There are several "formalizations" of algorithms, the most common one being the "Turing machine". With it, an algorithm is a description of a states and steps requried to compute something. This would require more formal understanding, so I won't discuss it anymore.
That's it.
|

July 12th, 2002, 03:12 AM
|
|
Contributing User
|
|
Join Date: Sep 2000
Location: Sydney, NSW, Australia
Posts: 40
Time spent in forums: < 1 sec
Reputation Power: 13
|
|
|
Algorithms and slightly different to pseudo-code. An Algorithm is much more descriptive, and doesn't contain mathematical symbols etc. Pseudo-code is the next step in the software development cycle. Someone goes through and translates the algorithms into descriptions closer to the actual programming language that it is to be translated into. Once this is done, the programmer converts the pseudo-code into the code that is to be used.
Algorithms and Pseudo-code are very important steps in the software development cycle. Algorithms really encourage good software design, and encourage you to find the best solution to a problem. Start using algorithms with your PHP, your code will turn out a lot better.
__________________
Cheers,
Michael Bray
|

July 22nd, 2002, 01:46 PM
|
|
Junior Member
|
|
Join Date: Jul 2002
Posts: 10
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
essentially, how to do it, not the specific code required.
Qin_23
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|