The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> What is an algorithm?
pandy
post Jul 22 2018, 02:07 AM
Post #1


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Well, I know what it is, sort of. But I've never understood the difference between a (computer) algorithm and a short procedural program or script. Thought it's about time I find out. cool.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
CharlesEF
post Jul 22 2018, 11:18 PM
Post #2


Programming Fanatic
********

Group: Members
Posts: 1,981
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



I will admit that I don't know the 'official' meaning but I have always understood that a algorithm is a mathematical formula to perform a specific task. I wouldn't consider a computer program or script an algorithm.

Think about the day of the week. You could write a program or script to determine the day of the week. However, that program/script may be quite large. If you used an algorithm then you would only need a few lines of code. The algorithm would be the function call in that program/script.

I hope I haven't confused you more.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 23 2018, 12:48 PM
Post #3


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



QUOTE(CharlesEF @ Jul 23 2018, 06:18 AM) *

I will admit that I don't know the 'official' meaning but I have always understood that a algorithm is a mathematical formula to perform a specific task. I wouldn't consider a computer program or script an algorithm.

Think about the day of the week. You could write a program or script to determine the day of the week. However, that program/script may be quite large. If you used an algorithm then you would only need a few lines of code. The algorithm would be the function call in that program/script.

I hope I haven't confused you more.


Well, I was already confused so... tongue.gif

So you mean an algorithm is part of a program rather than a standalone program? But in that case, isn't it just a subroutine?

BTW I know there were math algorithms before there were computers, but I have no ambitions to understand those. tongue.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th April 2024 - 03:21 PM