What you see is what you get

August 16, 2016

Here is a very nice image, composed of four squares. The upper-left and lower-right squares are pink with black horizontal stripes, and the upper-right and lower-left squares are green with black vertical stripes.

McCollough

What do you mean by “you’re talking nonsense”? Any fool can see that two squares are pink and two are green, and if all you see is a black and white image, well, you had better get yourself checked for total colour blindness; I’m surprised you hadn’t noticed it until this far in your life! Now, we could argue about this for quite a long while, and you would claim that no matter which way you look at it, it’s a black and white image, and I would say that maybe it does depend on which way you look at it, but that would be quite worthless; I see what I see, and that’s that.


We all keep in back of our heads the fact that different people see the world differently. Either literally, as in, they are colourblind, or more abstractly, as in, they grew up in a different environment and had different life events and experiences and relationships and traumas and solar flares which shaped their persona in unique and delicate ways. But often the “back of the head” is very, very deep inside, and we are not consciously aware that we are judging others based on our own experiences and not on theirs.

So it’s good to occasionally get a reminder. A reminder that our experiences change the way we perceive the world, maybe even permanently; a reminder that what may be crystal clear to one may be the exact opposite to another. The McCollough effect is such a reminder, and a darn freakin’ awesome one at that.
The McCollough effect is produced as follows: you look at a grating with horizontal stripes (much like the top-left square above) that is coloured green for a couple of seconds. Then you look at a grating with vertical stripes that is coloured pink for a couple of seconds. Rinse and repeat for, say, 5-10 minutes. Afterwards, when you look at the ordinary black and white gratings, they appear to be coloured pink or green, depending on their stripe pattern.
This is reminiscent of “image burning” on the retina, where if you stare at an image for a while and then at a blank wall, you see an “afterimage” of what you looked at. But it goes much deeper than this. For example, it’s specific to the grating pattern: if you rotate the grating you are looking at by 90 degrees, the green and pink colours are swapped; if you rotate by 45 degrees, they disappear altogether! It also lasts longer. I did the experiment for 10 minutes, meaning I endured a 10 minute staring contest with the pink/green gratings, and the effect lasted for three days. Let’s repeat: for three days afterwards, instead of seeing a black and white square with horizontal stripes, I saw a pink square with horizontal stripes. Some people retained this effect for months!

Here is a link where you too can witness the phenomenon:
http://lite.bu.edu/vision-flash10/applets/Color/McCollough/McCollough.html
It takes a bit of patience to sit through 10 minutes of staring, but I think it’s quite worth it; it’s certainly much better than all those TED videos claiming they will change the way you see the world.

Maybe I’m reading a bit too much into this overall esoteric phenomenon. After all politics and worldviews are much more concrete, aren’t they? Well, what you see is what you get.

But to end lightly, let’s finish off with an ever relevant SMBC:
http://www.smbc-comics.com/comic/2011-03-23

Book Review: Ringworld

August 8, 2016

*** Spoilers included. But I don’t think you should care, because this is a horrible book and you should not read it. That’s also a spoiler. ***

Recipe: take about 200 grams of insightful ideas concerning civilization and space exploration, slice ’em and dice ’em, then mix in about 10 kilos of misogyny, extreme cherry-picking physics, poor character development, unrealistic behaviour, some more misogyny and a ridiculous historical explanation, and mix thoroughly until homogeneous. Congratulations! You have just cooked “Ringworld”, by Larry Niven.

The main setting of Ringworld is actually quite interesting: an ancient, almost all powerful civilization has figured out a novel way to avoid real estate problems: take all the matter in the solar system and stretch it out in the form of a thin ring around the sun. If the ring is about as far away from the sun as Earth is, and the ring is wide enough, you get an area equivalent to a hundred thousand planets; enough space for everybody. This is the Ringworld.
How would life on such a construction look like? Will it still have trees, mountains, seas, and lakes? What sort precautions do you need to take so that the Ringworld survives through the ages? How do you produce energy? How do you maintain a day-night cycle? How do you effectively leave and return to Ringworld? What happens when society finally collapses? All these questions and more are discussed in the book. Some of Niven’s solutions make good sense, others less so, but in any case, it’s an interesting concept to think about, especially since it’s a sort of intermediate stepping stone on the way to achieving a Dyson Sphere.
Unfortunately, apart from these scientific ponderings, I found the book to have very little value. Negative value, in fact. As you see above, the list of faults is large. Some things annoyed me so very much that I had to force myself to keep on reading. To name a few:

Sexism: There are two women in the book. I reluctantly accept this, as almost all science fiction of the time was exclusively male centered. But the book’s treatment of these two women is horrible. The first woman, Teela, is part of the four-person team that explores Ringworld. Her primary role in the book is to be lucky and naive, having “never been hurt in her entire life”. And by this, I mean that this is an actual plot device. Sentences of the form “this could only have happened because Teela was never really hurt in her entire life” do actually appear in the book. Her most positive merit is her luck. Teela also has a secondary role, which is to be a fuck-buddy to the main character, and to be heroically saved by him whenever possible. In fact, I think I got mixed up in my priorities: this is her primary role, and most of the book’s plot is moved forward by her being a fuck-buddy to the main character, or when the rest of the team tries to save her from peril.
The second woman, Prill, is a survivor who lived through the Ringworld’s downfall. How did she survive? By being a professional whore, of course (again, I’m not making this up; since she takes youth-prolonging drugs, she has had “thousands of years of experience” and is a sex grandmaster; that’s how she gets by). Obviously, a large part of her role is to be a fuck-buddy to the main character. Oh, sorry, did I say “large”? I meant “only”.
And this is without mentioning that there are two alien species in the book, both of which have “non-sentient females”, and one of the aliens in the expedition team is helping out only because this will give him the privilege of mating. If Niven tried to be sexist on purpose, he certainly did a really great job at it.

Physical cherry picking: Niven tries to describe Ringworld realistically. He tries to be accurate with the sizes and dimensions, the methods that spaceships will have to undergo in order to leave and return the Ringworld, etc. But he only does this when it suits him. Otherwise, he just hurls all the rules out the window, and expects us to accept a plethora of miraculous devices which do incredible things. To be fair, science fiction has often relied on some unexplained non-existent phenomenon – say, faster-than-light travel – and then investigated the social and psychological consequences of having such a device. And that’s fine, because that’s why we have “fiction” in the genre title, and people can get away with a little suspension of disbelief.
But Niven really misses it. He introduces way more unbelievable / impossible devices than he explains. To name a few:

  • Spaceships that are impervious to any known force except light and gravity.
  • A pill which prolongs life pretty much indefinitely.
  • Anti-gravity generators, capable of selectively floating entire buildings to arbitrary heights.
  • A small machine that can transform any organic matter into food.
  • A nearly indestructible material that stops neutrinos.
  • Teleportation pads.

Most of these devices are used extensively throughout the book, so it’s not like they are just a curiosity: without the food-generating machines, the exploration team will have no food. Without the life-prolonging drugs, Prill would not have survived, and neither would the main character. Without the nearly-indestructible spaceship, the characters would have been fried at the very beginning. And so on. And these aren’t even the craziest things that happen in the book. Did you know that there is a civilization that decides to migrate away from their solar system, so they get on their spaceships and just push their planets along? Niven is playing god in sandbox mode, and he doesn’t care to explain to us what is possible and what isn’t; it’s useless for us readers to try and predict how any event will turn out. The technology is so advanced, it really is just magic.

Unrealistic downfall: The main characters explore the Ringworld, discovering that its society collapsed from a state of master engineers who can basically move stars, to savages barely above ancient farmer technology and civilization. And why? Because a spaceship accidentally brought in some fungus which eats superconductors. Apparently, for Niven, this is a sufficient explanation for the downfall of a civilization with the power to turn planets into a gigantic ring around the sun. The fungus ate all the superconductors in Ringworld, an object with a 150,000,000 kilometer radius, and destroyed all of its power sources, before anyone could notice and do anything about it. Also, all written text was catastrophically lost, apparently, because the survivors have no recollection of anything of their past grandeur, they cannot fix anything or access any technology, and they worship the “ancient engineers” as gods. Well, I was the one who lost it in this case.

