What is an algorithm? |
What is an algorithm? |
pandy |
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.
|
CharlesEF |
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. |
pandy |
Jul 23 2018, 12:48 PM
Post
#3
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
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... 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. |
Lo-Fi Version | Time is now: 19th April 2024 - 03:21 PM |