Nadodiyin Pulambal

A Wanderer Gripes

Archive for the ‘stuff’ Category

Stuff (mostly technical) that I want to remember. Best place for ‘em!

Posted by kovaiputhalvan on June 7, 2008

From Tumbolia:

You can write a regular expression that matches only strings of a composite number of x’s. (Hint: Too easy for a hint.)

Ok, this looks easy enough – but dang it, it’s 11.30, and I need to go sweep the house, swab down the floors, and do my bit to dispel the general air of run-downness that’s been hanging over the dwelling for the past I don’t know how many weeks. Will be back, tomorrow.

And no, I can’t think of a regexp that does that – yet.

Posted in Math | Leave a Comment »

Lightning in the Kitchen

Posted by kovaiputhalvan on May 4, 2008

This is so crazy that only yours truly could have been the perpetrator of the incident that I’m about to describe. Along with the Volcano Sauce Incident, the Medium-Size-Naai story, and my walking into a lamppost on Sampige Road in broad daylight while fully awake and sober, this is yet another thing that only K could have done. Ha.

The other day, I was sleepy, tired and hungry, having come back home early from visiting The Kid at my in-laws’s place, where my better half is currently in residence. I trudged down to the store nearby and picked up a pack of MTR Ready-To-Eat Bisi Bele Bath. The Bele Bath had to be made Bisi, of course. This, announced the lettering on the pack, could be done with the aid of a bowl of hot water, or with a microwave oven.

Sleepy eyed, and smacking my lips in anticipation of a hot serving of not-too-bad Bele Bath, I opened the cardboard pack, and slipped the foil pouch that lay within into the microwave, and turned on the oven. In about five seconds, I witnessed the dielectric breakdown of the air within the oven, as evidenced by a cloud that appeared between one of the corners of the foil pack and the oven’s walls, glowing purple-white, crackling and popping, with a few sparks flying about. This had the same effect on my system as swallowing in one gulp a double shot of freshly ground espresso, black as sin, hot as hell, without the sweetness of love, would have. I switched the oven off, and took a fresh look at the instructions printed on the reverse of the pack. They clearly said empty contents into a microwave-safe vessel, and proceed to shove it you-know-where. Even otherwise, every competent graduate with a degree in one of the electrical sciences ought to know what happens when metal of any kind is introduced into the cooking chamber of a microwave oven. Especially if the graduate in question had studied the theory behind microwaves as a partial requirement to earn one of his degrees.

The microwave is intact and in good working condition, which is just as well. On the positive side, I witnessed a not too small plasma in my kitchen, at extremely close quarters. How cool is that!

The day we decide to buy another microwave, I’m going to repeat the experiment described above, armed with a camera, unmindful of the objections that my better half will have. This is probably several years away in the future, though.

Glossary for the uninitiated:
Bisi Bele Bath A Kannadiga staple. Similar, but emphatically not the same as rice combined with a generous helping of Sambar. If you don’t know what Sambar is, WIYF :)
Bisi – Kannada for hot, temperature wise.
Bele – Loosely translates into pulses.
Bath – I’m stumped by this one. In this context, you can take it to mean “rice preparation” – but this is not its exclusive meaning, though.

P.S:
The sparks I can understand, but I wonder how the cloud happened? I don’t know if this is what a “normal” plasma looks like, or if something funny was happening.

Incidentally, all this happened shortly after I’d watched The Prestige on HBO. The movie had generous coverage of a device closely resembling Tesla’s Magnifying Transmitter.

Posted in Food and Drink, Humour, Personal, stuff | 5 Comments »

1492: Conquest of Paradise

Posted by kovaiputhalvan on April 5, 2008

Back online again. The tata indicom guys finally responded to my threat of throwing their router out of my window, and came down to fix the cable. So I’m wired again. Only, they’ve mucked up some router setting and I’m not able to view any page except Google from Linux! I’m reduced to running WinBloze to surf the Web while I figure out WTF is happening re. Linux and my router. I’m mystified… DHCP works fine, the DNS seems to be OK, ping and traceroute show that I should be able to reach the remote IP addresses that I want to talk to… but – this is a big BUT – my browser doesn’t show any pages from these places! For instance, I can login to yahoo mail on WinBloze, but all my browsers under Linux just freeze on “waiting for login.yahoo.com”. For the life of me, I can’t figure out what’s happening. Oh well, I just have to give it some time and thought, I guess.

