Arvind Narayanan's journal [entries|archive|friends|userinfo]

Observations from Chicago [May. 16th, 2012|12:28 pm]
[Tags|, ]

A couple of weeks ago I was in Chicago as a tourist. It was my first time in the city. The usual caveats about my "observations" posts applies — I spent all of 48 hours there, and probably don't know what I'm talking about.

Somehow, during this trip I got into my city groove again. That involves, among other things, talking to strangers. A lot. Whenever I do this, incredibly weird things happen — like walking into a random bar in Ukrainian village and finding that the first person I talk to is someone I apparently went to middle school with back in India.

Anyway, without further ado:

Transportation

Driving seems to be the easiest way to get around anywhere except downtown, and possibly even downtown. I think the opinions I heard about driving being a nightmare are greatly exaggerated. Parking is apparently expensive, but whatever.

The metro is quite decent as well. Overall I think the transportation options are great.

There were far fewer cyclists than I would have expected. I suspect this is because of the weather, especially the wind.

There is cellular coverage in the Subway! Why is it different from New York?

Neighborhoods

The city is quite segregated, way more than New York. It's amazing how the demographic on the Metro changes from all-black to almost-all-white within a couple of stops.

East Village has a lot of character. For example, there's a Mexican dude selling vegetables all day out of the back of a truck at the corner of Paulina and Chicago. Nice of the cops not to shut him down.

Hyde Park (where Obama lived), is a Black neighborhood that's not poor. I'm still trying to develop an intuition for such neighborhoods. For example, it's impressive that they stay segregated despite the apparent absence of economic stratification. Impressively bad, that is.

I failed to get the supposed snooty vibe from Lincoln Park. Maybe I didn't spend enough time there, or maybe I'm snooty myself.

Colleges and universities

There was a surprisingly large number of colleges/universities in the areas I visited. In some places, one in every block, or so it seemed. And there was a student center (housing + recreational facilities) that is shared by four universities. 

The University of Chicago is... unique, both the architecture and the atmosphere. My first thought was that it looked exactly like Hogwarts. Definitely worth a visit.

I hung out at DePaul for a while, and the vibe was interesting. The kids seemed excited to be there, just in the course of a normal day. Later I looked it up and found that it has often ranked #1 in student satisfaction.

Miscellany

I talked to a Chicago native and was blown away by how thick the accent is. I had no idea. I guess we hear very diluted Midwestern accents in the rest of the country.

I took a chance on the Lincoln Park zoo, even though it was on the standard list of tourist activities. It was actually quite nice.

There was a secret service vehicle stationed outside Obama's house — where he still spends his holidays — but otherwise everything is normal. There is an elementary school directly across the street from his house, and children were playing on the street. When those kids grow up, they will probably have amazing memories of playing right outside the gate of the President's house as five-year olds.
LinkLeave a comment

This spammer is a Magnificent Bastard [May. 15th, 2012|11:21 am]
[Tags|, ]

I've watched with fascination as spam has grown more sophisticated over the years. This email I received earlier today is among the best I've seen:
Hello Arvind,

Are you the person responsible for adding web content to the following page: 33bits.org

I am one of a small group that recently began a comprehensive online project focused on educating interested people about computer science. The website started as something small and has since grown to include thorough resources on things like the PERL language, human-computer interaction, computer animation, and even the evolution of computer science as it intersects and changes musical technology. Most of all we aimed to make the project accessible and have seen it put to good use so far.

I'd love to share the resource with you -- would you be interested in checking it out, perhaps offering feedback, and exploring the domain? It would be such a pleasure to hear from you!

Cheers,
Olivia Leonardi

