Monday, 27 July 2009

Polyglot Washing Books

Richard Ford, an Englishman, graduated at Trinity College, Oxford in 1817, and was afterward called to the Bar. But he never practised; instead he travelled extensively on horseback in Spain and wrote A Handbook for Travellers in Spain (1845) – a “charming account enlivened by humour and anecdotes,” and “a defining moment in English travel literature.” (Wikipedia)

I found an 1855 edition of this book online. It is a 947-page romp – to the extent that gentlemen from the Victorian era can be accused of romping. But what I like most is Murray’s Handbook Advertiser, appended to Volume I.

The advertising supplement contains ads for hotels, railways, field-glasses, passport agencies, portmanteaus, maps, flannel suits – in short, everything that the traveller might reasonably need, and a lot of other junk besides. I read every single page of it – all 91 ads – for I love things like Murray’s Handbook Advertiser. I liked the emphasis on care, craftsmanship and moderate charges, the testimonials from distinguished patrons, the deferential and courteous tone (“respectfully solicits”, “begs leave to recommend”) – I even liked the wanton deployment of fonts, the flagrant violation of every typographic tenet devised by man. But my favourite is this advertisement, appearing on the very last page of the handbook.

The product is funny enough as it is. But (in keeping with tradition established on another blog) a handful of my readers may derive additional merriment from it if they remember a certain embarrassing incident from two years back. To them, I supply the following keywords: me, Delhi, laundry, white shirt.

Polyglot Washing Books, whither wert thou then?

Friday, 24 July 2009

Saturday, 18 July 2009

In which attempts at humour run into a brick wall

Teaching Pratiti has three main advantages: (a) she is smarter than the average kid, so I need to put in less effort and can cover the ground faster; (b) in the garb of teaching Statistics I can get away with teaching maths (which is far more interesting); and (c) I get good food at her place. But sometimes I wonder if it’s all worth it. Because there are few things more dampening than to make clever comments before an unappreciative audience, and with Pratiti, this happens almost every week.

When I try to be funny, she usually quells me with a I-know-you’re-trying-in-your-silly-way-to-make-this-interesting-but-I-won’t-fall-for-it look. But more distressing is how so many of my clever comments are wasted on her because, being a kind of nerd, she often misses pop culture allusions which normal kids of her age ought to catch off the bat.

The other day I was explaining my preference for saying curves ‘hold water’ or ‘shed water’, rather than saying they are convex downwards or concave downwards. I said I find the terminology funny because it reminds me of Phoebe’s cute way of referring to G-sharp as ‘Ice Berg’ and A as ‘Bear Claw’ (because of her finger formations while playing them). But it turns out that she has never seen the Friends episode in question.

The week before, I was telling her about complex roots of cubic functions with real coefficients, and I quoted Yoda describing the Siths Lords’ Rule of Two: “Always two, there are. No more, no less.” Dashed clever of me, I thought it was. But it seems the misdirected girl has not seen a single Star Wars film!

Pratiti is one of those kids whose nerdy habits take them to the top of the class, but ever farther from normalcy. She has read the complete works of Dickens, but has never heard of I.R. Baboon. But I persevere: I will draw an approving giggle from her yet. Even if I have to quote Tolstoy in the next class.

Tuesday, 14 July 2009

A Tuesday Post

“In winter Hammerfest is a thirty-hour ride by bus from Oslo, though why anyone would want to go there in winter is a question worth considering.” So begins Neither Here Nor There, my second most favourite travel book in the world. Bill Bryson, fluent in at least one language, backpacks through Europe without a semblance of a plan. In Trouble Again: A Journey Between Orinoco and the Amazon hails from a similar but even more extreme school of travel writing – Redmond O’Hanlon travels uncharted rivers in a dugout canoe on a four-month journey to Venezuelan Amazonia to “party” with the Yanomami tribe, reputedly the most violent people on earth. “O’Hanlon’s approach to travel borders on the lunatic,” wrote a reviewer.

The polar opposite of this style of travel is the Conducted Tour. Since I have done most of my travelling with my parents who share my dislike for organized travel, I speak from limited experience. School excursions were, of necessity, conducted tours. So was a trip from Delhi to Agra with a busload of American law students, where tour guides first really started to get on my nerves. “Look to your left. Cowdung. All cowdung. Lots and lots of cowdung in India.” Tour guides hurry you all the time, reinforce stereotypes, mollycoddle you, force you into souvenir shops which give them kickbacks, and generally do their best to spoil your experience.

There are people who sign up for one-week conducted tours of South-East Asia, who “do” Europe in a fortnight. Nothing would induce me to spend that kind of money (assuming I had that kind of money) on such a trip, but I have to admit that the idea holds a strange fascination for me. Maybe this is because, deep in my guilty heart, I sometimes enjoy kitsch and the whole idea of naked consumerism. At 13,000 feet in the lap of breathtaking Himalayan scenery, I have been known to pine for Coke, and I would get a lawn flamingo for my room if only I knew where I could buy one.

