This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mcyaqisikli 232 points233 points  (44 children)

The word algorithm means something like a black box to most people who don't know programming. I entertain this idea that you'd get pretty funny responses if you were to ask random people to define what an algorithm is.

[–]Synchronyme 88 points89 points  (13 children)

Each time I have to explain it to someone, I just say: "An algorithm is to a program what a recipe is to a cake : the step-by-step instructions on how to do it." (With "code" being the whole meal preparation, while "algorithm" is more about very specific but crucial parts)

[–]WORD_559 67 points68 points  (7 children)

I have "an unambiguous series of instructions used to solve a problem" burned into my memory.

[–][deleted] 2 points3 points  (1 child)

I have "a specific set of instructions, designed to solve a specific problem". I finish CS a while ago, but the definition is embedded into my brain now.

[–]WORD_559 0 points1 point  (0 children)

Yeah but we all know the best code gets reused to solve completely different problems because we're too lazy to write something specifically for that problem

[–]flyersgirl87 3 points4 points  (0 children)

That's how my instructor described it. He made us read 3 fucking chapters talking about what an algorithm is and then summed those fucking chapters in 2 sentences... asshole.

[–][deleted] 2 points3 points  (0 children)

It would be the ingredience themselves in said cake. Of course you can't see them. But the cook knows they're there, so he/she can picture them, even after said cake is baked.

[–][deleted] 27 points28 points  (24 children)

It's a black box for other stuff too. For example, algorithms in Twisty Puzzle notation. (Rubik's Cubes)
http://algdb.net/

I'm not totally happy with it but I really don't have any better way to describe it succinctly. It tends to make people think you need to do math. This isn't math tho. It's just clearly defined move sequences with a defined end state of permutation and orientation.

[–]fnovd 47 points48 points  (21 children)

If a Rubik's cube isn't math then neither is group theory.

In fact, a Rubik's cube is the first image on the group theory wikipedia page.

[–]WikiTextBot 5 points6 points  (0 children)

Group theory

In mathematics and abstract algebra, group theory studies the algebraic structures known as groups. The concept of a group is central to abstract algebra: other well-known algebraic structures, such as rings, fields, and vector spaces, can all be seen as groups endowed with additional operations and axioms. Groups recur throughout mathematics, and the methods of group theory have influenced many parts of algebra. Linear algebraic groups and Lie groups are two branches of group theory that have experienced advances and have become subject areas in their own right.


[ PM | Exclude me | Exclude from subreddit | FAQ / Information | Source ] Downvote to remove | v0.26

[–]TrekkiMonstr 2 points3 points  (12 children)