Tomorrow’s a big day, I will finally put broom to dustpan and clean up the cumulative effects of my laziness that have made themselves felt all over the house. I hope it goes well.

Update, 06 April

Just got done with breakfast at the nearby darshini (someday I will have to expound on the distinctions between Tiffin Rooms, Darshinis, Upaharas and Sagars.) and bought a couple of newspapers. I wanted to start off with Operation Clean House by 8.30, but two idlis, a vadai (of course) and a cup of coffee have brought on me such a sense of contentment that I don’t want to start the dirty work before 9.30. As also the sense of pleasant disbelief that my internet connection is finally up and running after nearly three weeks of downtime, angry phone calls and more angry phone calls.

It is essential, however, that I get started soon. Once OCH is done, I have to read up on Broder et al’s Bloom Filter paper and troubleshoot my linux installation’s google-only fixation that I described above yesterday. Later in the afternoon, I’ll catch up with The Kid who’s now making cooing noises at the fan. Damn, bachelorhood is not a patch on fatherhood – but I will have to remain in this semi-bachelor state for a few months more.

Now let’s see. DHCP seems to be working fine, I get the correct IP address and netmask – except that I see an “eth0: no IPv6 routers found” message in /var/log/messages. Running ipconfig in WinBloze yields what seem to be IPv6 addresses for DNS servers. I don’t know if this could be the problem. DNS seems to be working fine, as ping and traceroute testify. That’s the weird part – I can ping, but I can’t connect via http! The DNS server that DHCP gets is different from the last time, though. Earlier I used to get 192.168.1.254 as my DNS server, and now it’s 192.168.1.1 – I don’t think this should really be creating any problems, though… the routing tables also seem to be just fine. This is probably some extremely trivial problem, the solution for which is staring at me as I write. As usual, it will take me several cups of coffee and several hours before I slap my forehead and let an expletive escape my lips.

Update: 06 April, an hour or so later

No coffee, maybe an hour. Got the sonofabitch. {expletive}. {expletive}. {yet another expletive}. My MTU was set to 1500, lowering it to 1400 fixed the problem, am writing this from where I should be! YES! Now I can go and clean up the house in peace. O frabjous day! Callooh, Callay! I chortle in my joy. I put in the unlikely title after realizing that the default MTU on most Unix boxes is (used to be?) 1492. I shall play Vangelis as I clean. Ha!

Extract from the iptables(8) manpage:

TCPMSS
This target allows to alter the MSS value of TCP SYN packets, to control the
maximum size for that connection (usually limiting it to your outgoing inter-
face’s MTU minus 40). Of course, it can only be used in conjunction with -p
tcp. It is only valid in the mangle table.

This target is used to overcome criminally braindead ISPs or servers which block
ICMP Fragmentation Needed packets. The symptoms of this problem are that every-
thing works fine from your Linux firewall/router, but machines behind it can
never exchange large packets:

1) Web browsers connect, then hang with no data received.
2) Small mail works fine, but large emails hang.
3) ssh works fine, but scp hangs after initial handshaking.

Workaround: activate this option and add a rule to your firewall configuration
like:

iptables -t mangle -A FORWARD -p tcp –tcp-flags SYN,RST SYN \
-j TCPMSS –clamp-mss-to-pmtu

Irrelevant Afterquote:

Why is it . . . that the first thing you are reminded of by something that happens around you, is something obscure and foreign, totally unrelated to the life and languages around you?

- Pultukaku, Agastya Sen’s uncle, from English, August.

There’s a big philosophical angst-ridden post buried in those few lines above, but I’ll save that for later. That quote is self-referential, in a manner of speaking. I really have to go clean up house now! I spent close to an hour leafing through my (actually not mine) copy of Upamanyu Chatterjee’s book to get hold of that quote :)

Posted in Books, Philosophy, Quotes, Unix, stuff | Leave a Comment »

Posted by kovaiputhalvan on January 19, 2008

Been one bloody week since my DSL connection last behaved itself. Every time I call up the Tata Indicom Customer Service folks and tell them that the bloody DSL connection only works for half-an-hour or so in the mornings, they promise to look into it, and they promptly close the complaint when I login the next morning. Grrrr. It’s so very irritating to have a non-functional internet connection. Let’s see now, they were supposed to fix the damn problem yesterday. I’m hoping that the connection is still up later in the day… it would be very painful for me to log off now (which I’m going to do) and then find out a few hours later that the connection is on the blink again. Dear DSL connection, Please, PLEASE work. Do your FFTs in peace and keep that goddamn light on the modem glowing steady.

Update: For once, it wasn’t really the ISP’s fault. Figured this out one fine evening when I turned the computer on, hoping against all hope that my DSL modem would behave itself. It didn’t. Just as I was about to power the computer down, a transformer blew somewhere in the neighbourhood, and we were left without electricity. Lo and behold, the DSL light started to burn a bright green! Things were hunky dory until an hour or so later, when the power came back, preventing my UPS from cutting itself out. The moment the power returned, the DSL light went out. Curious, I thought, and made my way to the balcony – the KEB guys had installed new lampposts, and their power cables were overlapping my internet cable! It looked like powerline interference was pushing the SNR in my internet cable way, way down – it also explained just why my internet connection went kaput every evening at 6, and came back the next morning at 6 – these were the exact times when the street lights went on and off. Now, I need to confirm this hypothesis – but it looks like the experiment agrees with the theory.

Posted in Not Worth Reading, stuff | Leave a Comment »

QOTD

Posted by kovaiputhalvan on January 7, 2008

The last words of Evariste Galois – Ne pleure pas, Alfred! J’ai besoin de tout mon courage pour mourir à vingt ans!

Translation – Don’t cry, Alfred! I need all my courage to die at twenty!

Posted in Math, Quotes | Leave a Comment »

Stuck.

Posted by kovaiputhalvan on January 3, 2008

I’m stuck. This is probably trivial, but I’m just not able to get it. Yet.

Consider \mathbf{Z}_m = \{ 0, 1, 2, ..., m - 1 \}, with addition and multiplication defined thus – \forall a, b \in \mathbf{Z}_m, a + b \triangleq (a + b) \bmod m, a \times b \triangleq (a \times b) \bmod m , the quantities in parentheses being ‘ordinary’ addition and multiplication. Halmos [1] then asks his readers to show that \mathbf{Z}_m is a field if and only if m is prime.

It’s fairly straightforward to show that if \mathbf{Z}_m is a field, m must be prime – one way to do this is to show that if m is composite, then any a \in \mathbf{Z}_m that divides m will not have a multiplicative inverse. Another way is even simpler – m is the minimum number of times 1 must be added to itself to produce 0 . Consider m = pq;  p,q \in \mathbf{Z}_m. Now, p < m, q < m. Also, m = pq \bmod m = 0. This means that either p = 0 or q = 0, which is a contradiction. (The second “proof” is more elegant than the first, but is unfortunately not mine.)

I’m stuck trying to show that m being prime implies that \mathbf{Z}_m is a field. The only thing that needs to be done is to show that a multiplicative inverse exists for all a \in \mathbf{Z}_m ; in other words, \forall a \in \mathbf{Z}_m  \exists b \in \mathbf{Z}_m such that ab \equiv 1 \pmod{m}.

Let’s see, there’s only a day’s work left before the weekend. Maybe a strong shot of coffee on a chilly Saturday morning will do the trick. I peeked into Halmos for a short respite from a few dry sections in H&K, and look at what happened. It does feel a little embarrassing to admit that I’ve spent more than a day on this. Sigh. Okay, not quite a day – because the only time I get to spend thinking about this stuff is early in the morning and late in the evening. Ha. Sigh. Oh, the things that I left undone when I was young.

Update [06 Jan 2008]:

Nothing yet. Thought about this half-heartedly for some time. Trying to resist the temptation to google for the answer. Crap, it looks like you either learn these things when you’re studying, or you don’t at all. Let’s see. Anyway, for the time being I’m just going to go ahead. I’m happy to know that the characteristic of a field is either zero or a prime number.

