what are algorithm's

Started by
8 comments, last by BloodXero 21 years, 2 months ago
EXACTLY WHAT IS AN ALGORITHM. ive been hearing it a bunch but i have absolutely no clue what in the world they are. What would Jesus do ... for a klondike bar?
http://politicalhumor.miningco.com/library/jokes/bljokefrenchjokes2.htm --- French Jokes
Advertisement
Hahahahahahahahahaha!!!!!!!!

Okay, now that I'm done laughing an algorithm is basically the steps taken to complete a problem. For example: a sorting algorithm is a bunch of steps that will result in a sorted array (or whatever data structure that is being used).

[edited by - YoshiN on February 9, 2003 8:23:18 PM]
-YoshiXGXCX ''99
thats it ... i was in such a big fuss over a set of steps to do something. well crap that sucks. o well, i know now. thx.

What would Jesus do ... for a klondike bar?
http://politicalhumor.miningco.com/library/jokes/bljokefrenchjokes2.htm --- French Jokes
quote:Original post by BloodXero
EXACTLY WHAT IS AN ALGORITHM. ive been hearing it a bunch but i have absolutely no clue what in the world they are.

What would Jesus do ... for a klondike bar?


Not to be rude or anything but a dictionary would have answered your question.

The definition of an algorithm might be quite simple, but the algorithms themselves don't have to be. In fact they *can* be downright "migraine-inducing"!

I plan at some stage to sit down with Knuth and work through his texts on the subject. Getting all excited just thinking about it

[edited by - Fingolfin on February 9, 2003 9:25:54 PM]
I once heard algorithims liked to a recipe - a recipe is an alogrithim for a cake or whatever ur making. Its exactly the same with coding, just the steps involved and the end product differ.
Hello,

www.encyclopedia.com:

algorithm
Related: Mathematics

(al´geriem) or algorism [for al-Khowarizimi, 9th-century Persian mathematician], a clearly defined procedure for obtaining the solution to a general type of problem, often numerical. Much of ordinary arithmetic as traditionally taught consists of algorithms involving the fundamental operations of addition, subtraction, multiplication, and division. An example of an algorithm is the common procedure for division, e.g., the division of 1,347 by 8, in which the remainders of partial divisions are carried to the next digit or digits; in this case the remainder of 5 in the division of 13 by 8 is placed in front of the 4, and 8 is then divided into 54. The software that instructs modern computers embodies algorithms, often of great sophistication.


Regards,
Deficte
Regards,
Deficte
quote:Original post by Spudder
I once heard algorithims liked to a recipe - a recipe is an alogrithim for a cake or whatever ur making. Its exactly the same with coding, just the steps involved and the end product differ.

Yeah, me too. I know that that is said in C++ Primer Plus (Stephen Prata), but I''m not sure whether that is where it originated from ... doubt it.

BloodXero: The GameDev.net Game Dictionary might be of some help if you ever encounter a similar problem. It is the second of the three links on the top right of the page, or you can click on the link I just gave you.

[ Google || Start Here || ACCU || MSDN || STL || GameCoding || BarrysWorld || E-Mail Me ]
[ Google || Start Here || ACCU || STL || Boost || MSDN || GotW || CUJ || MSVC++ Library Fixes || BarrysWorld || [email=lektrix@barrysworld.com]E-Mail Me[/email] ]
quote:Original post by YoshiN
Hahahahahahahahahaha!!!!!!!!

Okay, now that I''m done laughing an algorithm is basically the steps taken to complete a problem. For example: a sorting algorithm is a bunch of steps that will result in a sorted array (or whatever data structure that is being used).

[edited by - YoshiN on February 9, 2003 8:23:18 PM]


It''s not a stupid question; you''d be surprised at how many people do not understand what algorithms are. Most think they are formulas. I''ve had someone tell me that they thought one of my graphic programs was ''simply'' filling in a formula...

Dictionary.com definition:

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.



Jason Doucette
www.jasondoucette.com
Jason Doucette / Xona.comDuality: ZF — Xbox 360 classic arcade shmup featuring Dual Play
I''ve been doing more reading about Algorithms and I think we must be careful to simply say they are "like" a recipe and leave it at that. While an algorithm might be "like" a recipe in certain aspects I think it''s an oversimplification.

Volume 1 from "The Art of Programming" Donald E. Knuth, says there are 5 important features in any "algorithm".

1) Finiteness - An algoritm must always finish having followed a finite number of steps.
2) Definiteness - An algorithm must be defined precisely i.e. there must be no ambiguity as to what any step of an algoritm will do.
3) Input - An algorithm has zero or more inputs. They are given to the algoritm intially before it runs or dynamically while it is running.
4) Output - An algoritm has one or more outputs.
5) Effectiveness - "An algoritm is also generally expected to be effective, in the sense that its operations must all be sufficiently basic that they can in principle be done exactly and in a finite length of time by someone using pencil and paper".

One obvious requirement for an algorithm that a "recipe" lacks is definiteness. How do you unequivocally state this step "Fry lightly until brown"? This is one example of where the analogy falls down.

Anyway, I think this is a better definition of what an algorithm is.

This topic is closed to new replies.

Advertisement