7
$\begingroup$

Recently I found an interesting algorithm book entitled 'Explaining Algorithms Using Metaphors' (Google books) by Michal Forišek and Monika Steinová. "Good" metaphors help people understand and even visualize the abstract concepts and ideas behind algorithms.

For example,

One well-known exposition of the shortest path using the balls-and-strings model looks as follows: To find the shortest path between $s$ and $t$, one just grabs the corresponding two balls and tries to pull them apart.

My question:

I would like to see as many metaphors as possible for computer science algorithms/concepts/ideas.
Do you know any? Do you have your own ones?

$\endgroup$
2
  • $\begingroup$ I think Knuth's The Art of Computer Programming has something about external sorting and snowploughs and elevators. $\endgroup$ Mar 5, 2015 at 14:06
  • 1
    $\begingroup$ Stories can also be dangerous: it can be easier to try to make the facts fit the existing narrative, even when the story is no longer suitable and should be discarded. See also mathoverflow.net/q/2358/7252 for some mathematics examples. $\endgroup$ Mar 6, 2015 at 9:09

4 Answers 4

2
$\begingroup$

B-Trees, N-ary Trees, Autocracy and Democracy

http://rkvsraman.blogspot.in/2008/08/b-trees-n-ary-trees-autocracy-and.html

$\endgroup$
2
$\begingroup$

There is a very nice metaphor on decidable languages in the book Gödel, Escher, Bach by Douglas Hofstadter.

He uses drawings as an analogy for recursively enumerable languages. Every time you draw something on a sheet of paper, the part of the sheet that is not used by your drawing can be viewed as the "complement" of your drawing.

The artist M.C. Escher plays with such complements in pictures like this one:

Tessellation by Escher

We can view this as a picture of birds, whose complement is a picture of fishes.

The behaviour is the same with decidable languages: both the language and its complement are recursively enumerable.

To sum up, it allows to graphically view an object that "makes sense" (in this case it stands for recursively enumerable), such that the "hole" it leaves in the universe also "makes sense".

$\endgroup$
1
$\begingroup$

Water filling algorithm for channel allocation http://en.wikipedia.org/wiki/Water_filling_algorithm

$\endgroup$
0
$\begingroup$

Dijkstra's Algorithm and Human Psyche

http://rkvsraman.blogspot.in/2005/12/dijkstras-algorithm-and-human-psyche.html

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.