As we look ahead into the next century, leaders will be those who empower others.
Bill Gates
There are so many things to admire here — figuring out my name and email address from my blog (although that's very common these days), the fluent prose (by spam standards, of course), the touch of verisimilitude via the quote, and most of all, the reasonably good customization of topics mentioned to the topic my blog covers.

It would be very impressive if this operation were fully automated, but I suspect there is some human involvement here, simply because that's probably cheaper.

I get enough spam because of my blog that it's obvious at a glance that it's spam, but I bet it's good enough to fool a lot of people. It would work even better if they added a check to make sure they don't send more than one to the same author. Here's another one I got; you can see the impressive degree of customization:
Hi Arvind,

I am curious if you are the person responsible for adding content to the following page: 33bits.org/2009/12/02/the-entropy-of-a-dna-profile

If not, feel free to forward me on to the correct person! I came across your page during my research for a project for which I am contributor. It is a research project that examines how biology has evolved from being a scientific study into a practice that has the power to affect global change for the better. The recently completed resource offers articles with an insightful look for anyone considering or currently in the biology field.

I would love to send over more details about this project and partner with you, let me know!

Thanks for your time. I look forward to working with you!
Madison

We are what we repeatedly do. Excellence, therefore, is not an act but a habit. - Aristotle
I wonder what's the play here — to get people to contribute articles to a spam site? Or just link to them? Either way, as much as I hate spammers, I can't help but wish this one good luck :-)

Comments on Google+
Link3 comments | Leave a comment

Exercise and Diet Update [Dec. 7th, 2011|01:18 pm]
[Tags|, , ]

In the last year or so I've done very little weight training because of intermittent health problems, because of the amount of time that a gym routine eats up, and plain old excuse-making. As a result, I'm about 25% behind where I used to be on most exercises. I'm hoping that most of this is attributable to loss of neuromuscular adaptation than loss of muscle.

I'm back to a regular routine now, mostly because I bought a set of weights at home. It's only 110 pounds total, but surprisingly I'm able to train most muscle groups effectively by varying form or substituting different exercises that target the same muscle groups (lunges for squats, etc.). I'll probably find it inadequate once I regain strength, but some extra plates should fix that. The only exercise that this set is useless for is deadlifts — the bar just isn't strong enough to load adequately. So I'm going to try to hit the gym once every two weeks or so, just for deadlifts.

The reason that the new regimen is working well is that lifting at home seems to require far less time than at the gym, for various reasons. I wish I'd known this earlier. I also hadn't realized how cheap these weights are — $75 on Amazon with free shipping. I don't know why physical stores even exist any more.

Diet-wise, the main change is that I've switched to brown rice. It helps me avoid food comas and blood glucose swings. It's totally worth it. I'm also eating less meat when I'm not weight training.

My daily pills now include Vitamin C and Coenzyme Q10, in addition to multivitamin and Omega-3. I've dropped green tea.

Holler if you'd like anything explained further.

Comments on Google+
LinkLeave a comment

When Half My Brain Woke Up [Dec. 3rd, 2011|01:25 am]
[Tags|, , ]

Over the years, I've had occasion to describe in this journal my experiences with various brain warts including sleep paralysis, medication-induced amnesia, and bizarre dream states that occur during sleep phase transition. Tonight I can add to that list perhaps the strangest experience of them all, something that happened barely a couple of hours ago. It appears to have been confusional arousal — waking up in a stupor — of extreme severity.

The backdrop for this episode is that I'm jetlagged from international travel, and have had unusual sleep hours during the last few days. Irregular sleep appears to increase the likelihood of most parasomnias including confusional arousals.

Anyway, I feel asleep at my desk while watching TV1 at around 10:30pm, and awoke about half an hour later. I use the word 'awoke' lightly. Very lightly.

I was dimly conscious, but most of my brain wasn't working. In particular, I had no idea who or where I was. You might wonder if I was scared. Funnily enough, I didn't have nearly enough cognitive function at this point to be scared, or to know that anything was wrong. You'll see in a moment.

I could perceive shapes and objects around me, but these held no meaning — I didn't know what I was seeing. The first improvement over this extreme stupor came after a few minutes, when I was able to tell if I was looking at one side of the room versus the other. Most higher brain functions remained elusive.

The big moment came when I realized I was a person.

This was the highlight of the entire experience. It turns out that you can be conscious — just barely — without your sense of self. I would have guessed otherwise, and I feel very fortunate to have experienced it. It is obviously impossible to fully describe in words, but without your sense of self you have bits and pieces of awareness floating by, without everything crystallizing into a coherent worldview centered on one entity, yourself. I'm sure it's entirely superfluous to remark that the experience is like nothing else.

The onset of self was most definitely sudden and not gradual. It was amazing, to the extent that anything can be amazing when you're in a bloody stupor.

