Not really blogging

A. Makelov

I have moved to

It is with great exsitement that I’m leaving this website for good, and from now on I will not be blogging at


My (current) LaTeX configuration: a relatively easy way to learn how to take LaTeX notes in real time

This is the product of several years of meticulously writing LaTeX documents, coupled with 3 or 4 sudden realizations of the form “I’ve been doing this wrong the whole time, and here‘s how do to it faster”. The end result is that I can take notes in LaTeX as math people write stuff on the board and say all kinds of complicated nonsense, and the notes are just as understandable and readable as the real thing (hey I’m not a magician yet so I can’t actually make it more understandable). And all that without having to memorize unnatural keyboard shortcuts.

Starting with the OS, I’m running Linux, more specifically an Ubuntu Virtual Machine. I have 4GB of RAM and a reasonably fast CPU, so I can pull it off.

The editor I’m using is gummi. It also has a version for Windows which they say is super unstable; I’ve used it a couple of times for minor things and it behaved OK. Maybe it’s altogether OK, but I don’t know. Edit: actually, a friend of mine had been using the Windows version for several years and had like zero problems, so maybe you should have more confidence in it!

There are (at least) two very important things about gummi: live preview, and snippets.

The live preview is an extremely light .pdf viewer embedded in your editor window, on the right side of the actual .tex code. It shows how your document would look if compiled and exported to .pdf. It refreshes automatically  (so you don’t have to click anything) every n seconds where n is a natural number between 1 and 60 but otherwise entirely up to you. It’s super useful in terms of knowing what you’re doing and how things look. It gets a little unwieldy when your document is over 50 pages or something, but that’s not a big issue for me right now. Also, you can always put different parts of your document in different files to avoid that, and play around with commenting/uncommeting \include statements.

Edit: One important thing I forgot to mention is that the preview scrolls up and down automatically as you edit different parts of the file, at least for documents that aren’t too long. Also, by doing Ctrl + click on some part of the preview, the cursor in your code goes to the place producing the thing you clicked on! That’s really neat.

The snippets allow you to replace a (usually short) sequence of non-space characters with some predefined text, in such a way that your cursor will be positioned wherever you want in that text, and each next time you press Tab, it goes to another place you want it to be at. So for example, I have a snippet “frac”, which does the following: whenever I type “frac”, and press Tab when I’m right after the “c” at the end, it produces \frac{}{}, puts my cursor in the numerator placeholder, and pressing Tab again moves it to the denominator placeholder and finally outside the environment. You can do this with more complicated commands too, and add additional functionality. Basically, just  make snippets for all your theorem-ish environments, your equation environments, your bracketing (matching left/right parentheses, square brackets, and those absolute value things whatever they’re called) and all your special operators like summation, probability, limsup, etc., and you’ll be in good shape. Gummi comes with some pre-loaded snippets, too. The result is that you don’t have to use your mouse/touchpad to transition into and out of complicated environments, and you can generate common environments fairly easily.

So I guess the moral is this: even if you don’t use gummi, find an editor which has the above two functionalities. They, when used reasonably and combined with a reasonable preamble full of reasonable macros (for example \def\N{\mathbb{N}} is super reasonable) can actually give you amazing results in terms of speed! Happy nerding out!


Lazarus piano riff tab

Lazarus by Porcupine tree is an amazing song with a haunting main riff. The latter is originally for piano, but here’s a guitar tab of what I hear (which might not be 100% accurate, but is at least easy to play). Use your ear to pick up the tempo and rhythm:








What does the Banach-Tarski theorem have to do with the axiom of choice?

`What’s an anagram of Banach-Tarski?’

`Banach-Tarski Banach-Tarski.’

Banach and Tarski

The Banach-Tarski theorem says the following:

Theorem 1 [Banach-Tarski theorem] Given a solid ball in 3-dimensional Euclidean space {\mathbb{R}^3}, we can partition it into a finite number of pieces, so that we can rearrange them to get two solid balls congruent to the first ball.

This clearly goes against people’s intuitions about volume. Often, it is noted that the Banach-Tarski theorem is a consequence of the axiom of choice; this is inherent, since it is in fact equivalent to the axiom of choice. In one of its most strikingly obvious formulations the latter says:

[Axiom of choice] The product of a collection of nonempty sets is nonempty.

That is, for any collection of sets {\{S_i\}_{i\in I}}, where the index set {I} can be an arbitrary set, one can find an indexed family {S = (s_i)_{i\in I}} such that {s_i\in S_i} for all {i\in I}.

So, we have these two things which are equivalent, and one is completely, obviously true, whereas the other is completely, obviously false. OK.

What do these two things have to do with each other? Here’s the beginning of an answer. Our intuitions about concepts like volume and area are formalized in mathematics through what is called a measure. Here’s a definition that summarizes the intuitively desirable properties of such a measure:

Definition 2 A measure on {\mathbb{R}^n} is a non-negative, translation-invariant, countably additive function {\mu:\mathcal{P}(\mathbb{R}^n)\to\mathbb{R}} that assigns to each parallelepiped its volume. That is to say,

  1. {\forall S\subset\mathbb{R}^n, \mu(S)\geq0}.
  2. {\forall S\subset\mathbb{R}^n, v\in\mathbb{R}^n, \mu(S) = \mu(S+v)}
  3. {\forall S_1,S_2,\ldots \subset \mathbb{R}^n} disjoint,

    \displaystyle \begin{array}{rcl} \mu\left(\displaystyle\bigcup_{i=1}^\infty S_i\right)=\displaystyle\sum_{i=1}^\infty \mu(S_i) \end{array}

  4. {\forall a_i,b_i\in\mathbb{R}, \mu( \prod_{i=1}^{n} [a_i,b_i])= \prod_{i=1}^{n} (b_i-a_i)}.

We would then hope to be able to build up complicated sets from many parallelepipeds. Or something like that in any case.

Why do we allow only countably many sets in (2)? Well, the (only!) alternative is to allow at least uncountably many sets, which would then imply that the measure of the entire {\mathbb{R}^n} is equal to the sum of the measures of the points; but points should have zero volume! So our condition (3) is actually pretty liberal.

However, it turns out that in the above definition we wanted too much, i.e. it is inconsistent:

Theorem 3 There exists a subset {A\subset\mathbb{R}} for which {\mu(A)} doesn’t exist.

Proof: Consider the equivalence relation on {[0,1]} given by

\displaystyle \alpha\sim\beta \iff \alpha-\beta\in\mathbb{Q}

By the axiom of choice, we can pick an indexed collection of representatives for each equivalence class; call the set underlying this collection of representatives {A}. To really convince yourself that this is indeed a set (because that’s tricky business), you should play around with the axioms of Zermelo-Fraenkel set theory and the definition of an indexed collection. We shall show that {\mu(A)} doesn’t exist.

Assume the opposite, and consider, for each {r\in\mathbb{Q}\cap[-1,1]}, the sets

\displaystyle A_r = \{ a + r \ \big| \ a\in A\}

Observe that the {A_r} are disjoint, for otherwise we would have {a_1\pm r_1=a_2\pm r_2} for {a_1\neq a_2\in A} and {r_1,r_2\in\mathbb{Q}\cap[0,1]}, and hence {a_1-a_2\in\mathbb{Q}}, contradicting the fact that {a_1,a_2} are in different equivalence classes.