That is why I thoroughly enjoyed If It’s Tuesday, This Must Be Belgium (though the fact that this is the first movie I watched since March might also have something to do with it). The film is a 1969 comedy which follows a colourful group of American tourists on a whirlwind conducted tour of Europe: “Nine countries in eighteen days. Four hundred and forty-eight dollars and fifty cents. No refunds.”

Which brings me to the topic of this post. Before I watched the film, I had a sort of idea that it features a snatch of dialogue like this:

“Where are we?” “I don’t know. What day is it?” “Tuesday.” “If it’s Tuesday, this must be Belgium.”

But it turns out there is no such passage in the movie. I am not sure about the day and the country, so maybe I heard or read it somewhere else. I am even beginning to wonder if I made it up in my head. If so, the phenomenon would be the opposite of cryptomnesia (I am sure they have a word for it). If anyone knows where the dialogue appears, please tell me. Extra credit to anyone who also tells me the opposite of cryptomnesia.

Monday, 6 July 2009


My brother Sujaan has a friend who plays in a rock band. Said band, for reasons best known to them, call themselves Ekuil-i-Brium. Maybe, like another band before them, they would like to say they are Equilibrium with a K. Anyway, it seems they want a logo, so Sujaan asked me if I could create an ambigram for them.

Before Dan Brown made John Langdon famous, I had been introduced to Langdon’s ambigrams through the work of the American mathematics writer Martin Gardner. I promptly entered upon a phase where, instead of doodling in class like I usually do, I would create ambigrams with names of friends. Then the phase passed, as phases are wont to do, I lost my notebook of ambigrams, and forgot all about them.

The request to design the logo gave me the opportunity to revisit this rather engaging pastime. Maybe my long sabbatical has made me rusty, but the end product turned out to be rather disappointing.
In terms of legibility and aesthetic appeal, Ekuil-i-Brium is by no means one of my best efforts. Moreover, it is too complicated to make a good logo. So Sujaan came up with his own design, which I have to admit is better than mine. (That rhymed!) His black-and-red themed logo is a stylized EiB in the shape of a guitar. Below the logo is the band’s name in *twitch* Papyrus.

But this logo was not to the satisfaction of the band members. They apparently said that an acoustic guitar does not suit their image, so they want it reworked to represent an electric guitar, which has more machismo. Strange are the ways of the hard rock bands.

* * *

The solution to last week’s problem is B-A-C-F-I-H-G-E-D-B. However, I will be taking B-A-D-C-F-I-G-H-G-E-B. Though this is not the shortest route, the Indian Railways are still giving me the discount either because they did not catch on, or because they are too nice. I had to take a suboptimal route because I need to visit A (Lucknow) and D (Hyderabad) in succession. If I have not already told you the reason, you are welcome to try and guess why.

Thursday, 2 July 2009

Travelling Traveller Problem

In August, I plan to go on a one-month tour covering several Indian cities (more about that in subsequent posts, if the plan works out). Now for circular journeys, the Indian Railways offers telescopic rates which are considerably lower than the regular fare. At these rates, I get to travel 7106 km (more than the distance from Calcutta to Berlin) at the incredible rate of 18 paise per km. The discounted fare for a round trip comprising 9 cities (marked in blue on the map below) works out to a little more than the return fare from Calcutta to Bombay.

But to be entitled to this discount, the Railways stipulates that you must visit the cities using the shortest possible train route. (I wonder who came up with this.) Many of you will immediately recognize this as an instance of the famous Travelling Salesman Problem.

TSP is a classic NP-complete problem, which means that it is likely that the worst case running time for any algorithm for TSP increases exponentially with the number of cities. Interestingly, when the number of cities is relatively small, humans are able to produce good quality solutions quickly. The solution of this particular TSP is therefore left as an exercise to the reader. The answer will be provided in the next post.

Letters have been assigned to the cities merely for convenience and have no bearing on the solution. The actual distance between the cities by rail is longer than the Euclidean distances. But the solution comes out to be the same in both cases. If you are freakishly particular, you can contact me for a table of the rail route distances between all the cities and I will happily oblige.

The first solution to intuitively strike you will very probably be the correct one. However, if you are interested in delving deeper, some hints are provided below.

  • My starting point will be Calcutta (B), but that is irrelevant to the solution of the problem.
  • The nearest neighbour heuristic, which may seem like the most obvious approach, goes as follows: start at some city and then visit the city nearest to the starting city. From there visit the nearest city that was not visited so far, etc., until all cities are visited, and you return to the start. But this heuristic often produces the wrong answer.
  • A better approach is to start with a subtour, i.e. a tour on small subsets of nodes, and then extend this tour by inserting the remaining nodes one after the other until all nodes have been inserted. A good starting tour is the tour that follows the convex hull of all nodes. This is a reasonable choice since the sequence of nodes from the convex hull tour is respected in any optimal tour.
  • If you want to write a program in Java to compute an approximate solution, you can find some useful pointers here.
Hat tip to Anasua and Rik for their inputs.