Although I was aware that I was a person, I still had no clue who or where I was. But things seemed to happen faster after this point, which I suspect is an illusion due to my remembering more from this period. The big change was that I was actually able to direct my thoughts, rather than passively drifting through an ooze of semi-awareness. Naturally, I decided to utilize what cognitive powers I had toward determining my identity.

After some more time passed, I had made no progress on the who-the-fuck-am-I question, but I realized that I was in an apartment. I didn't know I was sitting, primarily because I wasn't yet sufficiently aware of my own body. Meanwhile, as I tried to recall who else lived in the apartment, my best guess was that I had a wife and a newborn, but I wasn't sure. (This turned out to be an accurate description of the main male character in the TV show I was watching when I got knocked out, which must be why I got that impression.)

Over the next few minutes, as my cognitive abilities continued to improve, I determined I was sitting at my desk and remembered that I lived alone. This made me realize in an abstract way that my situation was scary, but I wasn't able to feel scared in the usual, visceral sense of the word.

But the worst was over, and the final step was being able to recall my name, what I did for a living, and so forth. I then breathed a sigh of relief and slowly stood up to contemplate what had just happened and what to do next. Incidentally, as with most such episodes, I had a poor perception of time, but retrospectively it likely lasted less than ten minutes.

It gets boring from here, so the short version is that I made sure my brain function had returned to normal, called my neighbor over until I was sure I was out of danger, talked to a nurse on a 24/7 hotline who told me it might be TIA (mini-stroke) even though the symptoms I reported were nothing like it, and finally Googled my symptoms to conclude it was most likely a harmless parasomnia.

1When I say TV I mean Hulu on my laptop. Is that pretty much understood these days or does it need a footnote?

Comments on Google+
Link2 comments | Leave a comment

Observations from LA [Oct. 3rd, 2011|12:56 am]
[Tags|, ]

It is impossible not to notice how hostile the city is to walking, and to me this was the characteristic that stood out more than any other. Even in the historic downtown district, the streets are depressingly wide and automobile-focused. 

In particular, the sprawl completely ruins Chinatown, which has a decent share of shopping but is totally missing the vibe. There were way fewer people around than I expected and both tourists and locals seemed apathetic or depressed about being there.

I need to figure out a better way to find a hotel next time. The cheap ones all seemed to be in bad neighborhoods, so I picked one that was moderately priced and had good ratings on Yelp, although some of the reviews described the amenities as "basic." That turned out to be a gross   understatement — "Spartan" would have been closer to the truth. It also had an insane system of not double but quintuple parking.

Santa Monica and Pasadena seem to be very good choices for places to watch pretty people walk by. And the houses in Beverly hills are pretty much how one would imagine them to be.

I had a disagreement with a friend about the fashionability of UCLA students. She said she was impressed; I was rather disappointed and felt they didn't even seem to be making an effort, especially considering the proximity to Hollywood. Other opinions welcome!

Finally, I believe that the story of human progress and civilization — past, present and future — is basically the story of increasing human population density. In this view, the success of megacities is crucial to the continued progress of our species. This is something I'm very interested in. 

Spending time in LA was therefore an interesting opportunity to reflect philosophically. The city (and the Greater Los Angeles Area in general) is an interesting and important data point. It's obviously not an ideal layout, but there's a lot to learn from it. Looking down from the Griffith Park Observatory at dusk upon a million flickering city lights that looked like a giant, pulsating brain was a particularly poignant moment.



Mandatory disclaimer: this is all based on a single weekend. Major cluelessness should be expected.
Link1 comment | Leave a comment

A cheap and simple standing desk setup for easy sit/stand alternation [Sep. 5th, 2011|06:53 pm]
[Tags|, ]

Now that it's widely acknowledged that sitting will kill you and standing desks have officially become cool, those of us who got on the standing train a few years ago are feeling smugly superior ;-) Once you start doing it you tend to accumulate tips, tricks, and hacks to make standing work better, and I'd like to share some of mine to welcome newcomers into the fold.

My primary hangup in switching to a standing desk was the difficulty of standing all day. Several of my friends who tried it ended up abandoning it for the same reason. But here's the thing — standing all day is as bad for your health as sitting all day, so you shouldn't be trying to do that in the first place. What you need instead is a desk that allows you to easily alternate between standing and sitting.

The two main solutions I've seen are adjustable desks and high chairs. Both of these have problems. Adjusting a hand-cranked desk is frustrating and time-consuming, whereas electric ones are bloody expensive. High chairs are awkward and uncomfortable; you lose the other ergonomic benefits of good office chairs.

The most effective sit-stand solution I've found is also the simplest and possibly the cheapest: put a coffee table on top of your regular desk. Use two monitors (or a laptop and an external monitor), one underneath and one atop the coffee table. When you need to switch between sitting and standing, simply switch monitors.


Click to embiggen. Contents of whiteboards blurred to protect world-domination plans.

Problem solved. You're welcome.

Other points of possible interest:
  • I spend about two-thirds of my time in front of the computer standing and one-third sitting.
  • When sitting I simply use the laptop keyboard instead of having to move things up and down.
  • Unexpected side benefits: I burn more calories, and I'm much more likely to write down whiteboard-worthy thoughts. (As a researcher, whiteboards are important to my productivity.)
  • The incredibly thin keyboard in the picture is the Logitech Wireless Solar Keyboard. I recommend it!

Comments on Google+
Link3 comments | Leave a comment

Ubuntu continues to be a joke [Aug. 21st, 2011|02:57 pm]
[Tags|, , , , ]

Two and a half years ago I wrote that Ubuntu was a joke. After upgrading to 11.04 recently, I'm here to report that unsurprisingly, Ubuntu remains a joke.

First of all, the new tablet-inspired interface, Unity, is simply not ready to be taken seriously yet. Maybe it will mature in a year or two, but right now it's more-or-less unusable for a work machine.

But hey, a six-monthly release cycle has its constraints, and if I want polish I should stick with the Long Term Support releases, right? Actually that strategy only works in theory, because of the amount of third-party software that depends on the latest libraries. So I went for the next best option, which is to disable Unity and go back to the Classic interface.

And the first thing I noticed was Fitts's law violations of a particularly horrific kind.

When a window is maximized, the top right corner doesn't activate the close button — there's a one-pixel gap. It you haven't experienced this, it's an egregious sort of user-interface bug that's been referred to as snatching defeat from the jaws of victory. "Throwing" the mouse to the top right corner to close the window is a deeply-ingrained muscle-memory feature for most experienced computer users, and breaking these expectations tends to make us rather acutely uncomfortable.

This is a regression. The bug wasn't in previous versions. If I remember correctly, some themes had it, but you could change the theme to get rid of the problem. That doesn't work anymore.

It gets worse. It's not that the top right corner does nothing — it passes the click through to the window underneath. This is just bizarre and results in a tragicomedy of errors. I always have a maximized Chrome window open, and since Chrome, bless its soul, uses its own titlebar, it doesn't suffer from the bug.[1] So whenever I'm working on a maximized app that I try to close, Chrome receives and processes the click, and I end up unexpectedly closing an average of 23.7 tabs.

If that's not infuriating I don't know what is.

There are other "features" that laugh in the face of Fitts's law such as "overlay scrollbars" which you have to squint to even see. As a bonus, these scrollbars make it impossible to throw the mouse to the right edge of the screen to drag them, breaking another hardwired habit.[2] There are many more UI problems, but this should give you a sense of the I-can't-believe-they-pushed-this-out-without-testing feeling that you get with every release of every Linux distro, ever.

There's a common thread in the annoyances I described, and it's a sign of a deeper problem. Ubuntu is trying to adapt itself to tablets — hence Unity; hence overlay scrollbars — which is great, but they're going about it all wrong. Touchscreen devices are fundamentally different from mouse-based ones, and an OS that targets them needs to be rethought from the ground up. There's a nice article on Ars Technica that discusses how Windows 8 is trying to do this.

I believe that the only tenable course is to fork the interface. Instead, Canonical seems to be mutating Ubuntu into a platypus, attempting to create something that will work on both types of devices. It seems to me that this approach is prone to disaster and the problems I described will inevitably get worse in future releases. [3]

Finally, since my rants on the subject seem to attract numerous random Linux apologists, I feel the need to declare that I use Ubuntu as my main system because programmability, security, and open-sourceness (is that a word?) easily trump the usability drawbacks for me. The point of this post is that the "Linux for human beings" ideal doesn't seem to be getting any closer to reality.

[1] Note the irony: Chrome is the only app I never actually try to close.
[2] Fitts's law in Gnome is something I've been writing about since 2004.
[3] I don't follow Planet Ubuntu or other development channels any more; maybe they know what they're doing. This is just my impression as a user.

Comments on Google+
Link3 comments | Leave a comment

The New Scientific Revolution [Jun. 25th, 2011|09:36 pm]
[Tags|, , , ]

I thoroughly enjoyed this lengthy but brilliant article on criminal justice by star neuroscientist David Eagleman, which serves as a case study of the impact of science on moral questions. Eagleman starts from the examples of University of Texas shooter Charles Whitman and another accused man, both of whom were later found to have brain tumors that completely explained their criminal behavior. Next, he rejects the tendency to sweep these under the rug as extreme or atypical cases, drawing upon the example of a Parkinson's drug that can produce equally aberrant behavior in much larger classes of people.

Eagleman argues forcefully that there is no categorical difference between these examples and everyday criminal behavior. The distinction comes down to the simplicity of explanation: a single drug or tumor versus a complex of genetic and environmental factors that affect neural circuitry and chemistry. But it doesn't matter—either way, the invocation of "free will" as a causal agent for actions is equally wrong.

Philosophers bicker endlessly about free will in the abstract, but Eagleman's ends are eminently practical. His point is that neuroscience exposes blameworthiness as a meaningless concept, and hence it should be irrelevant as a legal principle. Of course, he is not advocating letting criminals walk free; instead, he shows that the foundational thinking behind retributive justice is fundamentally at odds with science, and that a theory of justice that focuses on future behavior of the accused and on rehabiliation is the only ethical course.

While this might surprise or shock some of you, it is not the reason for this post. What I think is remarkable about Eagleman's article is it illustrates, blow by blow, how science can essentially settle a question that has traditionally been considered to lie almost entirely in the realm of philosophy. I will admit that philosophy still has a role, but a ruthlessly empirical kind rather than the traditional one.
 
Pardon my excitement, but the importance of the broader movement cannot be overstated. If neurolaw is looking to effect no less than a revolution in the legal system, elsewhere the New Atheists are arguing increasingly successfully that science can and should take on religion, and that the two are fundamentally incompatible. Sam Harris brought a lot of this together in his TED Talk "Science can answer moral questions".

Buttressed in part by the recent meteoric increase in the power of data to address human questions, we're seeing a spectacular land-grab by science and empiricism from other domains of knowledge and understanding, and the rejection of the idea of separate spheres of applicability. Clearly this movement is in its early stages and faces a long road ahead, but I believe that the wheels have been set in motion and it is only a matter of time until we witness the final ascendancy of science as the ultimate arbiter of human actions—the culmination of the scientific revolution.
LinkLeave a comment

StumbleUpon Considered Harmful [Jun. 24th, 2011|10:03 pm]
[Tags|, ]

About a week ago I noticed a large, anomalous traffic spike on one of my articles over at 33bits.org. These visitors seemed to bounce immediately, not viewing any other pages, and were much less likely to engage with the page in any way, such as commenting. Numerically, this traffic source contributed about 75% of the total for that article, but only 2 of the 64 tweets came during the time window of the spike, which means that these visitors were about 100 times less likely to engage with the article as others. An admittedly crude measurement, but even if it's within an order of magnitude, it means that this is a "poor quality traffic source" in SEO parlance—an extraordinarily poor one.

Then I glanced at the referer chart and noticed that the source was stumbleupon.com. At once it all made sense.

Let me explain. The average StumbleUpon user turns to the service when they're bored, so bored they can't even go to the trouble of endlessly clicking on links on web pages like most of us do. Instead they click repeatedly on the "Stumble" button which takes them to random web pages supposedly somewhat tailored to their interests. They're not in it to read the articles (any more than someone who's flipping through the pages of Playboy is in it to read the articles). Instead they're in it for the tiny dopamine spike that they get each time they land on a new page.[1]

Nine times out of ten, such a user will bounce immediately after looking at the title of your article, deciding that it's not something they're interested in. If they do start reading, a further nine times out of ten they'll bounce somewhere into the second paragraph. If you don't believe me, try using the product, and see how quickly you find yourself doing the same thing.

Before I go on to make my point, I should say that this is nothing more than a minor annoyance to me personally. I'm an academic; I'm not trying to monetize my site. And 33bits is a wordpress.com blog, so I don't pay hosting costs. The only reason I'm annoyed is that when I look at my stats page to see what sorts of articles my readers are most interested in, I have to mentally discount the articles that got StumbleUpon traffic. But anyone who pays hosting costs for their blog and is trying to make money (or spread an idea, or whatever) might want to take note of the following.
The architecture of StumbleUpon is fundamentally exploitative of the quid-pro-quo nature of free websites. A pageview from a StumbleUpon visitor costs just as much in bandwidth, but is a couple of orders of magnitude less likely to result in any sort of engagement. Your website wasn't meant to be viewed in a frame, so don't let it.
Even though StumbleUpon has only 10 million users, this is a bigger problem than might seem at first sight. The recommendations that the system makes are voting-based, so the mechanics of popularity and the resulting traffic patterns are essentially the same as with Digg and Reddit, although the engagement numbers are very, very different. This means that most days you'll probably see no StumbleUpon traffic, but one day you'll get unlucky and the resulting spike will dominate your traffic and costs for that month, but you'll have nothing to show for it.

I would recommend some framebusting and User-Agent sniffing code to politely tell StumbleUpon users to go somewhere else, but whatever you do, don't put a Stumble button on your pages!

[1] I'm sure there's a sizeable fraction of users for whom the collaborative filtering aspect works well, and who consequently actually read the articles and engage with the sites. But even if half the users fall into this group (although I doubt it's anywhere near that high), most of the traffic generated by StumbleUpon users to any given site is going to be low quality because the dopamine junkies make 100x more clicks.
Link1 comment | Leave a comment

Tupper’s Self-Referential Formula Debunked [Jun. 22nd, 2011|01:37 pm]
[Tags|, ]

I have a habit of tweeting things that necessitate long explanatory blog posts. A few days ago, I wrote of the “amazing” Tupper’s self-referential formula,

The formula in question is

which, when plotted over a 106x17 rectangle starting at (0, n) where n is a certain 543-digit number, results in:

i.e., it plots “itself”.

In this post I will explain:
This formula is not self referential, any more than a program that reads its source code from disk and prints it is a quine.

The value of n encodes the bitmap of the image, and the formula acts as a print statement. It turns pixels on or off according to the binary representation of n.

The formula is deceptively impressive; I will show you how to construct a much simpler one that does the same thing.

Even though the claim of self-referentiality is bogus, the formula does something kinda cool.
If we want to construct a formula that prints itself, the first thing to realize is that there’s no possible way that the mathematical content of the equation has enough “entropy” to encode the information content of the image, so a true self-referential formula is impossible. I will return to this point at the end, but let’s take it as a given for now.

So let’s instead “cheat” and encode the image elsewhere: say in the value of the co-ordinates at which the formula prints itself. We could pick either x or y, but let’s arbitrarily pick the y co-ordinate. How exactly do we encode the bitmap? Let’s pick the simplest possible encoding: the bits of n, which is the starting value of the rectangle’s y co-ordinate, will represent individual pixels.

Now all that the formula needs to do is: for each value of (x,y), output a specific bit of n. A slight catch is that the formula doesn’t have access to n, but it has access to y which is approximately equal to n everywhere within the rectangle (remember that n is a several hundred bit number). So if we ignore the right-most few bits of y, the rest of the number should be the same as n.

How do we output a given bit of n (or y) at the corresponding pixel? The first step is to turn the pixel coordinates into an array index. If h is the height of the image (we don’t know what the width and height are going to be yet), we can turn pixels into consecutive array indices like this:

hx + y

That would work nicely if the image started at the origin, but since it doesn’t, the array indices from the above formula won’t start at zero. We can fix this by instead using

hx + y%h

This ensures that we only look at the lower-order bits of y. We’ll need to make sure later that n is divisible by the height h, so that y%h has an initial value of 0. This will be easy since we’re not using the lower-order bits of n to encode the image, so we’ll free to play with those bits to make it divisible by h. Note that y has two functions: it acts as a bitmapped array, but the last few bits, together with x, act as an index into this array.

Now, given an array index hx + y%h, we can extract the corresponding bit of y (treated as an array) as follows:

y >> (hx + y%h) & 1

That is, first we right-shift y by the given number of pixels, then look at the last bit (standard C operators and precedence).

That’s it! That’s our formula. Happily, it fits neatly in one line, which means that we can substitute 10 in place of h h if we’re going to use a 10-point font.

One little gotcha: this prints all the bits of y including the right-most, but we need to avoid printing the few right-most bits since we don’t control them. We could modify the formula to add some extra right shift, or we could declare that we’re going to start the rectangle at x=1 :-) This means the minimum value of the index is going to be 10, which lets us ignore the last 10 bits. Behold, the formula:

prints itself at the rectangle bounded by 1 <= x <= 100, n <= y < n+10 where n is

11015155530099148746084767279873874328940939149851989606372628810148273717947674060433973614379127881410170934305801904435789783335689003112825326746673689719230041274521315982432509769292233761710401623099301073813173483881337369878043721541780302407745436861736032053101022122199579350872597421046628360

I calculated n by encoding the image in binary, then left-shifting by 10 bits, and adjusting the last few bits so that it is divisible by 10.

This is precisely what Tupper’s formula does as well, except (1) it assumes real-valued x and y instead of integer valued, necessitating floor signs, (2) it uses the ‘mod’ function instead of the % operator, (3) it uses negative exponentials of 2 instead of right shift; (4) because of the exponentials, the height of the image is bigger: 17. All of these make the formula look more profound, especially the appearance of ‘17’. I too, at first sight thought the numerical properties of 17 had something to do with it before I realized it was simply the height of the image!

If the formula I’ve showed you, as well as Tupper’s, aren’t self-referential but merely print statements, shouldn’t they be able to print any input and not just themselves?

Yes!

If there’s anything actually interesting about these two formulas it’s that graph of their plots over the integer plane contain all possible bitmaps (of height 10 and 17, respectively) if you look in the right area. For example, to get

from my formula, simply look at (1,1393927028945687951208608908854274144862220) whereas

is at n=2839549863835611243770369885760240519880614661852209842047097422873116957197820823170688580239030514282972465171635651597931422679050

and finally,

is at n=10972249630976314209007504532033134949682086639198171874178386489416721212125763915435428634919871166306043061044372149862503608116825035242203771489961723271194035787338485934044510302195667783070693718545221897410050191506550799292424771369239643895773826749855239799677873092167849216646372880455565320

Deep, isn’t it? Just kidding. It’s kind of like the infinite monkey theorem—yes, the graphs of these formulas contain the works of Shakespeare as well—except you also know exactly where in the graph to find them.

Let me close by explaining why it’s impossible to have a truly self-referential formula—in other words, a formula that prints itself starting at (0,0) is impossible. Such a formula would have to be truly self-referential to be able to print itself because it would have no external memory to rely on.

Consider the symbol ‘10’ in the formula I presented: it takes up over a hundred pixels—a hundred bits. However, it only encodes a 4-bit integer! (10 is 1010 in binary.) In other words, there is a huge discrepancy between the information content of the image and the entropy of the mathematical content of the formula. Even if you consider all the nonnumerical symbols that could have been encoded in 100 pixels, the discrepancy persists, and will only (almost) go away if you use something like a 2-bit font, at which size the text is unreadable. You might hope that the formula could somehow contain a ‘compressed’ encoding of itself, but mathematical operations aren’t good enough to do compression.

The only way to get around this limitation is to somehow augment the formula with “memory”. The easiest way to do it is to generalize from “formula” to “source code’ in (say) C, which means you can freely assign values to variables. Such self-printing code is nothing but a quine, albeit in a particularly nasty language, and I suspect it’s doable.

But a minimal way of endowing a formula with memory, and one that at least pays lip service to the spirit of the word “formula”, is to allow an assignment statement in addition to the usual mathematical operations, but nothing more. I don’t see an immediate reason why a self-referential formula of this type can’t exist, but at the very least, finding one would be an absolutely Herculean task. [Edit. Turns out there's a simple way to do it if you allow assignment; see comments.]
Link3 comments | Leave a comment

navigation
[ viewing | most recent entries ]
[ go | earlier ]