Software Design
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreSoftware Design

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 14th, 2002, 08:53 PM
SammyK's Avatar
SammyK SammyK is offline
Happy Monkey
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2001
Location: UK (University of Kentucky)
Posts: 1,810 SammyK User rank is Sergeant Major (2000 - 5000 Reputation Level)SammyK User rank is Sergeant Major (2000 - 5000 Reputation Level)SammyK User rank is Sergeant Major (2000 - 5000 Reputation Level)SammyK User rank is Sergeant Major (2000 - 5000 Reputation Level)SammyK User rank is Sergeant Major (2000 - 5000 Reputation Level)SammyK User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 4 Days 7 sec
Reputation Power: 46
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
__________________

Reply With Quote
  #2  
Old May 15th, 2002, 05:33 AM
Atrus's Avatar
Atrus Atrus is offline
yet another member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 262 Atrus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.
__________________
Webmaster - Stefan Meier KG TABAKWAREN - Pfeifen, Premium-Zigarren, ... (_Ger)

Reply With Quote
  #3  
Old May 15th, 2002, 06:18 AM
NoXcuz's Avatar
NoXcuz NoXcuz is offline
Wiking
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Sep 2000
Location: Sweden
Posts: 3,608 NoXcuz User rank is Sergeant (500 - 2000 Reputation Level)NoXcuz User rank is Sergeant (500 - 2000 Reputation Level)NoXcuz User rank is Sergeant (500 - 2000 Reputation Level)NoXcuz User rank is Sergeant (500 - 2000 Reputation Level)NoXcuz User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 8 h 44 m 46 sec
Reputation Power: 25
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

Reply With Quote
  #4  
Old May 25th, 2002, 09:00 PM
DeSpYZ DeSpYZ is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2002
Location: Canada
Posts: 1 DeSpYZ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to DeSpYZ Send a message via AIM to DeSpYZ
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.

Reply With Quote
  #5  
Old June 1st, 2002, 09:09 PM
riv's Avatar
riv riv is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 465 riv User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.

Reply With Quote
  #6  
Old July 5th, 2002, 10:26 AM
Thrasher Thrasher is offline
Canta como rafaé
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Location: Barcelona
Posts: 74 Thrasher User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
Send a message via ICQ to Thrasher
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

Reply With Quote
  #7  
Old July 10th, 2002, 07:49 PM
towk towk is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Belgrade, Yugoslavia
Posts: 7 towk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.

Reply With Quote
  #8  
Old July 12th, 2002, 03:12 AM
Michael_Bray Michael_Bray is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Location: Sydney, NSW, Australia
Posts: 40 Michael_Bray User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
Send a message via ICQ to Michael_Bray
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

Reply With Quote
  #9  
Old July 22nd, 2002, 01:46 PM
Qin_23 Qin_23 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 10 Qin_23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
essentially, how to do it, not the specific code required.

Qin_23

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreSoftware Design > What is an Algorithm?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap