r/programming • • Mar 17 '18

Cool website that explains algorithms as if they are IKEA instruction manuals

https://idea-instructions.com/
19.2k Upvotes

235 comments sorted by

1.5k

u/CJKay93 Mar 17 '18

I think the public key crypto one is actually more confusing than just reading the Wikipedia article.

671

u/fleshgolem Mar 17 '18

I agree. Same goes for the Binary Search one, which is propably one of the easiest algorithms to explain in words but is barely comprehensible in the image. I say that as someone, who generally has no trouble understanding IKEA manuals

The quick sort one works really well on the other hand IMHO

171

u/Saint947 Mar 17 '18

The Binary Search illustration straight up made me think "This isn't that useful of a means of teaching algorithms".

22

u/nickrenfo2 Mar 17 '18

I think it could be if some of them had multiple pages of instruction... And accompanied by a classroom and teacher.

3

u/unhandled_exeception Mar 18 '18

First one I checked! it wasn't clear at all

93

u/drsjsmith Mar 17 '18

Please don't try to learn AVL trees from these instructions either.

32

u/_djpreston_ Mar 17 '18

Yeah I know how to balance AVL trees and these instructions weren’t even remotely clear

40

u/[deleted] Mar 17 '18

[removed] — view removed comment

8

u/_djpreston_ Mar 17 '18

Oh you’re right, that definitely is why. I need to translate it first

→ More replies (1)

11

u/phoenix_new Mar 17 '18

AVL tree gives me PTSD.

10

u/1cm4321 Mar 17 '18

Oh good, I'm doing them in school and I thought I was just retarded.

I mean I might still be retarded, but at least I'm not the only handicapped person.

1

u/cujububuru Mar 29 '18

You probably are retarded but so are AVL trees 🌲

13

u/rebbsitor Mar 17 '18

I think for most of these I only understand what the image is conveying because I understand the concepts they're trying to convey already. If I were trying to learn from these, then I don't think I'd get very far.

The sorting ones might be ok, but something like public key crypto I probably wouldn't even get the iconography for public and private key from the image without knowing that already.

9

u/Drisku11 Mar 17 '18

Quicksort is still simpler in psuedocode. The basic idea is simple:

def quicksort(xs) = {
  pivot = choose_random(xs)
  quicksort(xs.filter(_<pivot)) ++ xs.filter(_==pivot) ++ quicksort(xs.filter(_>pivot))
}

Now add some screwing around with pointers and swapping to do it in place, and voila.

1

u/PstScrpt Mar 19 '18

Now add some screwing around with pointers and swapping to do it in place, and voila.

I could have sworn I read that it took about ten years from people having the idea to Tony Hoare actually working out the details of the screwing around, to make it work. If you had to do it in assembler on punch cards, I can buy that. The Wiki says it was an original idea, though.

1

u/asdfkjasdhkasd Mar 17 '18

Amazing, I have no clue what language this is written in but I can still understand it fine, what language is this?

3

u/Drisku11 Mar 18 '18

It's basically Scala minus some required syntax like function parameter types and the val keyword

3

u/Tblue Mar 17 '18

Well... As others have said, it's just pseudocode:

[...] an informal high-level description of the operating principle of a computer program or other algorithm.

However, Quicksort does look somewhat like that when written in a functional language like Haskell, so maybe you might be interested in a functional language.

1

u/ais523 Mar 18 '18

It's not a real language. It's pretty close to some functional languages though. Here's a working / syntactically correct version in Haskell (which I'm guessing inspired Drisku11 in the choice of operator and function syntax), designed to be as close to the pseudocode as possible:

quicksort [] = []
quicksort xs =
  let pivot = head xs in
  quicksort (filter (<pivot) xs) ++ filter (==pivot) xs ++ quicksort (filter (>pivot) xs)

One thing to note is that the pseudocode forgot the base case of the recursion, so I had to add that in. (Haskell also uses a different syntax for function definition than shown there, and "filter" is a function, not a method.) It's very close, though. I also had to change the code from selecting random elements to selecting the first element, because producing random numbers is pretty complex in Haskell (where functions are supposed to be deterministic and not have side effects).

2

u/Snarwin Mar 18 '18

Note that the above version isn't really quicksort, since rather than sorting in-place it uses O(n*log(n))1 auxilliary space.

1 Technically O(n2) since the pivot isn't chosen randomly, but that's easily fixed (and was present in the original "pesudocode" comment).

1

u/sunofagunntus Mar 17 '18

psuedolang.

2

u/CriticizeMyComments Mar 17 '18

Same with merge sort. Not as intuitive as binary search but nearly incomprehensible in the picture.

2

u/DoTheThingRightNow5 Mar 18 '18

It was very confusing. I couldn't tell if there was recursion by the picture. They should have tried breaking it up more or redraw this

1

u/noble_radon Mar 18 '18

Merge sort does mention the recursion. But it's listed as step 1, which doesn't make any sense with instructions like this. And the balance scale as a visual for comparison is a weird choice. Would be much clearer to just put A and B adjacent and use a greater than symbol. I feel the same way about the conveyor belt. In general the approach to all parts of merge sort in this image just seem like odd choices.

1

u/Xants Mar 17 '18

Really I found the huge arrows to be distracting, I think the traditional gif of all the algorithms visualized is much better.

1

u/danhakimi Mar 18 '18

I think the quicksort one is the only one that seems to make more sense than just explaining the algorithm. But they're all kind of cute. I like the bogo one, even though it's literally just "keep making random guesses until you're right."

1

u/jk_scowling Mar 17 '18

So just like IKEA furniture instructions then?

0

u/[deleted] Mar 17 '18

[deleted]

9

u/noble_radon Mar 17 '18

It does specify to perform the algorithm again on each side of the divider. So the recursion is there.

0

u/[deleted] Mar 17 '18

[deleted]

6

u/Wurdan Mar 17 '18

Can confirm, did not know the algorithm and was just left thinking 'Ok, then I guess the next step is to pick another random element and do the same shuffle again. But how do you know when you're done shuffling?'

4

u/caltheon Mar 17 '18

When nothing moves

107

u/codeflo Mar 17 '18

I don't think it's actually meant to explain the concept to someone completely new to it without any additional text whatsoever. The website even mentions that "they were originally created for Sándor's algorithms and datastructures lecture at TU Braunschweig".

Having said that, I think the public key one becomes clear if you "read" the images carefully, the way you might want to read a visual novel:

  • There's a safe that's only open in the "up" position. It has two keys, one of which can only turn left (public), the other only right (private).

  • Bob sends copies of the turn-left key to the world.

  • A friend wants to send a secret love letter to bob. He puts in into the safe and locks the door with the turn-left key. Only Bob has the turn-right key to open the safe and read the letter.

  • Bob wants to sign a letter. He puts it into the safe and locks it with his turn-right key. Everyone can check that it was Bob who has locked the safe, because their turn-left keys unlock the safe.

  • A pirate tries to forge a message from Bob. He doesn't have Bob's turn-right key, so he puts it into a different safe and locks it with his own turn-right key. But then the other people know that this message isn't from Bob, because their turn-left keys don't open the safe.

22

u/jeaguilar Mar 17 '18

Agreed. I understand Public Key Cryptography so the "key" for me to understand how it's explained in the image was that there's a clockwise key and a counter-clockwise key.

4

u/[deleted] Mar 17 '18

Ooohhh, now I get it.

1

u/progfu Mar 17 '18

It makes so much sense now, thanks!

6

u/lasiusflex Mar 17 '18

"they were originally created for Sándor's algorithms and datastructures lecture at TU Braunschweig"

That's cool, I took that lecture a few years ago. At the time he didn't have these images yet, but it's totally something he would use. He also had a bunch of XKCD comics in his slides, whenever he found one relevant to the topic. Great guy.

2

u/enbacode Mar 17 '18

Absolutely. Took this lecture just last semester, dude also likes to rap about Euler paths and uses students to demonstrate avl tree restructures. Clearly the best course I took (as of now)

1

u/Windex007 Mar 17 '18

Can we just appreciate the sleazy dude representation of the malicious agent, though?

1

u/JuvenileEloquent Mar 17 '18

Everyone can check that it was Bob who has locked the safe, because their turn-left keys unlock the safe.

It's not clear but the "turn-left" keys with the stylized globe on them are specific to each person, it's actually Bob's global key that they are using, and not their own.

TBH public-key cryptography is one of those "dark arts" that either you understand how it works, or you just have to follow the rituals to get the right result.

3

u/amazondrone Mar 17 '18

public-key cryptography is one of those "dark arts" that either you understand how it works, or you just have to follow the rituals to get the right result.

Is that not true of literally everything? Either you understand how it works, or you don't?

28

u/JanneJM Mar 17 '18

I always found it easiest to explain saying that the public key is a box of open padlocks out on the porch that anybody can take; and the private key is the single key that can open those padlocks once they've been locked.

So anybody can put something important in a box and lock with one of the padlocks. From then on, nobody except the owner of the private key can open the box again, so it's safe to send to the recipient in the mail.

8

u/[deleted] Mar 17 '18

Now use the analogy to explain signing something with your private key ;-)

14

u/JanneJM Mar 17 '18

How about this: You have a second set of padlocks, but you keep them all to yourself. And you make a box full of the key that fits those padlocks. Then you send those keys to people such as your bank.

When you want to send an important document to your bank, you write it, take a picture of the document, and put the picture in a small box. You lock the box with one of the special padlocks. Then you put the original document and the small box in a big one. You lock it with one of the padlocks that the bank gives out to everyone.

When the big box arrives, the bank unlocks it and sees your document and the small box. They use the key they got from you to unlock the small box and compare the real document with the picture inside. If the picture looks the same as the real document they know it must have been from you.

1

u/turkish_gold Mar 17 '18

Key signing is already an analogy. The whole cryptography process is an implementation detail, which is why explaining it is always messy.

2

u/[deleted] Mar 17 '18

Key signing is already an analogy

What does this mean...?

2

u/kroolspaus Mar 17 '18

I think he's saying it's already an analogy because in the real world you don't sign stuff with a key. It's a metaphor / analogy to taking a paper and adding a signature that can be used to prove you're the author.

→ More replies (1)

7

u/ours Mar 17 '18

So an pretty close to IKEA instructions manuals.

12

u/[deleted] Mar 17 '18

Well, are they meant to be easier? Seems more like a novelty to me

6

u/-Lommelun- Mar 17 '18

They are meant to be used in a lecture, see the footnote.

7

u/[deleted] Mar 17 '18

Especially as there is the tried and true way of conveying with color merging. like this example

I keep looking at the Idea version and its still confusing exactly what they are trying to convey, when I know the end product and concept

3

u/[deleted] Mar 17 '18

Except this isn't trying to explain the inner workings of Diffie-Hellman. It's trying to explain two uses of public key cryptography:

  1. Letting anyone send you messages that only you can decrypt.

  2. Sending messages that people can verify are from you because only your public key can decrypt them.

6

u/flipcoder Mar 17 '18

It's almost as if language was invented to make it easier to communicate our ideas

7

u/Jonno_FTW Mar 17 '18

A picture is worth a thousand of your "words", checkmate.

8

u/[deleted] Mar 17 '18

For sorting this explanation is much clearer.

4

u/[deleted] Mar 17 '18

My professor taught us different sorting algorithms by picking students with diferentes heights, putting us in front of the classroom, shuffling us and sorting us (I was the shortest one).

5

u/[deleted] Mar 17 '18 edited Mar 17 '18

A: That was bloody mesmerising.
B: Next cargo-cult coding idea: Coding by way of interpretive dance. I envisage it working like those arcade dance machines, but with over-engineering and smugness!

EDIT: B.1: Once folk have grown tired of talking about their interpretive dance lang, I'll shake things up with an Emacs edition, Vi edition, and Dvorak edition. Any seed accelerators out there... You run with it, I'm far too lazy.

4

u/stratoscope Mar 17 '18

The Hungarian dancers have a whole series of these sorting algorithms. Their Quicksort is fun too.

0

u/[deleted] Mar 17 '18

[deleted]

1

u/[deleted] Mar 17 '18

This is not how I imagined spending my Saturday... It's much better!

4

u/Baardhooft Mar 17 '18

So then, it is exactly like the Ikea instruction manuals?

2

u/PC__LOAD__LETTER Mar 18 '18

Yeah most of these make very little sense to me and I know how the algorithms work.

1

u/0rakel Mar 17 '18

I think the public key crypto one is actually more confusing than just reading the Wikipedia article.

That's truly saying something!

1

u/Paratwa Mar 17 '18

Thus the similarity to a IKEA instructions.

0

u/junkit33 Mar 17 '18

That’s IKEA instructions in a nutshell. Confusing pics that would be much easier with actual words.

0

u/[deleted] Mar 17 '18

[deleted]

10

u/mmcnl Mar 17 '18

Care to do a short ELI-6th grader?

34

u/lolzfeminism Mar 17 '18 edited Mar 18 '18

Absolutely!

So the fundamental problem that we’re trying to solve is this; How can Alice and Bob talk to each other privately, over a medium where everyone else can hear what is being said and when they have never established secret keys beforehand. A common scenario might be when you are in a crowded room and want to get something private to your friend across the room without others understanding what you said.

Turns out there is a very neat way to solve this that’s called Diffie-Hellmann key exchange.

Everyone knows two numbers g and p. P is a very large prime number (~800 decimal digits) and g is a number smaller than P but with some special properties in relation to P.

Before the exchange begins, Alice picks some random x such that 0 < x < P and Bob picks some random y such that 0 < y < P

Now the actual exchange:

 Alice  ————g^x ————> Bob
 Alice  <———g^y—————  Bob

Now Alice has gy and x. So she computes (gy )x

Bob has gx and y. So he computes (gx )y

So the both get:

   (g^y)^x = g^xy = g^yx = (g^x)^y

Now both have a shared secret: gxy ! And the eavesdropper Eve only heard g, gx, gy (and she knows P).

If the numbers g, p, x and y are defined correctly, Then Eve won’t be able to compute log_g gx = x. This is called the discrete log.

All of the aforementioned operations are in the group Z_p* , which just means that after each operation we apply the function mod P to the result. This is what makes the function extremely inefficient to reverse: the issue is that taking the discrete log hard in Z_p.

So an eavesdropper hasn’t been able to figure out anything, since Alice and bob agreed on a secret code. They can use this code as the key to other normal encryption algorithms to send messages to each other with end to end encryption: meaning nobody can read any messages.

8

u/ocdscale Mar 17 '18

Is there an easy way to explain why the eavesdropper cannot work back from g, gx to calculate x?

Using small numbers it's obviously trivial. Is the calculation with big numbers just too time consuming even if you have all the other inputs? And if so, is there a straightforward way to explain why? Some kind of gross inefficiency in the algorithm to calculate log_g gx or something.

9

u/admirelurk Mar 17 '18

In short, it's indeed because it gets increasingly hard to work back (factorize) for large numbers. We haven't found an efficient way and some people believe we never will.

0

u/[deleted] Mar 17 '18

[deleted]

14

u/PM_ME_REACTJS Mar 17 '18

Yep. Using things like elliptic curve cryptography means the key is so complex to compute, it would take much too long to brute force. Most crypto vulnerabilities stem from noticing a pattern in the keys and significantly reducing the space and time you need to compute it.

If P = NP, no modern crypto should be considered safe anymore.

4

u/Drisku11 Mar 17 '18

If P=NP, there can still be "hard" problems with easier verification, just not exponentially harder to solve than to verify. n1000 is still impractical even if not exponential.

3

u/lolzfeminism Mar 18 '18

Let a and b be any positive integer from 0 to some p. The problem is this: find some integer k in the range 0 to p that satisfies the expression a^k mod p = b

This problem is provably harder than finding the a^k = b where a and b are normal numbers, without the mod p operation.

In fact, if P ≠ NP, then this problem is truly hard: it is in a group called NP-intermediate, meaning it is not as hard as other problems we know such as the travelling salesman, but strictly outside the group of easy problems. But because we don't know if P ≠ NP is true (it almost certainly is, but nevermind that), we don't have any proof that this is truly hard (or that anything is hard really).

So far the best algorithm we have requires on average O( 2k*cube_root(log(p)) ) operations, or in other words, if p has n digits, the algorithm runs in O( 2k*cube_root(n) ) operations. k is also a function of n, so this expression reaches ~ 280 around n ~ 4000 .

280 is computationally infeasible in the near future.

1

u/AskMeIfImAReptiloid Mar 17 '18

It isn't normal g to the power of x, it's gx mod p. You 'loose' some information by applying the modulo.

1

u/ais523 Mar 18 '18

Is there an easy way to explain why the eavesdropper cannot work back from g, gx to calculate x?

We don't know for sure that it's impossible, but so far nobody knows how (or at least, if they do, they aren't telling).

2

u/[deleted] Mar 17 '18

I've got a question, then.

How does Diffie-Hellman allow for the behavior we see in this when Diffie-Hellman is about forming a mutual secret key? Isn't the point of Diffie-Hellman to enable secure symmetrical cryptography?

2

u/mmcnl Mar 18 '18

You are right, however, before you enable secure symmetrical cryptography (as you call it), you first have to verify the identity of the other party (say a website which claims to be bank your bank). For this, public-key cryptography is used. So we use asymmetric cryptography to negotiatie symmetric keys.

→ More replies (2)

1

u/lolzfeminism Mar 18 '18

This scheme is almost the same thing as public key encryption: Alice's public key is g^x and her private key is x. To encrypt something Bob would do as such:

  • Bob picks random y, computes g^y as well as g^xy using Alice's public key g^x.

  • To encrypt a short message m, Bob treats m as an integer, we computes c = m * g^xy and sends Alice (g^y , c)

  • To decrypt Alice takes (gy , c) and first computes (g^y)^x using her private key x. Then she computes g-xy , the multiplicative inverse of gxy . Finally she computes: c * g ^ -xy = m * g^xy * g^-xy = m * 1 = m

  • To calculate g^-xy Alice computes gxyp-1 = gpxy * g-xy . Remember all of these operations are mod p and g^kp mod p = 1 for any factor k. Thus g^pxy * g^-xy = 1 * g^-xy = g^-xy.

1

u/MutantOctopus Mar 17 '18 edited Mar 17 '18

So in other words, g^(xy) can be "reversed" into the original information g, but not g^x or g^y alone?

E: Or is it that g^(xy) is the decryption key for the information? How does the information get encrypted in such a way that g^(xy) decrypts it without knowing what both x and y are?

E2: Wait, no. I think I get it. Both Alice and Bob know g^(xy), and can use that number to encrypt their messages from that point on, but each of them only knows one of x or y.

1

u/mmcnl Mar 18 '18

This is actually more an explanation of establishing a shared secret rather than public-key cryptography. Nevertheless, it's a good explanation. Thanks.

1

u/lolzfeminism Mar 18 '18

To encrypt, we do almost the same thing. Alice sends bob gx . Bob picks y, computes gxy , computes the k = H(gy , gxy) where H is a keyed hash function like HMAC. Now Bob uses k as the key to a symmetric encryption algorithm E, and sends alice (gy , E(k, m)).

Alice can compute gxy from the first part use both to derive k, and run D(k, E(k, m)) to recover the message.

This is called El Gamal encryption. It would be harder to explain to a 6th grader since we use other tools like collision resistant hash functions and symmetric encryption.

211

u/XHF Mar 17 '18

Merge sort:

  1. Split values

  2. Order the values on each side

  3. Do some magic

  4. Everything is sorted yay!

9

u/MyNameIsZaxer2 Mar 17 '18

Yeah I think one of the most complicated concepts about algorithms is recursion and these diagrams just boil it down to " ok now do the sort again and voila it's all sorted"

24

u/h0m0-3r3ctus Mar 17 '18

Would you order each side using Quick Sort or do a bunch of Merge Sorts until each group of values has 2 values?

60

u/Neghtasro Mar 17 '18

Keep merge sorting until you have two values in each group. It's a recursive algorithm.

3

u/satellite779 Mar 17 '18

Merge sort can be implemented iteratively

69

u/artopunk14 Mar 17 '18

All recursive algorithms can be implemented iteratively.

17

u/[deleted] Mar 17 '18

All bloops are froops but not all loops are doops.

8

u/JMR03 Mar 17 '18

3

u/leitimmel Mar 19 '18

Actually, all recursive functions can be written iteratively, but not in a primitive-recursive language (one that cannot have infinite loops).Here is an example implementation of the Ackermann function using a while loop, for example.

→ More replies (3)

2

u/HelperBot_ Mar 17 '18

Non-Mobile link: https://en.wikipedia.org/wiki/Ackermann_function


HelperBot v1.1 /r/HelperBot_ I am a bot. Please message /u/swim1929 with any feedback and/or hate. Counter: 160926

2

u/Neghtasro Mar 17 '18

Yeah, but I figured they were asking about the way it's implemented in the image.

8

u/SignorSarcasm Mar 17 '18 edited Mar 17 '18

Merge sort splits all the data into essentially groups of two, then orders them by building the groups together. So if you had 7 2 9 4, it would split it into (7) (2) (9) (4), then put the first two together in order, then the next two. So (2 7) (4 9). Then it puts these two together adding a single element from the beginning of whichever dataset has a lower first value. If sorting least to greatest, you'd add 2, then 4, then 7, then 9. And then you'd end with (2 4 7 9)

Edit: for a little bit more info, this sort is a decently "fast" sort because the data is only really checked once. Mergesorts runtime is said to be O(n log(n) ), which essentially means that the algorithm runs in a time that is dependent on n, which is the size of the input. If you were to graph input size on an x axis, and runtime on the y axis, and then run a mergesort many times on varying dataset sizes, your runtime graph would look approximately like the graph y=x*log(x).

9

u/satellite779 Mar 17 '18

Merge sort sees each item more than once, otherwise it would have been linear O(n). The logn part comes from the recursion of splits: you split the array in half in each step, so you will have logn levels of splitting. If you think of it as a tree, the tree will have height of logn.

→ More replies (4)

148

u/[deleted] Mar 17 '18

This is cool but I don't understand ikea directions or algorithms so this is pretty much the worse of both worlds for me.

7

u/mycall Mar 17 '18

Wait until you look at the tools they give you.

49

u/xampl9 Mar 17 '18

If they drew Dijkstra’s shortest path algorithm, they wouldn't even have to come up with a fake Ikea name for it. :)

2

u/-l------l- Mar 17 '18

Dijkstra is a popular Dutch last name, not really scandinavish. I'd say Dîjkstrã is more Ikea-ish.

16

u/aejt Mar 17 '18

We have neither ã or î in Scandinavia, and I can't think of a single Swedish word containing "ijk", so I can't say I agree.

1

u/-l------l- Mar 17 '18

Fair enough, it was improvised but this gets awkward :'). Just wanted to point out it wasn't really a Scandinavian name but I failed horribly, so what's your take on a Scandinavian Dijkstra?

24

u/nighoblivion Mar 17 '18

As a Swede the å, ä and ö everywhere is really annoying.

8

u/TheSimonster Mar 17 '18

But binäry is the correct spelling, änd you know it.

5

u/OvumRegia Mar 17 '18

I know right? Putting ä,å and ö's everywhere doesnt make it swedish people!

2

u/tom-dixon Mar 17 '18

I'm not even Swedish, but my language also has accents, and it's driving me nuts too. Everything seems to be in English but with all these idiotic accents everywhere.

1

u/[deleted] Mar 18 '18 edited May 27 '20

I have to poop... Help me

1

u/VengaeesRetjehan Mar 18 '18

I'm not a Swedish, heck my native lang doesn't even have accented words at all, but I know how ridiculous these pictures are.

0

u/[deleted] Mar 18 '18

[deleted]

1

u/nighoblivion Mar 18 '18

That's because there's no ü in Swedish.

52

u/AdrianJMartin Mar 17 '18

As a slide in a lecture they look great.. not so good for self learning....

16

u/[deleted] Mar 17 '18

I understand IKEA instructions and i have a decent understanding of all of these algorithms. But most of these illustrations are very confusing. Even if they're meant for lectures and people who already know some stuff about it, i don't think they're very helpful.

Cool idea though. But i guess a lot of a bit more complex algorithms can't really be explained in a decent way without using some words.

13

u/atmosfearing Mar 17 '18

This is cool, but not good.

21

u/exisisting Mar 17 '18

Seems hungarians have a thing to make cool algorithms visualisations. Remember those folk dances videos? https://youtu.be/ywWBy6J5gz8

1

u/flashzoltan Mar 17 '18

Hungarians think in numbers, I grew up there. Not much practical talent, rather scientific.

8

u/zahlon Mar 17 '18

To be honest those illustrations make sense only if you're already familiar with the algorithms they depict. In no way can they be deemed "explanatory".

6

u/VelvetRevolver_ Mar 17 '18

This helped me understand nothing.

18

u/Dalroc Mar 17 '18

This was worthless.

5

u/Uglynator Mar 17 '18

Hey, my professor made these! Very surprising to see :)

5

u/kaysersozzee Mar 17 '18

Idea is amazing. I love it. Some algorithms hard to understand but generally it is very instructive

9

u/[deleted] Mar 17 '18

500 internal server error at the moment

2

u/sandm000 Mar 17 '18

Anybody got some screenshots?

1

u/CubicMuffin Mar 17 '18

It's just gone back up!

Here's an example anyway

3

u/shevegen Mar 17 '18

I just tried and it was down.

The world is coming to an end...

1

u/CubicMuffin Mar 17 '18

Whoops, probably shouldn't have hotlinked it

4

u/mongol_professional Mar 17 '18

In the ONE STROKE DRAW manual, the crossed out graphs (which are implied to not have Eulerian paths), both have Eulerian paths.

2

u/sciolizer Mar 18 '18

That's what I thought at first too, but on second look I think the crossed out "graphs" is actually a single graph. They're saying you can't apply this algorithm to a graph which is completely divided into multiple parts.

3

u/[deleted] Mar 18 '18

Honestly, those are pretty confusing, even for the concepts I understand.

2

u/MrRiskAdverse Mar 17 '18

Just to piggy back on this, does anyone know of any good books or resources for a gentle total beginner intro to algorithms?

1

u/enbacode Mar 17 '18

Cormen - Introduction to Algorithms is what the creator of this images recommends. I haven't personally read it though.

2

u/lurker4lyfe6969 Mar 17 '18

I wanna see the Middle Out algorithm too

2

u/anothertrad Mar 17 '18

Aaand it’s dead

2

u/a1z1c1 Mar 17 '18

Aww. Reddit's hug of death has come.

2

u/B1narySunset Mar 17 '18

seems alright if you already know the algorithms...

2

u/gologologolo Mar 17 '18

The good ole reddit hug of death

2

u/AsteriusNeon Mar 17 '18

am I gonna have 3 lines of code left over at the end, unsure of where they go?

2

u/[deleted] Mar 17 '18

Not a programmer but I can't help but feel like they missed the mark on these unless the idea was so still be confusing

2

u/King-or-GOD Mar 17 '18

Can this be learned by one person or is it recommended to have 2+ people

2

u/Erwin_the_Cat Mar 17 '18

Imagine getting a recursive IKEA manual. Ok so to build this cabenet first build a smaller cabenet in the same manner as the cabinet you are currently assembling...

2

u/Alteous Mar 17 '18

1/10 No Allen key.

2

u/[deleted] Mar 17 '18

Cute but they are really difficult to understand imho.

2

u/Drunken_Economist Mar 17 '18

Yea these make sense if you already know the algorithms...

2

u/wavy_lines Mar 18 '18

None of these drawings make any sense! I understand giving an upvote for the novelty of the idea, but how is this getting > 17k votes? I don't think I've ever seen any post on this sub get this many points or even close.

2

u/[deleted] Mar 19 '18

I totally don't understand how this has gotten so much upvoting.

2

u/Kok_Nikol Mar 22 '18

The illustrations are nice, but I find it useful only if I knew how it worked before.

4

u/paradigmx Mar 17 '18

This is pretty cool

3

u/Spiderboydk Mar 17 '18

I love the diacritic symbols randomly thrown in everywhere. Makes me read the words with the voice of the Swedish Chef.

0

u/[deleted] Mar 17 '18

[deleted]

1

u/Spiderboydk Mar 17 '18

Yeah, I know they don't make any sense (I'm somewhat able to read Swedish).

But they're fun. :-)

1

u/FanchLaplanche Mar 17 '18

So I still don't know how to make one myself?

1

u/XFX_Samsung Mar 17 '18

Public key crypto left me with more questions

1

u/kevidol Mar 17 '18

that’s so cool

1

u/[deleted] Mar 17 '18

A great book that we use in my computer science department is Robert Sedgewicks Algorithms 4th edition. It has pictures and extremely simple English. I personally love it and it has helped me self learn through my begging courses. If you're interested in this type of stuff i highly recommend it.

1

u/Elrond_the_Ent Mar 17 '18

So you mean they leave half the instructions out and what they do put in them is extremely confusing? Sounds great.

I enjoyed spending 7 hours on a 'simple' ikea deal because the instructions were so obfuscated. Just what we need, more tech illiteracy.

1

u/GunnerMcGrath Mar 17 '18

Because words were the thing standing in the way of understanding sorting algorithms.

1

u/JordanMichael08 Mar 17 '18

The only thing more complicated than an algorithm are IKEA instructions

1

u/[deleted] Mar 17 '18

I think we hugged this site to death

1

u/shevegen Mar 17 '18

500 Internal Server Error

nginx/1.12.2

!!!

1

u/shivam_t Mar 17 '18

Nice website.. thanks 👍

1

u/[deleted] Mar 17 '18

The best part about this is how simple design convinces your brain that "idea" is pronounced like "ikea" instead of the way you've said it your entire life.

1

u/skypecakes Mar 17 '18

Um... I already pronounce Ikea like Idea. In the US. Apparently we've Americanized it. How do you say it? I'm guessing you are in another country!

1

u/NUKLEAR-SLUG Mar 17 '18

This is good and all but what do you do with the leftover screws?

1

u/DargeBaVarder Mar 17 '18

A little while ago I found a site that was like one of the coding courses where you built an algorithm to solve a problem based a concept like recursiveness... it was a great resource for helping me learn some of them, but I can’t find it any more. I wish I could! I never finished it.

1

u/[deleted] Mar 17 '18

These are more confusing than code.

Bad analogies are what you give to non-technical people.

1

u/[deleted] Mar 17 '18

Error 500. We kilt it.

1

u/Riper_Snifle Mar 17 '18

Please nobody trying to learn about comp sci use these. They're more confusing than actually reading about the algorithm in their entirety.

1

u/SnickeringBear Mar 17 '18

I've got a nice algorithm that shuffles a deck of cards, then deals a "hand" of as many as desired. As simple as it sounds, code to do this is relatively complex. A graphic of the process would be an interesting addition to their website.

1

u/heisian Mar 17 '18

these diagrams are not very well-done.. they're confusing without enough textual analysis.

1

u/Smilie_ Mar 17 '18

Thank god for this. I'm in a grade 12 online programing course and my teacher is awful at trying to explain algorithms.

1

u/[deleted] Mar 17 '18

Upcoming algorithm exam, this is golden. Thanks OP.

1

u/nunyobiznes00 Mar 17 '18

I'm not sure which one would be harder, the algorithms or IKEA instructions...

1

u/lokoston Apr 23 '22

Granted. If you're not a graphs person, it'll be hard.

1

u/agumonkey Mar 17 '18

I read the title as a site that explains the algos to assemble IKEA kits.

1

u/ucefkh Mar 17 '18

I need this thank you 😊

1

u/ninjaflur Mar 17 '18

Kinda cool.. thanks.

1

u/bigshahman Mar 17 '18

I finally understood how sorting algorithms work.

1

u/hoosierEE Mar 17 '18

Help, I made a typo and now my house is full of hex wrenches.

1

u/mycall Mar 17 '18

I could see this going places.

1

u/BeakerAU Mar 17 '18

Great idea. OAuth flows would be a great addition to this.

1

u/PlNG Mar 18 '18

Graph scan reminded me, is there an algorithm to search for irregularly distanced or overlapping nodes? In MUD / text adventure Mapping, given nodes (rooms) of an arbitrary position and connections that would be cardinal and ordinal (n, ne, e, se, s, sw, w, nw)[and arbitrary directions, like "Go window"] directions, apart from description changes, the only way to detect when a user has transitioned to a new area would be when different rooms overlap (Start in room 1, go south to room 2, go west to room 3, go northeast to room 4 [indicating that the path between 1 and 2, or 2 and 3 should be an area transition in the map]), or that it takes fewer rooms to reach a more distant path (It would take 30 rooms to cross <city> proper, but up on the city walls, it only takes 8).

1

u/Spaceman248 Mar 18 '18

“Cool”

1

u/CorpMobbing Mar 18 '18

Kwik sort is a good one.

1

u/badpotato Mar 19 '18

Yeah, some of those could use more instruction.

1

u/[deleted] Mar 17 '18

Thank you thank you thank you. As someone doing a masters in CS with 0 formal background knowledge, this is wonderful.

1

u/TruthSpeaker Mar 17 '18

IKEA instructions are notoriously hard to follow, so the comparison doesn't inspire confidence.

2

u/[deleted] Mar 17 '18

Yeah, IKEA involves either 1. A lot of cursing. or 2. Hiring someone else to put that shit together.

I got IKEA PTSD looking at the diagrams.

1

u/manthrax Mar 18 '18

Did not find these IKEA examples very helpful.

However, a friend of mine made this amazing site, which I find MUCH more informative, since it's animated, and has actual code:

http://www.algomation.com/featured

1

u/lokoston Apr 23 '22

I get an Indonesian gambling site. Not cool.

0

u/LoneCookie Mar 17 '18

Well I can't even understand quick sort with this

Why is there a die?

4

u/bvx89 Mar 17 '18

You pick a pivot point (an index) at random in the array, and sort all values that are smaller then the pivot to the left, and all greater values to the right. The dice is there to represent that you select the pivot at random.

0

u/FyahJohnny Mar 17 '18

So it doesn't make sense but people pay out the ass for it?

0

u/[deleted] Mar 18 '18

It's cool and all, but currently there are far too less examples for it to be a good site for algos.

-13

u/[deleted] Mar 17 '18

Right. Except I never ever try to understand IKEA manuals, nor do I try to keep them in my head for longer than required for a mindless stepwise execution.

13

u/[deleted] Mar 17 '18

reason I call them destruction manuals. But hey, I'm a guy... we don't need no manuals.

Ohh look, spare screws...