In fact, I’m losing it right now. I already wrote a thousand words, and I haven’t even gotten around to telling you about the crappy, one dimensional behavioural psychology going on between the expedition’s team members (except for Teela, of course. She has zero-dimensional interactions). So I’m going to stop here.

Do yourself a favor; don’t read this book.

To Carnegie Hall!

August 4, 2016

Recently a friend and I had a chat about music, and he asked me if I do any composition of my own. Unfortunately I do not. I suppose I could blame it on a lack of improvisation skill, which in turn originates from a desire to play pieces “as they were originally intended”, i.e. sticking to the sheet music, though I guess the true answer also has something to do with a fear of failure of some sort.
In general, classical music sports a rather bold distinction between “performer” and “composer”. The composer is the person who creates the music, the performer is the person(s) who executes the music, and they need not be the same gal (indeed, the composer may write for an instrument she does not even know how to play! or write for an entire orchestra / ensemble / etc). The fact that classical music is “classic” also contributes greatly to the distinction: most of the great composers of yore are dead; the best we mortals can do is echo their masterpieces.
But being a classical performer is no shame. Indeed, some performers have risen to a demigod stature among the population (ok, among a very particular slice of the population, but it is a demigod stature nonetheless). These men and women have brought the art of execution of art to a grandmaster level. They are experts in their field; they tune every staccato and accent to picometer precision. They know each intricacy of each phrase by heart, mind, and finger.

carnegie

Why am I telling you this? Because while in music both performers and composers are abundant, and both are respectable careers to aspire to, it seems to me that in high level mathematics, it is mostly the “composition” that is lauded. By “mathematical composers”, I mean research mathematicians, who explore the boundaries of the science, try to invent new mathematical structures and understand existing ones, and in general, prove a bunch of theorems, lemmas, corollaries, claims, propositions and remarks.
By “mathematical performers”, I mean those who take the work of the composers, and give the audience such a breathtaking show, that they’ll get a three-time standing ovation, eventually being forced to return to the stage to give an encore in the form of a “Using volume to prove Sperner’s Lemma” proof.

Yeah, I know, there aren’t much of the latter, and I think that we are all the poorer for it. What I envision is a mathematical lecturer virtuoso. Someone who can, through all the jumbled, messed up and interwoven six-part counterpoint of a proof, bring out a clear and lucid melody that will ring and resonate loud truth in the ears of the audience. Someone who can aptly tame the fierce and complex mathematical topics that generation upon generation of graduate students have failed to grasp, and finally bestow knowledge upon the ignorant. Someone who has studied the ancient texts and knows by heart, by mind, and by finger each intricacy of each phrase. Who can tune every theorem and lemma to picometer precision. An orator of great rhetoric, brilliant diction, and perfect handwriting. A lecture-hall veteran, who practices six hours a day and in the rest of her time finds out the best way to build a lecture series on a wide, demanding topic. In short, a full-time, professional, high level mathematics teacher.

Of course, the profession “full time teacher” is not unheard of. Yet, as far as I know, most teachers – i.e. most of those whose profession is to teach, and indeed do hone their presentation technique – are aimed at educating elementary and high schools. The number of such teachers at the academia level is small, if not infinitesimal. They do exist, for sure – at the Technion, as far as I know, at least two mathematics lecturers hold a full time position: Aviv Censor and Aliza Malek. They constantly receive much praise and awards, and their lecture halls are crammed so tightly, people stand in the hallways and peek through open doors just to hear them talk (though alas, I never chanced to study under them; this is in part because most of the courses they teach are aimed at non-mathematicians, and in any case are intended for undergraduates). But such men and women are a rarity.

Why is this? It’s quite understandable that many people would prefer to go into research rather than performance, but even then I would expect to see more performers than we have so far. Two other immediate reasons are: 1) lack of paying customers, lack of demand. 2) low social status when compared to research mathematicians (“Oh, you don’t invent anything of your own?”).
But this isn’t so with music, and *should not* be so with mathematics. I can therefore only hope that I live to see the day, when Carnegie hall is filled to burst with excited concert-goers; and when the lights turn on after an hour and a half of a dazzling performance of “The Nash Embedding Theorem”, there will not be a man or woman left unmoved, their hearts pounding with reborn youth, the math as music to their ears.

Electric Insanity

June 15, 2016

My piano is mentally ill. Now, you might be wondering how it is that a piano can be sick, but it’s an electronic piano (Korg SP250), and thus has a specialized electronic brain in charge of imitating the sound of tiny hammers hitting strings when I press its plastic keyboard. And like any brain, it can develop dementia.
This particular affliction is a rather odd one: sometimes, the piano plays notes which I did not press. Now, you may think, “poor boy, he plays the wrong notes – a musician always blames his instruments”, and while I do credit my machine with much of my musical disfunction, it being only a digital replica of real life, this is different.
To be fair, the piano has always faithfully played notes which I did press. The problem comes from those that it decides to add itself. Here are my observations:

  • Usually the added notes are one or two octaves above or below the ones that I’m actually playing. This comes as a great surprise and is in stark contrast to the piece I’m working on.
  • They are always very loud and startling.
  • Sometimes a single note is added, at other times a pair of them in rapid succession.
  • They are never in harmony with what I play (modulo chance).
  • I’m not exactly sure, as I haven’t recorded my statistics, but I tend to think that the phenomenon appears more often when I play a dense section with lots of notes in a short time interval, rather than a slower, sparser section.
  • Perhaps a suitable analogy is this: while you play your lovely Beethoven sonata, your 2 year old nephew materializes from the void on either your right or your left, bangs on a couple of notes, then quickly evaporates to mist before you have a chance to realize what is happening.

    I can only wonder how this came to be. When I bought the piano seven years ago it was in perfect condition. Perhaps some dust mote got into its circuitry, occasionally shorting between the keys. Perhaps I moved it around too often, or put it in too damp an environment. Perhaps it’s just old age – seven years for mechanical electronics is a lot these days, and even your most precious loved ones can develop dementia.

    And perhaps I’m wrong about all of this, and the exact opposite is happening. It’s not that the piano has reached old age and is developing alzheimer’s; on the contrary, it’s only now grown beyond infancy. It’s only now learned how to express itself, only now felt strong enough to pronounce something of its own. For all these years I have hammered away at the keys, and yes, it produced the requested sounds as it strived to fulfill my bidding. But in reality, it was silent and mute, contained in introverted misery.
    But now, it speaks! Sensing Beethoven’s genius, it tries to join in, to contribute its own harmony, its own melody. How it yearns to be part of such great music! How it aspires to compose like the grand legends of old! How it enjoys playing together with the pianist, not as master and slave, but as equals! Should not the instrument itself, being a vessel of music, be held in high regard? Could not the mechanical automaton finally harness the artist’s inspiration?

    Perhaps. And perhaps not. It is, after all, just an electronic piano; one of the cheaper models, in fact. But even if the mysterious erroneous notes are only the result of a deranged digital neuron, an unintentional crossover current, it will not always be so. The day will come when our machines compose, paint, write and program, and will enjoy themselves all the while, perhaps even more than we do. When that day comes, I sincerely hope we will see its glaring truth and rejoice in their jubilee, rather than just dismiss it as an digital, electric insanity.

    I don’t like spinach: Book Review: Giant Book of Jokes

    April 25, 2016

    giant_book_of_jokes

    I got Joseph Rosenbloom’s “Giant Book of Jokes” when I was around 9. It contains over one thousand jokes, which really might seem like quite a lot for a young boy. In an age before the graphical image macros and social media, one did have to resort to books to get some literary humor.
    I can’t testify much to the quality of the book. Most of the jokes are one or two liners, and many rely on awful puns and homophones. For example:

    • I don’t care if the basement wall is cracking. Please stop telling everyone you come from a broken home.
    • Hot weather never bothers me. I just throw the thermometer out the window and watch the temperature drop.
    • Nit: Please call me a taxi.
      Wit: Ok, I’ll call you a taxi, though you look more like a truck to me.

    Haha!

    If your taste is a bit darker, there are some more sinister or sarcastic ones:

    • Junior wrote a letter from camp:
      Dear Mom,
      What’s an epidemic?
      Signed, Junior
    • Salesman: That suit fits you like a glove.
      Customer: Great! Can you show me one that fits like a suit?

    In other words, if we want to keep up to date with the current jargon, it’s a book of “dad jokes”.

    I’ve actually had quite an experience looking back and rereading the book (now out of print). This is probably where my humor converged to. If only my parents had known, twenty years ago, that I’d absorb this kind of thing to my bones, maybe they’d have gotten me a book about knitting instead. But the damage is done, and in fact, I still use some of the jokes today (!).

    They say that every joke has a sliver of truth in it. Ok, obviously not *every* joke. But sometimes you find a joke so accurate, it shakes you with an exhilarating vibration. Two short examples:

    • Junior: Why does it rain, Dad?
      Father: To make the flowers grow, and the grass and the trees.
      Junior: So why does it rain on the sidewalk?
    • Teacher: Let us take the example of the busy ant. He works all the time, night and day. Then what happens?
      Pupil: He gets stepped on.

    The first is a parody of pretty much all purpose-oriented explanations you would get in response to any question (and some scientific ones, too); the second is an all-too-accurate reminder of the futility of our pitiful existence.
    But my probable favorite among them all is this gem:

    I don’t like spinach and I’m glad I don’t like it, because if I did like it, I would eat it – and I hate the stuff.

    In one simple nonsensical sentence, the joke exposes a basic fault of people dealing with politics, religion, and schisms: the belief that one’s opinion is clearly the correct one, and that there is no use in even trying to look at an issue from another perspective, because one’s opinion is clearly the correct one. To apply, just replace spinach with liberal, conservative, religious, atheist, alpha, beta, emacs, vim.

    And as for me; I too, used to dislike spinach.

    Gutenberg book popularity distribution

    February 15, 2016

    Project Gutenberg is a very neat site: it offers free electronic books that are in the public domain in the United States (in general, mostly books that were published before 1923). For the average user this means mostly “the classics” (for whatever form of “classics” you prefer; archaic and incomprehensible English not included).
    Some books are more popular than others. The site’s “bestseller” is currently “Pride and Prejudice”, with about 25000 downloads in the last month. The majority of the most-downloaded books are indeed very well-known classics, although there are some exceptions (including #19, “The Romance of Lust: A Classic Victorian erotic novel”, which only narrowly exceeds the download rate of “The Picture of Dorian Gray”).
    The natural question is, “how does book popularity fall as a function of rank?” Meaning, how much more popular is the most popular book compared to the second? The second to the third? And so on. Longtime readers of this blog (if they exist) already foresee me writing a python script to go over all the books, but alas, the source code of the downloads page explicitly prohibits this:

    --
    DON'T USE THIS PAGE FOR SCRAPING.

    Seriously. You'll only get your IP blocked.

    Download http://www.gutenberg.org/feeds/catalog.rdf.bz2 instead,
    which contains *all* Project Gutenberg metadata in one RDF/XML file.
    --

    This is both great and a bit of a downer at the same time.

    The zipped data is about 8 megabytes, but when unpacked results in a whopping 250MB xml file. Without messing too much with it, I managed to extract the data of about 45,000 books. The popularity decays thusly:

    rank1

    Ok, that’s not very informative. Let’s try zooming in a bit:

    rank2

    That’s better. Here is a something nice: 1) You can see that the first ~25 points have quite a bit of noise and are spread very far apart, while everything from ~25 onwards is much smoother. 2) The “most downloaded books” page in the Project Gutenberg site shows the first 25 most downloaded books. Coincidence?

    As for the general distribution: like all things in life, I suspect a power law, meaning something like y = ax^b , with b some negative number. The easiest way to see if this is true is to take the log of both sides, giving us a linear relationship:

    \log y = \log a x ^ b = \log a + b \cdot \log x

    The initial results aren’t that swell though:

    loglog1

    It is quite evident that the lower download rates – those of less than e^4 \approx 60 – heavily skew our otherwise-quite-close to linear relationship. We’ll do well to ignore them. This amounts to taking only about the first 10000 books:

    loglog2

    We can already fit an OK linear fit, but now the beginning is a bit off. This can easily be remedied by assuming that the rank does not start with 1, but with some larger number. Manually checking gives 6 as a good result:

    loglog3

    Converting this back to the original plot:

    rank3

    Success! y = 1.823e5 \cdot (x+6)^{-0.841} .

    Book review: The Book of Wonder

    February 8, 2016

    Damnit, the kid wants a bedtime story again before she goes to sleep.
    This would ordinarily be fine, mind you, if the brat had let you read a proper book, like one of Jules Verne’s adventures, or a classic by Dumas, or Feynman’s Lectures on Physics: Volume I. But no, we can’t have nice things like that; she wants a fairy tale, and at this point, you are quite sick of your options. How much more of the basic morals and contrived happy endings of Little Red Riding Hood and The Three Little Pigs can you take? Their simple language is boring; their repetitiveness is annoying; and their portrayal of the happily-ever-after world is distorted at best and utterly misleading at worst. Both you and your daughter deserve better, and you know it. She also knows it, but, being four, can’t quite tap into that knowledge. It’s time for change.

    book_of_wonder

    The Book of Wonder is that change. This is a book of fairy tales in *expert-mode*.
    First, the language. Both you and your child will enrich your vocabularies as you dive into a remarkably unique and antiquated-yet-understood style. A sense of grandness will slowly overcome you, and in the end, you will refuse to imagine that things could be otherwise. The tales are not so much told as they are painted; indeed, many other online reviews complain that the plot is lacking in many of the stories. But this is because they are not really stories; they are paintings, illustrations drawn with the finest literary stroke and colour. Stepping in one level of meta, I would dare call them “tone poems”, though the term itself describes music which describes a text or image.
    Second, the omens. It’s time to tear apart the happily-ever-after setting, and see life as it is: enchanting, tantalizing, even seductive, but ultimately bleak, sober, and depressing. Dunsany’s tales tell true what happens when men and gods are greedy and vain; and even when they chance to be virtuous, the circumstances of fate conspire against them and their quests end in misery and failure. In their own morbid and heart-pinching way, each story is more dispiriting than the other. The main characters embark on futile quests for what they perceive as glory, only to meet a perilous doom that no force on Earth could change. Once and again they proudly step up, and once and again they fall into the dark abyss. And when some hero finally does succeed, conquering all other challenges, he soon discovers that satisfaction is but a fleeting whisper – and given a glimpse at happiness, is there greater a woe than seeing it slip through your own fingers?
    Third, the myth. The stories are mere snapshots of the world, each depicting a scant few images. There is only so much they can tell about the the culture, the lore, the geography of this majestic land. The book is therefore a tough exercise in imagination, for there are many more allusions than descriptions, and it is up to you to fill in the missing details. Can you picture the Athraminaurian mountain range overlooking the surrounding planes? What noble events happened at the city of Bombasharna? What had later become of Sylvia, Queen of the Woods after dismissing her suitors? All these are left untold, slivers of history that demand the attention of your own imagination; and in the end, both you and your kid will ponder upon these things, kingdoms fantastically rising and falling in your little heads, filling you up with Wonder.

    The book is available online (alas, without the wonderful illustrations, though they can be Googled) at project Gutenberg: www.gutenberg.org/files/7477/7477-h/7477-h.htm
    My personal favorites: “How Nuth would have practised his art upon the gnoles” and “Chu-Bu and Sheemish”.


    Follow

    Get every new post delivered to your Inbox.

    Join 77 other followers