Algorithms: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 2: | Line 2: | ||
===What does algorithm mean?=== | ===What does algorithm mean?=== | ||
A | A mechanical, fairly detailed description of getting a particular thing done, a particular method towards a particular goal | ||
If you ask "how does this thing do X" and you get a detailed, technically satisfying answer, that could be considered an algorithm. | |||
This isn't ''exclusive'' to math or computation, but that's where we use the term most. | |||
...to differing standards. Say, | |||
* users may be happy enough when a site mentions that it presents videos based on preference | |||
* programmers may not call something an algorithm when it's only specified at the level of "and then it reweigh videos based on user tags", | |||
: but only once it is unambiguous, possibly pseudocode, or already concrete enough to just run. | |||
Around algorithmics, we try to be precise ''enough'' | |||
: and prefer simple, well-contained questions, for single tasks, such as "how similar are these two words?" or "how do we sort a list?", | |||
: over more complex such as "how do we evaluate a weather forecast for the next day?" or "how do we distribute processing power between running programs" | |||
Note it refers to the method only -- excluding details like the data you feed into it, or the hardware it runs on. | |||
Line 36: | Line 43: | ||
There are a lot of things you can describe fully with words, and a little math. | There are a lot of things you can describe fully with words, and a little math. | ||
Say, bubble sort is an algorithm that, in English, goes something like "step though a list one at a time. At each position, look at the pair. If the are not in the right order, swap them. Repeat going through the list until you didn't need to swap anything". | |||
Writing down the same in [[pseudocode]] is not much longer than that, and might include some more edge cases the above does not explicitly mention, even if you would need to rewrite it into ''actual'' code before it actually would run. | |||
even if you would need to | |||
Line 52: | Line 51: | ||
Note that neural nets aren't algorithms in this sense, | Note that neural nets aren't algorithms in this sense, | ||
because while we know how they function, | because while we know how they function, | ||
they entangle everything they do in one fuzzy mess. | they do not function without data - in fact they entangle everything they do in one fuzzy mess. | ||
In particular, they entangle ''what'' runs into ''how'' it is evaluted. | In particular, they entangle ''what'' runs into ''how'' it is evaluted. | ||
The software becomes part of the | The software becomes part of the execution environment in a way, | ||
which is something programmers typically kept separated. | which is something programmers typically kept separated. | ||