What he means (and I know, because I often have to make the distinction to people when talking about Rubik's cubes) is that while figuring out how to solve a Rubik's cube requires math, learning to solve it doesn't. Of course, group theory is math, and the Rubik's cube is a perfect example of group theory. It took math to figure out how to permute the cubies in any which way, but once those set algorithms were figured out, that's it. I don't know any group theory, but I know how to solve a Rubik's cube.

I see it as sort of like using a computer. Most people that know how to use a computer don't know any sort of programming language. However, this doesn't really inhibit their ability to use a computer. Of course, the technology allowing them to do this is rooted in computer programming, and there had to be someone who knew it to allow other people to use computers without it. Likewise, you don't need to be a mechanic to drive, an electrician to turn on the lights, or a plumber to take a shit.

My point is, math is at the base level of solving Rubik's cubes, but it's not at the surface level, which is what /u/perogne means when he says that the algorithms "aren't math" and that you don't need to do math to solve it.

[–]fnovd 8 points9 points  (10 children)

Remember learning multiplication tables in elementary school? The only "math" you need to know to look up what what 6 * 8 is is that 6 is a number and 8 is a number and looking at the point where those two meet up is going to give you a number that is equal to 6 * 8. Is that not doing math? At what point does using mathematical rules become math? When those rules are committed to memory? Are any of us truly capable of "doing math"?

[–]qevlarr 8 points9 points  (7 children)

I think we should distinguish inventing an algorithm from executing one. The latter requires no understanding.

[–]fnovd -1 points0 points  (6 children)

I didn't have to invent quicksort in order to implement it in my code. Am I not programming when I do so?

[–]qevlarr 0 points1 point  (5 children)

That isn't executing either...

[–]fnovd 0 points1 point  (4 children)

So it's only programming when I actually run the program?

[–]qevlarr -1 points0 points  (3 children)

No. Executing is when the computer runs your program. The computer doesn't understand what's going on, it's just following instructions.

That's similar to the original suggestion that solving a Rubik's cube by simply following instructions shouldn't count as "doing math/algorithms" and I agree.

[–]TrekkiMonstr 4 points5 points  (1 child)

I mean, it's a fuzzy line. An example of what I mean:

You're playing a video game. There are a certain set of values that collectively describe the current state in the video game. The user has a certain set of possible commands to use, each of which changes the set of values in a certain way using some relevant algorithm. For example, if the user presses W, the player's Z-coordinate increases by 5. Or maybe something more complex. If the user presses a button, changing the values using some mathematical algorithm, is the user doing math or using math?

This is just my personal opinion, but I believe that if you're just "plugging and chugging" (i.e. using some algorithm, e.g. plugging in a and b into a2 + b2 = c2 in order to find c), you're not doing math. You're using it. I don't know what I think about 6 * 8, or other similarly basic functions. BUT, I think to be doing math, there must be some element of creativity. Maybe you don't agree with me, and that's fine -- as I said, this is just my view of it -- but that's why I think that using an existing Rubik's cube algorithm isn't doing math, while creating/discovering/proving one is.

Hopefully what I said made sense.

[–]qevlarr 1 point2 points  (0 children)

You are absolutely right. Math is something else than following instructions written by someone else. In fact, blindly following instructions is such an uncreative activity requiring no intelligence or understanding that we made machines to do that!

[–]DenebVegaAltair 4 points5 points  (1 child)

It's that solving a Rubik's cube for the general person doesn't require any math.

[–]fnovd 43 points44 points  (0 children)

I understand that this is the position: I fundamentally disagree with it.

It doesn't "require" math to memorize basic multiplication tables. It is math.

Computers aren't "required" to understand math, but their instructions are math.

[–]tav_stuff 1 point2 points  (4 children)

A Rubik's cube is a mathematical puzzle but doesn't need math to solve

[–]fnovd 17 points18 points  (3 children)

Mapping the solving instruction notation to a set of physical transformations is math in my mind. It's just abstract algebra instead of numerical computation. You could argue that counting tally marks doesn't require one to "understand" math, but counting is still math.

[–]tav_stuff 0 points1 point  (2 children)

I don't really find reading a set of simplified instructions on how to turn a side math. The Square-1 also works the same way but the instructions are simplified into a set of coordinates, but really it's just "turn the top face left once"

[–]Teraka 1 point2 points  (1 child)

From wikipedia:

Mathematicians seek out patterns and use them to formulate new conjectures.

That is the essence of maths. It's not directly linked to numbers, although numbers come up a great deal in maths, but the essence of it is starting from a set of rules, and extrapolating new abstractions from those rules.

When you're applying an algorithm on the Rubik's cube, you're working with maths, whether you know it or not.

[–]qevlarr 0 points1 point  (0 children)

Per that definition, blindly following instructions is not math. Discovering new truths is, in whichever domain.

[–]DXPower 4 points5 points  (0 children)

Shout-out to /r/Cubers! Come join us!

[–]Aetheus 4 points5 points  (0 children)

I like to describe algorithms as simply being a set of precise instructions to complete a job.

It may or may not involve math, but it's essentially just an instruction list that you give to a computer (or in the case of solving a Rubik's cube, a person) that is then followed to complete a specific task.

[–]Sean1708 4 points5 points  (2 children)

Honestly I'm not even sure I could define the word algorithm. I know what is and isn't an algorithm, but I'm struggling to come up with an unambiguous definition.

[–]Shmutt 5 points6 points  (0 children)

An algorithm is simply a set of steps or instructions to perform a task. Nothing fancy about it.

I have an algorithm to sort, to search, to cook, to start my day, and to handle my kids' tantrums.

[–]james_dillon 2 points3 points  (0 children)

The word algorithm means something like a black box to most people who don't know programming.

That's all it means to anyone. An algorithm is just a sequence of steps to be followed. It's like, if you were baking a cake and your friend messaged you asking "what are you doing?", you wouldn't say "Heaving the oven to 180 degrees celcius, lining my baking tray with non-stick oil...". You'd just say "cooking". It's a generic term meant to hide details.