On the other hand, {[0,1]\subset\displaystyle\bigcup_{r} A_r\subset[-1,2]}. Thus, by the properties of measure, we have

\displaystyle 1 \leq \displaystyle\sum_{r} \mu(A)\leq 3

The first inequality gives us {\mu(A)>0}, whereas the second gives us {\mu(A)=0}, thus the contradiction with the assumption that {\mu(A)} exists. \Box

This is where our intuition about volume breaks: it’s impossible to formalize it so that it works for all sets. Now, it’s kind of clear that at least one of the pieces in the decomposition of the ball in the Banach-Tarski paradox has to be similar to the set {A} above, and that is where `volume conservation’ fails.

What people do to define the measure in a consistent way is to be very careful about the sets for which the measure applies. This leads to the ideas of {\sigma}-algebras and Lebesgue measure, which are the established formalisms of measure theory. There still exist sets that are not Lebesgue-measurable (the one constructed above is an example), but this is no longer an inconsistency of the theory; it’s a `weirdness’ of math.

Mars = Science fiction

One minute it was Ohio winter, with doors closed, windows locked, the panes blind with frost, icicles fringing every roof, children skiing on slopes, housewives lumbering like great black bears in their furs along the icy streets.

And then a long wave of warmth crossed the small town.

Ray Bradbury, “Rocket summer“

1. The bottom line of this post, in two words

It seems that there is enough textual and contextual evidence to suggest that the “Martian chronicles” can be read, among other things, as the chronicles of an abstract process – the development of science fiction as a genre, progressing from the realm of inventions like humanoid machines and rockets to the point of indistinguishability from magic.

2. Introduction

For all you dedicated Bradbury fans, yes, “Rocket summer“ is the first short story in his “Martian chronicles“. When I was first reading the book, this opening vignette meant nothing to me besides the literal fact that a rocket is being launched, and I quickly forgot about it. But later, with the book finished, and the deadline for my next English paper looming ahead (that’s how inspiration works, apparently), impressions gave rise to ideas and ideas gave rise to a principle at work – behind “Rocket summer“ and behind the rest of the chronicles. Or a piece of rubbish that I managed to convince myself is enough evidence for a principle at work – I can’t really tell the difference; the paper on which this post is based can be found here.

3. Ambiguity in plot

Everyone who’s read the “Chronicles“ knows how confusing and ambiguous the whole thing is. In part, this is because most of the short stories are unrelated, having been published separately by Bradbury before the collection was assembled, and then joined together by short vignettes, such as “Rocket summer“, to the effect that the many Mars-es depicted seem quite different from each other. Moreover, both we, as readers, and the characters we read about, keep encountering the same problem: distinguishing Mars from Earth, past from future, travel through space from travel through time, human from Martian. In “Ylla“, Martians behave just like ordinary people; in “The Earth men“, Martians comically fail to recognize humans as a different species; in “The third expedition“, Mars in Bradbury’s future is indistinguishable from Earth from his past:

Lustig said, “But suppose, by accident, in space, in time, we got lost in the dimensions and landed on an Earth that is thirty or forty years ago.“

