– What is an algorithm?

849 views

– What is an algorithm?

In: 8

20 Answers

Anonymous 0 Comments

An algorithm is a series or parallel set of steps (often both) which can be followed to produce a specific result. Several analog examples of algorithms exist, but probably the most widely known are recipe cards and the description of a moving assembly line. Note when you are actually doing the thing, you are executing the algorithm, while the algorithm itself describes what you will so. In most cases, the term algorithm is used to apply to computer systems and other digital processes, rather than their analog counterparts. When one speaks of the YouTube algorithm, as an example, they are speaking of particular portions of the YouTube system which take a series of inputs (video, viewing data, likes, comments, subscriptions, rate of such activity over time, etc, etc) to produce particular outputs (recommending videos in “popular” or to specific viewers or at particular times of day or year).

It is also possible to think of an algorithm, especially secret algorithms, as a black box where you dump certain components into it, and a fancy new product comes out the other end.

Anonymous 0 Comments

An algorithm is a series or parallel set of steps (often both) which can be followed to produce a specific result. Several analog examples of algorithms exist, but probably the most widely known are recipe cards and the description of a moving assembly line. Note when you are actually doing the thing, you are executing the algorithm, while the algorithm itself describes what you will so. In most cases, the term algorithm is used to apply to computer systems and other digital processes, rather than their analog counterparts. When one speaks of the YouTube algorithm, as an example, they are speaking of particular portions of the YouTube system which take a series of inputs (video, viewing data, likes, comments, subscriptions, rate of such activity over time, etc, etc) to produce particular outputs (recommending videos in “popular” or to specific viewers or at particular times of day or year).

It is also possible to think of an algorithm, especially secret algorithms, as a black box where you dump certain components into it, and a fancy new product comes out the other end.

Anonymous 0 Comments

It is a process of computational rules which is designed to operate on some input of data to calculate and return some desired output. (E.g., a computer program that returns a statistical distribution of a list of birthdays, or a sorted list of names, or determines the “best” next play in a hand of blackjack.)

I use “computational” very generally here to describe rules that are rigorously bounded by logic–not rules that require a literal computer. If you were tasked to physically sort people in a queue according to rules and criteria written on a piece of paper, those written instructions could be fairly said to be an algorithm.

Anonymous 0 Comments

It is a process of computational rules which is designed to operate on some input of data to calculate and return some desired output. (E.g., a computer program that returns a statistical distribution of a list of birthdays, or a sorted list of names, or determines the “best” next play in a hand of blackjack.)

I use “computational” very generally here to describe rules that are rigorously bounded by logic–not rules that require a literal computer. If you were tasked to physically sort people in a queue according to rules and criteria written on a piece of paper, those written instructions could be fairly said to be an algorithm.

Anonymous 0 Comments

It’s literally just a set of instructions, usually math based. It’s what order to perform certain calculations in. When you hear about something like “the YouTube algorithm”, they are assigning different weights and metrics to videos based on your watch time and what you watch, and then run a series of calculations to compare that to what other users are watching. The goal is to go “well you like physics content and watch a lot of Physics Girl and Action Lab. Other people that watch Physics Girl and Action Lab also enjoy these creators / topics.”

Anonymous 0 Comments

It’s literally just a set of instructions, usually math based. It’s what order to perform certain calculations in. When you hear about something like “the YouTube algorithm”, they are assigning different weights and metrics to videos based on your watch time and what you watch, and then run a series of calculations to compare that to what other users are watching. The goal is to go “well you like physics content and watch a lot of Physics Girl and Action Lab. Other people that watch Physics Girl and Action Lab also enjoy these creators / topics.”

Anonymous 0 Comments

It’s just a set of steps, a set of instructions.

This is an algorithm.
1. Take off your clothes
2. Get into the bathtub.
3. Turn on the water
4. Soap up your body
5. Scrub!
6. Rinse all the soap off
7. Turn off the water
8. Step out of the tub
9. Dry off with a towel

That’s a simple one, but there are algorithms for doing some pretty complicated things:

* There’s an algorithm for figuring out the 100th digit of Pi.
* There’s an algorithm for figuring out your monthly mortgage payment given the purchase price and interest rate.
* There’s an algorithm for comparing one file against another on your computer.

*Typically*, the term “algorithm” is used when talking about steps taken in mathematics or computers.

Anonymous 0 Comments

It’s just a set of steps, a set of instructions.

This is an algorithm.
1. Take off your clothes
2. Get into the bathtub.
3. Turn on the water
4. Soap up your body
5. Scrub!
6. Rinse all the soap off
7. Turn off the water
8. Step out of the tub
9. Dry off with a towel

That’s a simple one, but there are algorithms for doing some pretty complicated things:

* There’s an algorithm for figuring out the 100th digit of Pi.
* There’s an algorithm for figuring out your monthly mortgage payment given the purchase price and interest rate.
* There’s an algorithm for comparing one file against another on your computer.

*Typically*, the term “algorithm” is used when talking about steps taken in mathematics or computers.

Anonymous 0 Comments

Let’s say that I gave you a shuffled stack of cards with a bunch of different people’s names on them, and told you to put them in alphabetical order. How would you do it?

Well, there’s a few ways. You could start laying the cards out in a line, roughly where you expect them to be in the alphabet. Then add cards on either side of the ones you already put down, depending on the letter. Or maybe you could flip through all the cards, pull out all of the A names, then go back through and do it again for all the B names…

Some of these ways will be faster than others. But you could write your way down as a set of simple instructions that anyone else could follow with their own set of names to sort. That set of instructions — the process by which you sort the cards — is an algorithm.

Remember, that computers are very, very stupid. They are very good at following very precise instructions, but they are not good at thinking on their own. If you want a computer to sort names in alphabetical order, you need to tell them exactly how to do it. Some of those ways will be super fast, where other ways might take the computer a while.

Computer scientists like to come up with many different clever ways of doing things like sorting names. The actual code, or which computer coding language you use to actually write the algorithm, isn’t as important as making sure the algorithm is efficient and well designed. If you have millions of names to sort, the right algorithm might be hundreds of times faster than a slower one.

When Facebook had to write it’s “news feed“ feature, someone needed to design the specific set of instructions and criteria that determine which posts get put into your feed. These rules are an algorithm. These days in pop culture, it’s just called “the algorithm“ because the exact set of rules are secret, and Facebook won’t tell you exactly what they are.

Anonymous 0 Comments

It is just a structured way of solving problems.

In computer science we usually mention an algorithm in the context of recursion; which means you call the same set of instructions multiple times to achieve an end result.

Say you have algorithm ‘mow lawn’, you might look at your lawn and say:

1 – Retrieve mower
2 – Start mower
3 – Mow row 1
4 – Mow row 2
5 – Mow row 3
6 – …7
7 – Pick up clippings
8 – Wake up neighbors with leaf blower
9 – Store all equipment

You can do that same task with recursion, and you can generalize it against lawns of all shapes and sizes by calling ‘mow row’ repeatedly and using general method to determine how many times you need to call the mow row function. Without recursion I have to program my instructions bespoke to the lawn I intend to mow. With recursion I can measure things and instead of listing out each row I need to mow; I might do something like:

1 – Measure the mower deck
2 – Measure the unmowed lawn
3 – x = width of (unmowed)lawn
4 – y = width of mower deck
5 – While x > y mow row <– I repeatedly mow until x is now longer greater than y, which should leave one strip (you don’t want to say ‘while x >= y’ because then you will never leave the loop)
6 – Mow last row
7 – Pick up clippings
8 …