Update [09 Jul 2008]:

Thanks for your comment, Guppy! Both the times that I tried to respond in a comment, the comment got mangled. Here’s what I was trying to write:

I was thinking of a proof using Euclid’s algorithm, like so:

gcd(m, a) = 1 (\bmod m), m prime and a \in \mathbf{Z}_m.

Hence we can find integers s, t \in \mathbf{Z}_m such that s.m + t.a = 1 (\bmod m)

The rest follows… but I’m not really happy with this proof, I think I’ll give the Guppy Method a go.


[1] Paul R. Halmos. Finite Dimensional Vector Spaces. Springer, 1974.

Posted in Math, Not Worth Reading | 3 Comments »

Closure! Closure! Closure – Argh :-/

Posted by kovaiputhalvan on December 26, 2007

Argh. Much against the ministrations of 1-cyclopropyl-6-fluoro-4-oxo-7-piperazin-1-yl-quinoline-3-carboxylic acid, N-(4-Nitro-2-phenoxyphenyl)methanesulfonamide and the other things that the Doctor prescribed, I’m not asleep yet. Well, in a little while I will be – but I need to get this rant out of my system before I join company with Morpheus. I would also like to rant about the brainless bastards in the neighbourhood who believe in celebrating religious (and other) occasions by unleashing a high-decibel Himesh Reshammiya assault that drowns out the sound of everything else. I’ll save that for later, however.

Warning: I am mathematically illiterate, more or less.

I was idly reading through my ancient copy of Hoffman & Kunze (finally!), and exercising my ageing grey cells with some of the exercises, when something got me worried. There was one exercise (a trivial one, going by what I’d scribbled in the margin ages ago) that required the reader to prove that every field of characteristic zero contained a copy of the rational number field. Now, this is trivial to prove if the definition of a field includes the property of closure – namely, \forall a, b \in \mathbf{F}, (a + b) \in \mathbf{F}, (a . b) \in \mathbf{F}. (It does, by the way.). The trouble was, I’d neglected to read through the first page-and-a-half in Chapter 1 of H&K properly, and was left thinking that a field need not necessarily have closure. I wasted a day in thinking of ways to prove the damn thing without assuming closure, before I came to the conclusion that it was impossible. I then did what I should have done two days ago – sieved through the text with a fine tooth-comb to discover that H&K indeed mention closure, but not in so few words.

This is the kind of stupid mistake that would make a professional mathematician throw up upon hearing of it. Right now, I feel like hitting myself on the head with a stick. Or maybe a heavy large-print hardbound copy of H&K. One of the greatest regrets that I have is not taking up RVR’s linear algebra course – in hindsight, perhaps it was just as well – my being a student in his class would’ve probably given the poor man a coronary.

Posted in Math, Rant | Leave a Comment »

TV isn’t totally dumb :)

Posted by kovaiputhalvan on December 26, 2007

Mini-vacation extended by a day. Came down with a bad cold and associated problems. I didn’t want to pass it on to my better half, so visited the doctor and got prescribed a ton of stuff that’s going to make me sleep like a log. So here’s a quick post before I hit the sack.

A friend of mine had some trouble with his Cable-TV connection. He thought he knew what the matter was – to confirm, he posted a question on comp.dsp. An interesting conversation followed. To cut a long story short, he found that his original guess was as far off the mark as we are from Proxima Centauri, and he learned a lot more about Cable TV than he cared for. There’s more to TV than just the idiot box, or so it would seem :)

Posted in DSP | Leave a Comment »

Links for Today

Posted by kovaiputhalvan on December 22, 2007

Some idle surfing today yielded these two awesome links. Gleaned both of them off God Plays Dice, which is itself an awesome blog :) :

Walter Lewin’s Physics Lectures

The Secret Blogging Seminar.

Wow.

Posted in Math | Leave a Comment »

Amateur Astronomy for the Visually Impaired (Not Kidding)

Posted by kovaiputhalvan on September 23, 2007

No, I’m not making this up.

Check this out:  http://www.giveyoujoy.net/awe/blog/archives/2007/04/you_gotta_be_ki.html

Posted in Astronomy | Leave a Comment »