In “And the moon be still as bright“, the future is mixed with another past – the colonization of America, and it is extremely unclear whether Spender actually switched with a Martian: the Martian appeared before me and said, `Give me your boots’ […] And the Martian walked down into camp and he’s here now.

4. Ambiguity in genre

The ambiguity in the stories is paralleled by an ambiguity between science fiction and fantasy as genres. While the “Chronicles” are often called science fiction (often enough for Wikipedia to do it), Bradbury insisted that

First of all, I don’t write science fiction. I’ve only done one science fiction book and that’s Fahrenheit 451, based on reality. It was named so to represent the temperature at which paper ignites. Science fiction is a depiction of the real. Fantasy is a depiction of the unreal. So Martian Chronicles is not science fiction, it’s fantasy. It couldn’t happen, you see? That’s the reason it’s going to be around a long time.” because it’s a Greek myth, and myths have staying power.

On the surface, the book employs many of the customary tropes of science fiction, such as space colonization, telepathy, humanoid machines; on the other hand, their rational explicability is either absent or neglected, and the stories are driven by open-ended, timeless philosophical questions set in poetic environments, rather than Campbell-era-style logical puzzles which always have a solution.

5. “Night meeting“

But when it comes to ambiguity, the best example by far is “Night meeting“, where the book seems to be aware of its unifying themes. I’d strongly suggest reading it if you haven’t, for it is a very beautiful piece on its own (the entire collection can be found here). Foreshadowed by the remark “Even time is crazy up here” made by the man at the gasoline station, a meeting takes place between the opposites mentioned above (these being Mars-Earth, past-future, space-time, human-Martian), embodied by Muhe Ca, the Martian, and Tomas, the human:

“You are so certain. How can you prove who is from the Past, who from the Future? What year is it?”

“Two thousand and one!”

“What does that mean to me?”

Tomas considered and shrugged. “Nothing.”[…]

How do you know that those temples are not the temples of your own civilization one hundred centuries from now, tumbled and broken? You do not know.

Most of all, this is saying that looking far enough into the future is indistinguishable from looking into the past – and here comes the principle at work (literally! : ) ).

6. The principle

Any sufficiently advanced technology is indistinguishable from magic.

Arthur Clarke

Clarke’s most famous quote has a fairly unpopular corollary: “Any sufficiently advanced science fiction is indistinguishable from fantasy”. In light of the previous sections, one is inclined to think that the Chronicles’ blend of fantasy and science fiction is working together with elements of the plot to tell a meta-narrative of the science fiction genre, rather than a particular science fiction or fantasy story.

One can further interpret Mars as a metaphor for science fiction itself, and more specifically for its ability to generate wonder. Carl Sagan succinctly captured the attitudes of people from Bradbury’s time towards the red planet:

Mars has become a kind of mythic arena onto which we have projected our Earthly hopes and fears.

Carl Sagan

The concept of a projection is key here, but perhaps in a more intentional context than what Sagan implied. A projection, in both the mathematical and psychological sense, is a transformation whose subject and outcome coincide from some perspectives, and are displaced from others. One of the great merits of science fiction is that it functions largely as such a projection: of current society and technology into future times and alien places, and indeed a projection of our existential hopes and fears. By displacing concepts from their everyday contexts to a genuinely new setting via its novum, it helps us separate the fundamental from the specific – and, consequently, prejudice from rationality. But when the displaced reality is overwhelmingly far from our point of view, the effect wraps around, back in time, to magic, fantasy – and wonder.

Mars, in Bradbury’s Chronicles, is the target of such displacement – the arena where past meets future, science fiction meets fantasy, and so on. In this line of thought, going back to the man at the gasoline station from “Night meeting”, we find the following little jewel:

“How do you like Mars, Pop?”

“Fine. Always something new. I made up my mind when I came here last year I wouldn’t expect nothing, nor ask nothing, nor be surprised at nothing. We’ve got to forget Earth and how things were. We’ve got to look at what we’re in here, and how different it is. I get a hell of a lot of fun out of just the weather here. It’s Martian weather. Hot as hell daytimes, cold as hell nights. I get a big kick out of the different flowers and different rain. I came to Mars to retire and I wanted to retire in a place where everything is different. An old man needs to have things different. Young people don’t want to talk to him, other old people bore hell out of him. So I thought the best thing for me is a place so different that all you got to do is open your eyes and you’re entertained. I got this gas station. If business picks up too much, I’ll move on back to some other old highway that’s not so busy, where I can earn just enough to live on and still have time to feel the different things here.”

“You got the right idea, Pop,” said Tomas, his brown hands idly on the wheel. He was feeling good. He had been working in one of the new colonies for ten days straight and now he had two days off and was on his way to a party.

“I’m not surprised at anything any more,” said the old man. “I’m just looking. I’m just experiencing. If you can’t take Mars for what she is, you might as well go back to Earth. Everything’s crazy up here, the soil, the air, the canals, the natives (I never saw any yet, but I hear they’re around), the clocks. Even my clock acts funny. Even time is crazy up here. Sometimes I feel I’m here all by myself, no one else on the whole damn planet. I’d take bets on it. Sometimes I feel about eight years old, my body squeezed up and everything else tall. Jesus, it’s just the place for an old man. Keeps me alert a nd keeps me happy. You know what Mars is? It’s like a thing I got for Christmas seventy years ago – don’t know if you ever had one – they called them kaleidoscopes, bits of crystal and cloth and beads and pretty junk. You held it up to the sun light and looked in through at it, and it took your breath away. All the patterns! Well, that’s Mars. Enjoy it. Don’t ask it to be nothing else but what it is. Jesus, you know that highway right there, built by the Martians, is over sixteen centuries old and still in good condition? That’s one dollar and fifty cents, thanks and good night.”

7. It all makes sense now

Or at least, some of it makes sense. Remember “Rocket summer”? The rocket, that science-fiction-y thing, is described more like a fire-breathing dragon from some fantasy book; by its technological power, it superposes past and future, showing “last summer’s ancient green lawns”; it also projects summer onto winter, rendering the “bear disguises” of the housewives obsolete. Remember “Usher II”? There literature came to life on Mars.

Finally, remember the ending?

The Martians were there–in the canal–reflected in the water. Timothy and Michael and Robert and Mom and Dad. The Martians stared back up at them for a long, long silent time from the rippling water.

Did they really have to become the Martians, in the end? Was that the only possibility? Maybe “if you can’t take Mars for what she is, you might as well go back to Earth”, in the words of the old man at the gasoline station, so when the radiation on Earth dissipates they will return. Yet Mom and Dad burned the old way of life. And maybe they didn’t have a choice – for Mars is science fiction, and you can’t help but colonize, and become, science fiction one day.

Fundamental domains

This post is about the area of math known as general topology, and I’ll thus assume some basic background (for example, chapter 2 of the textbook by Munkres should be enough). The post was produces with a little modified version of Luca Trevisan’s latex2wp, and the source .tex can be found here. There is a bit of a hope that next time I’ll be able to make the math look better.

What made me write this was the Internet’s apparent lack of a simple but rigorous introduction to fundamental domains and their usefulness in taking quotients by group actions. The goal is, for a space {X} and group {G} acting on {X}, to establish sufficient conditions for the quotient {D/G} of a fundamental domain {D} (to be defined below) by the induced action of {G} to be homeomorphic to {X/G}.

1. A motivating example

Consider the space {\mathbb{R}^2} in the standard topology, and the (discrete) group {\mathbb{Z}^2} acting by translation: {(m,n)\in\mathbb{Z}^2} acts on {(x,y)\in\mathbb{R}^2} by sending it to {(x+m, y+n)}. Suppose you want to get an understanding of the quotient space {\mathbb{R}^2/\mathbb{Z}^2} with respect to this action. Basically, you want to take the real plane and, for each point, glue to it its orbit under {\mathbb{Z}^2}. Working with {\mathbb{R}^2} can make your head hurt, so here’s a trick: consider the unit square {D=[0,1]^2}. It almost contains a single representative of each orbit, except on the boundary. This gives us the much simpler gluing instructions


The resulting space is the torus. The subspace {D} is known as a fundamental domain for the action of {\mathbb{Z}^2} on {\mathbb{R}^2}.

2. Group actions on topological spaces: a crash course

In topology, one often considers quotients of topological spaces by group actions (for example, in the beautiful theory of covering spaces, which you don’t really need to know to get this post). This is a natural extension of group actions on sets which takes into account the continuity of the topological spaces:

Definition 1 A topological group {G} is a space and group {G} such that

  1. The composition map {G\times G\to G} is continuous.
  2. The inverse map {G\to G} is continuous.

Definition 2 A topological group {G} acts on a space {X} if {G} acts on the set {X} and the corresponding action {G\times X\to X} is continuous.

To get some practice with these concepts, do these exercises:

Exercise 1 If {f:X\times Y\to Z} is a continuous map, show that for every {x\in X}, the map {f(x,\cdot):Y\to Z} is continuous.

Exercise 2 If {G} acts on {X}, show that for any {g\in G}, the map {f_g:X\to X} given by {x\to gx} is a homeomorphism.

3. Fundamental domains

One way to define a fundamental domain formally is the following (though we won’t use the full strength of this definition):

Definition 3 A fundamental domain is a closed subset {D\subset X} such that {X} is the union of translates of {D} under the group action:

\displaystyle \begin{array}{rcl} X= \displaystyle\bigcup_{g\in G}gD \end{array}

and such that {\mathop{Int}(gD\cap g'D)=\emptyset} for any two distinct translates.

What we ideally want to get is {D/G\cong X/G}. I know of no result stating that, and maybe there’s a counterexample. The following two propositions detail what I do know in terms of sufficient conditions:

Proposition 4 If :

  1. {X/G} is Hausdorff, and
  2. {D} is compact, or {D/G} is compact,

then {D/G\cong X/G}.

Proof: Observe that if we let {q,p} be the canonical quotient maps from {D,X} to {D/G,X/G} respectively, and {i} be the canonical inclusion {D\to X}, we have that whenever {a,b} are in the same {G}-orbit in {D}, they get mapped to the same element in {X/G}. Consequently, we have the following diagram:diagram

where {f} is continuous and unique by the universal property of the quotient. What does {f} do? Suppose we have an element {a} of a {G} orbit in {D}. Under {p\circ i}, {a} gets mapped to a representative of its {G}-orbit in {X/G}; but {p\circ i = f\circ q}. Hence {f} maps a representative of {a}‘s {G}-orbit in {D/G} to a representative of {a}‘s {G}-orbit in {X/G} (which is exactly the natural map we would expect to get).

Observe that {f} is injective: if {[a],[b]\in D/G} are such that {f([a])=f([b])}, it follows that there are some {a,b\in D} which go to the same element in {X/G}, and thus {a\sim b}, so {[a]=[b]}.

Moreover, {f} is surjective: observe that {p\circ i} is surjective, since {D} contains a representative of each orbit, and thus {f\circ q} is also surjective, which cannot happen if {f} fails to be surjective.

Thus, {f} is a continuous bijection {D/G\to X/G}. Since {D} being compact implies that {D/G} is also compact (being a continuous image under the quotient), and since {X/G} is Hausdorff, {f} is a homeomorphism. \Box

Going back to our example, obviously {[0,1]^2} is compact, and it’s easy to check that {\mathbb{R}^2/\mathbb{Z}^2} is Hausdorff.

Proposition 5 In terms of the notation of the previous proposition, {D/G\cong X/G} if and only if {p\circ i} is a quotient map.

Proof: Observe that {p\circ i} is a surjective continuous map {D\to X/G}, and that {D/G} is the quotient of {D} by the equivalence relation with equivalence classes – the subsets {\{(p\circ i)^{-1}(\{z\}) \ \big| \ z\in X/G\}}. Thus, Corollary 22.3 from Munkres applies to tell us that there is a homeomorphism {D/G\to X/G} \Box

This would hold, for example, if {p} is a closed map, since {i} is a closed map by {D} being closed in {X}, compositions of closed maps are closed, and every closed map is a quotient map.

Ивайло Кортезов и задачата за митинга

В последните няколко дни се вдигна много шум около следната задача съставена от доцент Ивайло Кортезов за математическото състезание “Иван Салабашев”:

Жителите на една махала били закарани на митинг, като всеки получил по едно знаме и по две кебапчета. След митинга те изхвърлили 15 от знамената, а останалите 35 знамена занесли в махалата. Колко кебапчета са получили жителите на махалата?

Според някои хора, задачата е неподходяща, лоша, направо ужасна. Според мен на задачата (почти) нищо ѝ няма. Първо, няколко не-защити на моето мнение (които масово се представят като защити, а и определено мисля че биха разубедили някои противници на задачата просто защото биха ги накарали да се почувстват лошо):

1. Вегетарианец съм от една година, но още преди да спра да ям месо, повече харесвах постните митинги, и въобще митингите на които отиваш не за да ядеш, а за да срещнеш хора: такива които са съгласни и не са съгласни с твоята позиция. Може би поради бавното навлизане на английския в българската действителност, някои думи са се разбъркали, затова да припомним:

митинг – от англ. meeting – среща. Да не се бърка с близките по звучене meating и eating

(за етимологията, вижте ето тук). Но колкото аз и много други хора да не харесваме купени митинги, това не е причина тази задача, ако я четем като форма на протест срещу тях, да не е лоша.

2. Митинги на които се раздават кебапчета и знамена реално се случват в България. Някои хора казват, няма нищо лошо в задачата, защото тя отразява действителността. Това, също, само по себе си не е причина задачата да не е лоша – има много по-ужасяващи неща които се случват и са се случвали, но мисля че е очевидно защо не се пишат задачи за тях.

3. Други, в защита на Ивайло, казваха че върлите противници на задачата не струват като хора. Това е, очевидно, не само грешен, но и вреден начин на мислене, сляпо следване на инстинкта за отмъщение; следващата стъпка е саморазправа. Ако искаме да сме честни, това дали дадена постъпка е грешна трябва да зависи единствено от самата постъпка, не от това кой я смята за грешна. Един свидетел на убийство, бил той и най-закоравелия престъпник на света, си остава свидетел на… убийство, не на нещо друго. Такава “защита” е по-скоро вредна, както и Ивайло знае:

Благодаря на хората, които се изказаха в моя подкрепа. Невероятно е колко много хора ми изказаха съпричастността си, че и много повече, през последните два дни. Обичам ви, хора, заради вас живея! Действително нямаше да оцелея без вас (и още не знам дали ще). Дотолкова обичта на всички ми е нужна, че дори и малка част от човечеството да демонстрира обратното, се сривам! Но още по-удивен съм как съм успял да недооценя броя на хората, чийто начин на мислене драстично се различава от моя. Ако бях, със сигурност щях да бъда много по-внимателен. Някои от хората, изказали подкрепата си, изровиха нелицеприятни и дори шокиращи факти за част от хората, подхванали кампанията срещу мен (явно с последните ме дели пропаст в начина на мислене) и се чудеха дали да не ги обнародват в социалните мрежи. За Бога, хора, не правете това! До какво добро нещо би довело това!? Моля ви, хора, пресявайте действията си през ситото на добротата! Човек трябва да действа така, че с всяко свое действие да се максимизира функционала “Общочовешко Щастие” в дългосрочен план. Малцина се сещат, че това е оптимизационната задача, която всички трябва да решаваме! Уви, аз също понякога не успявам да го максимизирам. Впрочем бих искал да изкажа благодарността си към тези, които не одобряват постъпката ми, но са пресяли действията си през ситото на добротата.

4. Познавам Ивайло лично и заставам зад добрите думи които се изговориха за него от защитниците му. Ходил съм на няколко лагера по математика където той е бил лектор; той ми беше ръководител за Всерусийската олимпиада по математика през 2009. Ивайло произвежда спокойствие, добронамереност, смях и усмивки в околните, и, не на последно място, много медалисти (и много обича да се включва в игрите на учениците – спомням си как един път на школата в Пампорово той игра на филми с нас :Д). Той е един от най-притетливите хора които съм срещал въобще; решението му да остане в България имайки предвид постоянно разпадащите се условия за правене на наука тук, и трудът му в името на математическото движение са допринесли много за покачването на “общочовешкото щастие”. Това, обаче, също не е причина да смятаме всичко направено от него за правилно (въпреки че се доближава (: ), в частност въпросната задача.

Общото между горните не-защити е, че те не се вглеждат достатъчно дълбоко в обстоятелствата съпътстващи задачата, а по-скоро регистрират машинално думите “махала”, “митинг”, “кебапчета”, “знамена”, и тръгват да говорят за нещо друго, нещо несвързано с конкретния въпрос на който се опитват да отговорят: “Лоша ли е тази задача или не?”. По подобен начин, обвиненията срещу Ивайло правят същото.

А какво имаме всъщност:

1. Едното основно обвинение към задачата е, че тя занимава второкласниците с политика. Както написах по-горе, митинги от вида описан в задачата реално се случват в България. Но освен това, доколкото аз съм запознат със ситуацията, няма негласно, всеобщо обществено споразумение това умишлено да се крие от децата, и тук е ключовата разлика. Напротив, мисля че дори и да има хора които съзнателно крият тази информация от децата си, те са достатъчно малка част от всички че да не оправдават специално отношение към темата. За митингите се говори открито в новинарски емисии по всяко време на деня, пише се по вестниците, и всичко това без червена точка.

2. Също така, второкласниците масово виждат в задачата само математиката, защото родените през 2005 (каквито те са! да не забравяме това) са достатъчно малки за да си нямат идея от митинги, кебапчета, знамена, и прочее. Думите “политика”, “партия” и прочие не фигурират в условието. Затова:

2а. Огромна част от учениците решаващи задачата няма да я възприемат като опит някой да им промива мозъците или да им представя нещо лошо и неприятно. Вкъщи те може би ще попитат, “Защо тази задача е такава странна?”, и оттам нататък всичко е в ръцете на родителите им. Това се случва постоянно с какви ли не други неща (даже не само задачи, можете ли да си представите) които децата виждат из света.

2б. В невероятния случай второкласник/второкласничка да знае за какво иде реч и да може да улови подтекста на задачата, мисля че той/тя би имала нужната умствена зрялост да я прочете просто като описание на една действителност която вече е осъзнал/осъзнала.

3. Другото основно обвинение е, че задачата изразява мнение. Естествено, това се забелязва от родителите, не от децата. На мен ми се струва че по-скоро хората виждат в нея своите собствени възгледи (защото ако не си роден през 2005 е трудно да нямаш мнение по тези въпроси). Мисля че гледната точка на хората които смятат че задачата действително изразява политическо пристрастие е трудна за аргументиране, и рано или късно те ще попаднат в литературната ситуация “Какво е искал да каже авторът на стихотворението?”, в която думите на самото стихотворение са не по-важни от това кой го чете.

4. Но дори нека да приемем, че някой може да прочете задачата като израз на мнение. Учениците, макар и толкова малки, всъщност вече се сблъскват с човешки мнения за света, например в часовете по литература, където творбите, освен други неща, често изразяват такива мнения (или поне могат да се четат като изразяващи ги). Работата е там, че тези мнения обикновено са или за неща станали много отдавна, или за “непреходни, общочовешки ценности”, от съображения за безопасност :). Не виждам причина математиката да изостава, и доколкото мога да прочета мнение в задачата на Ивайло, то спада към категорията на общочовешките ценности: Купените митинги не са хубави. Ами добро утро, не са :).

Inevitability as a common perspective on “The idiot” and “The little prince”: essay

This is something I wrote for a class on Russian literature that I took in the spring. SPOILERS AHEAD: If you haven’t read “The idiot” by Dostoevsky, or “The little prince” by Saint-Exupery, bear in mind that this essay discusses the plots of the two works in depth.

“The inevitable blow of the knife”: Inevitability as a common perspective on “The Idiot” and “The Little Prince”

There are two well-known works of literature that undertake, each in its own way, the challenge of depicting the encounter of a perfectly good and beautiful man with the rest of the not-so-perfect world. As much as we would expect both to treat similar universal ideas of human ethics and aesthetics, they share another striking thing in common: both “The Idiot” and “The Little Prince” tell the story of a childlike prince.

Yet this seeming superficiality is only the first of many co-occurrences that transcend the mere choice of words, and extend to the fundamental imagery and tone of both books. I will try to convince you that this similarity suggests not the whim of coincidence being at play here, but a perspective for understanding both works as being driven by the same all-powerful feeling: that of inevitability. Set against the heavy, recurrent premonition of an unavoidable final event that makes the present constantly fall towards it, they can be seen as a desperate attempt to capture and reflect on these last fleeting moments of life – which encompass, in their extreme vividness and clarity of perception, the entire spectrum of human existence. Indeed, an attempt, as Dostoyevsky himself articulated it, “…to paint the face of a condemned man a minute before the guillotine falls…” (Dostoyevsky 75)

To set the stage for this comparison and provide a foundation for my analysis, I first outline the primary ways in which “The Idiot” and “The Little Prince” are alike – as well as the ways in which they differ. Central is the notion of the morally and physically beautiful prince, “falling” in the real world as if from a fairy tale – and indeed, as both stories imply, perhaps such princes only belong in fairy tales. In a sense, both the little prince and Myshkin come from a different world – whether it the asteroid B-612 or the tranquil fields of Switzerland. And similarly, in the end, both depart, in grief, to where they came from – whether literally (going back to the clinic and to idiocy) or symbolically (the death of the body that sets the invisible essence free). In their interactions with people, both strike at first glance with an expression of childlike simplicity and beauty. Even the ways in which this impression is gradually built up mimic one another. Recall the “golden curls” (Exupery 22) of the Little Prince and Myshkin’s “fair hair” (Exupery 6) – defining characteristics of their physical beauty. Or the “lovely peal of laughter” (Exupery 9) of the Little Prince, and Myshkin’s habit of honestly laughing at his own misfortunes, which both have the power to instantaneously convey to other people their innocent nature. Whereas the Little Prince is indeed little in appearance – a child, the corresponding aspect of Myshkin is constructed in a symbolic, although no less frquently recurring, pattern. He is repeatedly called a “child” by pretty much every major character in the novel, and he talks at length about his strong love for children. Recall the touching story about Marie (Dostoyevsky Part I, Chapter 6), and the special connection Myshkin established with the children from the village, an idea dear to Dostoyevsky, and one he employs again in “The Brothers Karamazov” through Alyosha. Most notably, there the prince says: “… I am indeed not fond of being with adults, with people, with grown-ups […] my companions have always been children.” (Dostoyevsky 87-88). The quality of being childlike is combined, in both our heroes, with a lack of fixed ideology, a manner of taking the conversation straight to the point, and an ability to see through people. Just as Myshkin articulates matters like the death penalty simply, eloquently and convincingly, so does the little prince speak simply and concisely about the meaning of love. And just as the Little Prince can see “what is essential”, which is “invisible to the eye” (Exupery 60), so can Myshkin understand the thoughts and feelings of others through their “physiognomy” (a most recurring word in “The Idiot”), to the point of wielding an influence over the very roots of Nastasya Filippovna’s soul: “You’re not like that, not like the person you pretended to be just now, are you?” (Dostoyevsky 138). The princes share a thoughtful, reflective soul, and a corresponding oblivity to their surroundings. Preoccupied with the eternal war between sheep and flowers (Exupery 22), the Little Prince cares little about the constant death threat posed by the desert; and Myshkin’s body often wanders around while his mind is wondering around even further (cf. Dostoyevsky, before the fit in Part II), not believing in his heart that anyone could try to hurt him or deceive him. And finally, as if all of this is not enough, both princes share above all an insatiable capacity for finding and feeling beauty. Amazingly, it is precisely beauty that they first find in their two corresponding heroines: compare “‘So that’s Nastasya Filippovna?’ he said quietly, looking at the portrait attentively and inquisitively for a moment. ‘Astonishingly good looking!’ he added at once, with ardour.” (Dostoyevsky 36) and “But the little prince could not restrain his admiration: ‘Oh! How beautiful you are!’” (Exupery 24). And, similarly, beauty of nature is something of which both princes cannot get enough. For example, recall the wonderful passage (Dostoyevsky 69-70), especially “… and I kept thinking that if I were to walk straight, walk for a very long time and go beyond that line, the line where earth meets sky, there the whole riddle around me would be solved and instantly I would see a new life” and compare to the little prince’s love of sunsets: “’I am very fond of sunsets […] One day, […] I saw the sunset fourty-four times!” (Exupery 19). It is as if both heroes are personifications of the same – and to a great depth of detail – human type.

Yet, there is a crucial difference between the ways the stories of the princes are constructed. Whereas “The Little Prince” has the flavor of a passive, allegorical recollection on love and human nature in what could be the last moment before death, “The Idiot” draws us into a literal, painful, dynamic mixture of deception, passion, sickness, and murder. To see the distinction on the allegorical-literal axis, recall that in Saint-Exupéry’s story all the physicality of death is reduced to the tenderest, most aesthetic three lines: “There was nothing but a flash of yellow close to his ankle. […] There was not even any sound, because of the sand.” (Exupery 75) The rest is a dialogue, a recollection on the little prince’s love with the rose and the encounters during his journey. Because of the tale’s omnipresent allegorical nature, it is not clear if the little prince died or magically made it back to his planet, or if the drawing of the sheep ever ate the flower. And indeed, this uncertainty is in part even needed for Saint-Exupéry’s message. To the contrary, as much symbolism as there is in “The Idiot”, in his typical fashion Dostoyevsky nonetheless portraits the reality of death and sickness, in all their conclusiveness. Prime examples of this are the striking, somatic descriptions – of Myshkin’s epileptic fits, Ippolit’s final stage of consumption, and Nastasya Filippovna’s dead body, among others. The contrast on the passive-dynamic axis is produced not only by the difference in balance between reflection and action, as we discussed, but by the way the characters themselves are dispersed spatially and temporarily in the narrative. In “The Little Prince”, it is the prince who is travelling and entering into dialogue. Notice that he has only one interlocutor at any given moment – the king, the conceited man, the drunkard, etc. are all separated from one another, each in a different world (sometimes quite literally!); and by the time the narrative takes place, all but two of his encounters lie in the past (apart from the pilot and the snake). He is even the one who approaches the snake, and chooses to be bitten by him. Conversely, after his arrival in Russia, Myshkin is continuously subjected to the rapid fire of all the other characters that repeatedly come to him, share, challenge, deceive, mock, insult – and step back to give way for yet others to do the same. Recall (Dostoyevsky Part I, Chapter 8), where Kolya, Varya, Ganya, Ferdyshchenko, General Ivolgin and Nina Alexandrova – indeed, the entire Ardalionovni household, visit the prince’s room in the span of six pages and what must be no more than half an hour; or the visit of Antip Burdovsky, the false “Pavlishchev’s son” in (Dostoyevsky Part II, Chapters 7-8); or Ippolit’s recurring sharp intrusions, accompanied by his ideological antagonism and “unexpectedly shrill voice” (Dostoyevsky 303). And finally, Rogozhin’s attempt at Myshkin’s life (Dostoyevsky 274), the ultimate attack. Whereas the little prince is undertaking a journey and finds himself in the numb, inanimate personification of death that the desert is, Myshkin has to constantly defend himself from the ceaseless assaults of other characters. Thus, in “The Idiot”, all the antithetic social elements are mixed together in a vortex of actions and interactions that ultimately execute the speculations of death and sadness raised in “The Little Prince” for real.

Where is inevitability to be found in the above speculations and actualities, and how does it manifest itself in the two literary worlds we described? I shall recognize two “physiognomies” of it, and analyze the ways in which they interact. The first is rather obvious – one might say the human synonym for inevitability – death. The second is a more subtle one – yet, perhaps, the cause for the first – the constancy of human character. Let me first outline how they are depicted in “The Little Prince”, and then go through “The Idiot” in more depth.

The place of the novella’s present, the desert, is an unchanging, passive reminder of the proximity of death, and this is alluded to at the very beginning: “It was a question of life or death for me: I had scarcely enough water to last a week” (Exupery 5) Another personification of mortality is the snake, the first and last companion of the prince on Earth (Exupery, Chapters 17&26). The concrete premonition of the death of the prince gradually builds up from Chapter 24 (“And I felt him to be more fragile still. I felt the need of protecting him, as if he were a flame that might be extinguished by a little puff of wind…”) and permeates the narrative with anxiety. Among these clear manifestations of the inevitable are the more subtle ones. The baobab is one vivid metaphor for an unalterable force of annihilation: “A baobab is something you will never, never be able to get rid of if you attend to it too late. It spreads over the entire planet. It bores clear through it with its roots. And if the planet is too small, and the baobabs are too many, they split it in pieces” (Exupery 16). The constancy of the “warfare between the sheep and the flowers” is another: it has lasted “for millions of years” (Exupery 22). And then come all the disturbing, grotesque descriptions of the people the little prince meets along his journey. The king, the conceited man, the tippler, the businessman, the lamplighter, the geographer,… – all stuck in an infinite loop (this idea is most strikingly executed in the story of the tippler (Exupery Chapter 12)), inhabiting their lonely, narrow worlds – just as narrow as their personalities have become. Preoccupied with a single ambition, a single destination, it is as if they are not people, but parts of people. In this context, inevitability means the impossibility of them ever escaping the gravitational pull of these worlds, of them ever changing. This combines with the reocurring lack of understanding and true dialogue between the little prince and these other people, the “grown-ups”, to impress on the reader a feeling of utter hopelessness. Thus we see how these two faces of inevitability reemerge throughout the novella and account for its persistent tone of grief. Yet: the end is open. Whether the sheep ever ate the rose is left as a “great mystery” (Exupery 77).

“The Idiot” is, then, its apocalypse. Because apocalypse – the object of the book of Revelations, so frequently alluded to in the novel – literally means the unveiling of a great mystery. We will see how the imagery and tone of each part gradually brings us closer to the final lifting of this veil.

The concept of inevitability enters the narrative in an unequivocal way through the discussion of death penalty. As tangential and unmotivated as it may seem at a first reading, it turns out to concisely represent the novel’s essence, and I shall identify allusions to its imagery in the parts to follow. The use of such revelations (pun intended) seems to be a favorite of Dostoyevsky, as I shall keep demonstrating. Most notably, recall the early appearance of “Well, he might marry her tomorrow; might marry her, and a week later, perhaps, cut her throat” (Dostoyevsky 43). Through the vivid, eloquent speech of Myshkin, capital punishment comes to life. The passages about it share a clear message: “…and you’ll no longer be a human being, and that this is certain; the main thing is that it’s certain.”, “… he lived in the unquestionable conviction that in a few minutes’ time he would face sudden death”, “… when your head lies on the block, waits, and knows, and suddenly hears above it the sliding of the iron!” (Dostoyevsky 27, 71, 77) After these quotes, there is no further need to prove that unavoidability is the driving force behind this imagery. More relevant to the novel’s immediate plot, in Part I we also have all the characters constantly reiterating the conclusiveness of the birthday soiree: “… she will deliver her final word”, “Today my fate will be decided…”, “and this evening it’s all to be decided between them”, “The matter is settled”, … (Dostoyevsky 35, 99, 115, 117) All eyes are turned towards that certain future. Another recurring construct of anxiety is the warning, communicated from the other characters to Myshkin: “Then beware of him, I warn you…”, “I’ve come to warn you:…”, “I warn you in advance:…” (Dostoyevsky 100, 110, 113) The apparent reason for uttering these words is always different, yet the synchrony and proximity in the text is so remarkable that we are inclined to feel they additionally serve the same higher purpose. Is the prince about to stage his own story about the condemned man?

In Part II, the stakes go up, with the premonitions of Myshkin’s fit and Rogozhin’s attempt at his live intertwining with painful clarity, ultimately converging to the same moment in time. In the span of fifty pages, the eyes, the headache, the “physiognomy” of the house, the storm, the “same eyes” weave a thrilling gradation of apprehension (Dostoyevsky 223, 227, 236, 239, 266, 270, 273). But most notably, it is the knife, constantly approaching the narrative and asserting itself, that is the principal manifestation of inevitability here. First from the past: “She was like a madwoman all that day, now weeping, now preparing to kill me with a knife,…”, then as a possibility: “…because to put it bluntly you may cut her throat”, as a physical presence, materializing on the mention of jealousy, playing back and forth between Myshkin and Rogozhin; and, finally, as the carrier of certainty: “the inevitable blow of the knife” (Dostoyevsky 246, 249, 253, 274). The language that was used in Part I for seemingly different matters is now employed again, almost verbatim: “… a total and overwhelming impression that led involuntarily to the most complete conviction?”(p.272); “’It will all be decided in a moment!’ he said to himself with strange conviction.” (Dostoyevsky 272, 273) The only difference is that the prince is stubbornly oblivious to this certainty: “Parfyon, I don’t believe it!” (Dostoyevsky 274)

Shortly after this temporary denouement, inevitability puts on the mask of consumption in Part II and Part III, leading up to Ippolit’s necessary explanation – even the word “necessary” itself is a clear allusion to the certainty of his death. In this explanation we find the most grotesque personification of that idea in “The Idiot” – Ippolit’s creature. Because who created it but him? With mathematical precision, he describes the unearthly monster’s body, its size, number of limbs, feelers, its motion around the room; a precision that closely mirrors his own inclination of measuring the minutes and seconds of life (Dostoyevsky Part III, Chapter 5). Ippolit is painfully aware of his position, to the point that he describes himself re-using the exact imagery of Part I: “take me for […] most probably of all, a man condemned to death” (Dostoyevsky 460) Parallel to that, there is a continuous allusion to the book of Revelations: “it had appeared in my room on purpose, and in this there was some kind of secret”, “…what was the secret behind it?”, “…mystical terror…” (Dostoyevsky 454, 455) And the apocalypse here, as well as in the novel itself – the apocalypse that Myshkin acknowledges but refuses to believe in, and the one that ultimately drives him to insanity – lies in the actuality: yes, it will certainly happen. Despite all the courage of Norma, there is no getting away from the sting: “With a yelp and a howl she opened her mouth in pain, and I saw that the chewed-up reptile was still moving across it, emitting from its half-crushed body a large quantity of white fluid…” (Dostoyevsky 456)

Dispersed among the above faces of death and certainty, in the first three parts we also discover the subtle presence of constancy in the human soul. Many characters are driven in a high degree by a collection of single ideas, bearing striking similarity to the ones encountered in Exupery’s novella (chapters 10 to 15): money and vanity (Ganya), alcohol and forgetfulness (Ivolgin), passion and violence (Rogozhin), measuring time and mortality (Ippolit). Myshkin remains generally misunderstood, just as the little prince, and instead all his companions attempt to assign him to some ideology or other. The impression that Myshkin is conclusively unable to change the world for the better is created; the most notable proof for this is his assessment of Rogozhin: “… if there was a certain awkwardness in his [Rogozhin’s] gestures and conversation, it was merely external; in his soul this man could never change” (Dostoyevsky 424).

The fears and premonitions raised in the first three parts are gradually executed by Dostoyevsky in Part IV, ending with Nastasya’s murder. A notable symbolic interlude to this is the breaking of the vase. It is, along with the portrait of the condemned man, the most vivid and concise allegory for the plot of the novel. Firstly, it signifies the onset of Myshkin’s own disintegration. The seed of the idea is innocently planted by Aglaya, but greatly distresses the prince: “’…You must at least break the Chinese vase in the drawing room!…’ […] ‘On the contrary, I shall try to sit as far from it as possible…[…]”; “I am sure I’ll start talking out of fear, and break the vase out of fear […] I shall have dreams about it all night; why did you have to mention it?’” (Dostoyevsky 612, 613) And, in accordance to the laws of the novel, this is exactly how it happens. In a strikingly similar way, the former harmony of Myshkin’s eloquence is perturbed, broken to pieces by all the ellipses, abrupt exclamations and questions that mark his speech on pages 629 through 637. “‘You saw me when I was a child?’, asked the prince with some surprise”, “Oh, but I didn’t say it because I … doubted it … and, anyway, how could one doubt it (heh-heh!) … in the slightest? … I mean, even in the slightest!”; “‘Pavlishchev … Pavlishchev went over to Catholicism? That cannot be!’, he exclaimed in horror”, … No collection of a few quotations is able to fully express the tension imprinted on these eight pages! Secondly, the breaking of the vase is the final confirmation that the apocalypse in “The Idiot” is about the meandering but certain to occur actuality: “The vase swayed slightly, as if at first uncertain whether to fall on the head of one of the elderly gentlemen, but suddenly inclined in the opposite direction, towards the little German, […] and crashed to the floor” (Dostoyevsky 638); “But we cannot fail to mention another strange sensation that struck him [Myshkin] at precisely that moment and suddenly manifested itself to him out of the throng of all the other strange and troubled sensations: […] the realized prophecy!”(Dostoyevsky 639). From this point on, the conclusion is no surprise. The scene with Myshkin and Rogozhin gradually approaching Nastasya’s body completes the portrait of the inevitable. The veil – for Dostoyevsky granted us a literal veil with his last stroke of the brush, the curtain in Chapter 11 – is lifted, and the secret – not much of a secret anymore – revealed. The description does not contain an actual statement along the lines of “Nastasya Filippovna was dead” – and indeed there is no need for Dostoyevsky to say what had already been said many times.

Was that the only mystery? Was the apocalypse all about the inevitable ruin of a good, beautiful man in an unchanging world? I think not, for I have two more amazing similarities between Dostoyevsky’s novel and Exupery’s novella which I’ve been keeping a secret. Compare Myshkin’s words “Beauty is a riddle” (Dostoyevsky 91) with “‘What makes the desert beautiful’, said the little prince, ‘is that somewhere it hides a well…’ […] When I was a little boy I lived in an old house, and legend told us that a treasure was buried there. […] But it cast an enchantment over that house. My home was hiding a secret in the depths of its heart” (Exupery 66). Death is certainly a ‘mystery’ in both books – but so is beauty. And compare the portrait of the condemned man (Dostoyevsky 75), the portrait of the “poor knight” (Dostoyevsky 289) with the narrator of “The Little Prince” continuously painting pictures of the little prince (and indeed Exupery’s illustrations are a major part of the narrative). The combination of these two ideas leads to the emergence of an aesthetic dimension of ‘mystery’: a portrait of the beauty and vividity of life in that single moment “exactly a minute before death” (Dostoyevsky 77), when only “the last stair [of the scaffold] can be seen clearly and closely” (Dostoyevsky 77). In its brevity and beauty, it is a desperate antithesis to the constancy and ugliness of the inevitability of death.

I feel there is much more to be said about these two books than what I tried to convey in these several pages, and many more impressions struck me while I was writing this essay. By comparing the high-level structure of Exupery’s novella and Dostoyevsky’s novel, I managed to abstract away some of the complexity in the latter, and through the simplicity of the former grasp and analyze more clearly the manifestations of inevitability and the way they are constructed in the two books. The two narratives form a synergistic bond in which each empowers the understanding of the other. As we saw, while Exupery chooses to discuss the issue of inevitability from a distance, and on the allegorical level, Dostoyevsky brings it to an unequivocal conclusion in reality. At the end of both works, the dominating impression is that of sadness, of something forever lost, irreparably broken. Yet, we can ask ourselves, just like Myshkin does before his fit in Part II, is this not justified by the momentary glimpse at the perfect beauty, at the “final cause” (Dostoyevsky 264)? Indeed it is. The vase sways for a second before it falls, but it sways beautifully.


Dostoyevsky, F. “The Idiot”, Penguin Classics

Exupery, A. “The Little Prince”

Arbitrarily biasing a coin in 2 expected tosses

Here’s a neat probability trick that I learned from Konstantin Matveev and which, I think, everybody mildly interested in math should know about:

Problem. Given a fair coin, how do you (efficiently) generate an event E with probability 1/5?

Solution. We can, of course, toss the coin three times, giving us a total of 8 possibilities, then discard our least favorite 3 of them, and weigh the remaining  5 possibilities equally. This algorithm requires an expected number of tosses equal to 3\times 8/5=24/5. But, what if instead of 1/5, we have 1/1000000? You can easily see that the expected number of tosses to emulate a probability of 1/n grows logarithmically with n. But even worse, what if we had 1/\pi? Well, here’s a trick that gets rid of both of these problems: let

\frac{1}{5} = \displaystyle\sum_{i=1}^\infty \frac{a_i}{2^i}

for a_i\in \{0,1\} be the binary expansion of 1/5. Then, start tossing the coin until it lands heads, at some time I. If a_I=1, declare that E has occurred; otherwise, E has not occurred. Then clearly

\mathbb{P}[E]=\displaystyle\sum_{i=1}^\infty \mathbb{P}[E\ \big| \ I=i]\mathbb{P}[I=i]=\displaystyle\sum_{i=1}^\infty \frac{a_i}{2^i}=\frac{1}{5}

Furthermore, notice that \mathbb{E}[I]=2, regardless of the probability we want to emulate! Well, that seems pretty efficient. When you think about it some more, it really appears to be mind-boggling – you can emulate extremely small, or irrational, probabilities with just two expected tosses. Moreover, you don’t need to have the binary expansion of the probability in advance – you can pass the next digit depending on the status of your experiment.

Combining this with a standard unbiasing technique, say von Neumann unbiasing,, this gives you a very simple procedure that given a biased coin that lands heads with probability 0<p<1, allows you to simulate a biased coin that lands heads with probability 0<q<1 for any other q. Any binary source of randomness is convertible to any other such source.

But we haven’t said anything about the efficiency of unbiasing. There, we can’t do as well as in biasing: there is a fundamental obstacle, the information-theoretic limit. Roughly speaking, the amount of information a biased coin tells us is always strictly less than the amount of information we get from an unbiased coin – this is why biasing is easier than unbiasing. Fortunately, there is a procedure that lets us extract an unbiased stream of bits that on average achieves the best performance theoretically possible: see this paper by Mitzenmacher to learn more.

I guess the moral of all this is the following: if you’re stuck on a deserted island with \pi -1 other people, you need to decide who the first to be eaten is, and all you have in your random arsenal is a suspicious-looking coin handed to you by one of your shipmates, do not despair – you can still make sure you have a fair chance of surviving the day.

Reflections on “The library of Babel” and computational complexity

“…mirrors and copulation are abominable, because they increase the number or men.”

“Tlön, Uqbar, Orbis Tertius”, Jorge Luis Borges

You can tell that Borges was very fond of reflections, and now I intend to try to make him happy.

In short, the Cosmic Coincidence Control Center (and it seems that I’m included in that number?) was extremely busy last week. After finishing my first-ever short story, that feeble imitation of Borges, bearing the following arrogant dedication “While this story was being written, I thought I had stolen Borges’ style; but now I know – he stole my idea”, I was ruthlessly hunted down – so after all it was me who stole something, but hey, who is to say.

First, I decided to write my first paper for the science fiction class I’m taking (which is absolutely fun, thanks to this guy) on “The library of Babel”. OK, I can take that – after all, you might argue that I have free will and whatnot, so in fact it was not a coincidence.

Next, I randomly decided to watch a video by vihart called “Twelve tones”, cause, you know, it seemed to be her most popular one. And – bam! – there was “The library” again.

After that, I was even more randomly reading the chapter on randomized algorithms from the book on computational complexity by Oded Goldreich, and guess what, the quote at the beginning was:

I owe this almost atrocious variety to an institution which other republics
do not know or which operates in them in an imperfect and secret manner:
the lottery

Jorge Luis Borges, “The Lottery in Babylon”

I know, it’s not a library, it’s a lottery, but a lottery is just the closest equivalent of a library to people doing randomized algorithmis – after all, a bunch of monkeys randomly typing on a bunch of typewriters will produce the works of Shakespeare at some point. And a Babylon is like a baby Babel anyway.

Finally, it turned out that the book I blogged about last week, “Orphans of the sky”, is way too similar to “The library of Babel” – something I realized only after re-reading the library (or rather, “The library”. haha). It’s not just that both things came out in 1941 (yeah, I don’t know, it’s crazy), but they both construct extremely similar settings, visually and conceptually. Read them and you’ll know – don’t want to spoil anything!

All in all, it was pretty obvious that Borges was after me, and that he wouldn’t leave me alone unless I wrote something about the library and about computational complexity. So here we are now.

What is this library anyway? The premise of the story is simple enough: a library which contains all possible books 410 pages long, conveniently stacked in a seemingly infinite array of identical hexagonal galleries, which comprise all the world. It has the complete works of Shakespeare, the biographies of all people that have ever lived on Earth, the proofs of a bunch of conjectures in mathematics, these same proofs with the last line wrong, “The library of Babel”, etc. Sure, it’s a big place. It also has people randomly walking up and down and thinking they have it all figured, arguing that, you see, a pentagonal gallery would be fundamentally impossible, so that’s why galleries are hexagonal.

But I don’t really want to talk about the social metaphors of the library (a decent subject in its own right); rather, I like to think of it as a representative of a somewhat underrepresented part of SF, something you might reasonably call “math fiction”.  Borges wrote several other stories with a strong flavor of mathematics – “The Aleph”, “The garden of forking paths”, “Blue tigers”, “The book of sand”, to name a few amazing ones.

Is MF SF? I would argue that it is, for:

1) math is as good a science as any of your usual ‘favorites’ in SF – physics, chemistry, biology – and in fact, it is the language underlying all of them, a language of even greater expressive power

2) yes, all the ‘falsifiable hypothesis blabla’ stuff does apply to mathematics, and in fact, modern mathematics seems to rely more and more on simulations and experiments

3) MF has already sneaked in SF: there are works that arguably classify as MF which have won a bunch of awards. I know for I’ve read one such – “Permutation city” by Greg Egan, which I strongly recommend to people interested in the computational aspects of consciousness.

YAY MATH FICTION! So, “The library of Babel” uses a very simple mathematical idea – “the set of all sequences of a given length, in a given set of symbols” – to achieve very interesting and complicated effects, and that makes it great math fiction. Suppose you wanted to write a book, and you had some reasonably good idea of what you want it to be about, and you knew it wouldn’t be longer than 410 pages. It then seems very plausible that, if someone hands you a book and you read it, it will be qualitatively easier for you to tell if that’s the book (or a book) you want to write. Then, if you just go to the library and read all books (for there is a very big, but finite number of such books), you will finally find one that suits you!  So you’ll have achieved a qualitative improvement by increasing your efforts only quantitatively. Essentially, it might seem that you’ve written a book without writing it!

This has two consequences: one philosophical, one computational. First, is an author just a treasure-hunter? Does an author create a work, or has the work been there all the time, and the author is `merely’ the one who found it? What the hell?

But hey, that’s not a big deal. What if we try to write books in the way described above? What if we try to do math the way described above – if we want to prove a theorem, we just go through all possible proofs of a given length, for all lengths, until we find one that works? Then mathematical discovery will be more or less fully automated! Ideas of the sort motivated the computational revolution that was just starting at the time Borges wrote his story, and they shape much of modern computational complexity theory.

As for the point of the above example in this context – we might need some new, more practical definitions of quantitative and qualitative differences after all. Especially, when you’re searching for something, going through all possibilities should count as qualitatively more expensive than looking at a single one – and that’s some intuition for where the distinction between polynomial and exponential time in computer science came from. Here’s a nice paper on that topic that I don’t really understand (yeah, I don’t really understand either): Why Philosophers Should Care About Computational Complexity


Exploring and venting about quantitative issues

Rational Altruist

Adventures of a would-be do-gooder.

Gowers's Weblog

Mathematics related discussions

What's new

Updates on my research and expository papers, discussion of open problems, and other maths-related topics. By Terence Tao

Stefan's Blog (archive, for news see

Most of the blog moved to