Sunday, February 10, 2019

Turing's Cathedral

The computer that von Neumann built at the Institute for Advanced Study (IAS) was not the first computer, but it was probably the most influential. Turing's Cathedral is its story and of much else.

To get a feel for computing circa 1945, let's start by relating the well known fact that 'computer' at this time meant a person (usually a woman) performing calculations with the aid of mechanical desk calculators. The proposal for ENIAC (a well known predecessor) coined the term 'computor' to refer to a machine (which seems not to have caught on though). The architecture of ENIAC with its 20 accumulators was in fact a replication of the setup where 20 human computers were performing their part of a calculation and passing results back and forth; effectively a distributed algorithm migrated from human nodes to electronic ones (Incidentally, with humans storage was cheap but multiplication expensive. With ENIAC the situation was reversed, and all the algorithms had to be revised.) The architecture that has become familiar since, with a CPU, hierarchical memory etc, was what the IAS computer pioneered. Moving to hardware, consider the memory unit. The IAS computer had 1024 forty bit words of memory, a fortune at the time. The basis for implementation was an oscilloscope tube, which was on its way to evolve as CRT display. Wide surface of the tube was divided in a 32 by 32 grid, each referring to a binary digit, accessible via appropriate deflections of the electron beam for both reading and writing, with a 24us access time. Forty such tubes operating in parallel, and with corresponding locations in each together forming a single (40 bit) word was how the memory functioned. The machine was built out of vacuum tubes, since the transistor was not yet invented and binary digits were referred to as bd's, as the word ‘bit’ was not yet invented either. It had an instruction set (unlike the ENIAC where (at least initially) the instruction set was implemented as plugboard settings), and each word would contain an opcode, as well as an address (the famous von Neumann architecture). On the software side, in its ~5KB memory, the machine was used to run climate simulation models, simulations of gene-like replicators, and of course lots of secret weapons calculations. von Neumann was quick to see the possibilities of a universal machine (once Turing had laid the  groundwork) and went about building his machine as a scientific instrument, away from both industry and government. He actively put all the information in public domain, allowing a number of replicas to emerge and the ideas to be improved upon.

The book is ‘intensely human’ (as one reviewer put it) at its core and introduces a remarkable cast of characters. There is von Neumann of course, who made significant contributions to mathematics, physics, economics, computing, and much else. Less well known is his wife, Klara, one of the original programmers of the machine. Julian Bigelow was the main engineer, the person most responsible for making the machine a reality. Stanislaw Ulam was von Neumann's friend, and maker of a number of original contributions to mathematics and physics, among them the Monte Carlo method. Leibniz and Gödel, Turing and Teller, all make an appearance, taking their place in the ever widening stream of ideas and events.

For a long time, I wanted to read a biography of von Neumann, and while this book is not strictly one, it fits the bill nicely. It can be classified as a history of a particular computer, but that would be very limiting. This energetic romp through the thicket of philosophical, mathematical and physical ideas that came together in the form of the computer was a source of genuine exhilaration. It may be so for you too.

Friday, May 4, 2018

कोसला

कोसलाबद्दल थोडक्यात काही लिहिणं अवघड आहे. पु लं नी म्हटल्याप्रमाणे 'कोसलावर कोसलाइतकंच लिहिता येईल', किंवा मग काही लिहूच नये. 

आत्ता नुकतंच वाचून संपवलं; ही तिसरी-चौथी तरी खेप असेल. अधुन मधून डोकावणं तर चालू असतंच. तिचतिच पुस्तकं पुनः पुन्हा वाचणं हे तसं चांगलं. खूप पुस्तकं एकेकदा वाचणं हे फेसबूकवर खूप मित्र असल्यासारखं आहे. ऐनवेळी ते काही कामाला येत नाही. 

खोल, शांत, अंधाऱ्या रात्री मी कोसला वाचत बसलोय असं अनेकदा आठवतं. जेव्हा दिवसाची पुटं गळत जातात, आणि नवे साक्षात्कार होतात. अर्थात हे झोप न येणाऱ्यासाठी (उदाहरणार्थ आता रात्रीचे दीड वाजलेत). झोप येणाऱ्यानी झोप घ्यावी, आणि दिवसांची पुस्तकं वाचावीत.

कोसलाचा पहिला परिचय मी अकरावी-बारावीला असताना झाला. माझं इलेक्ट्रॉनिक्स होतं, पण रूममेटचं मराठी. आणि पुस्तकांचा इतका दुष्काळ होता की त्याचं पाठ्यपुस्तक मीच आधी वाचून काढलं. त्यात सांगवीकर अजिंठ्याला जातो तो भाग एका धडयात होता. अर्थात काही भाग गाळून.

आणि सांगवीकर. हा शहराला पण वैतागतो आणि गावाला पण. काॅलेज वर पण उखडतो आणि नोकरी वर पण. हा एक जुळणारा धागा म्हणता येईल. पण एवढंच नाही. आणि जे आहे त्यात खोटेपणाचा अंशही नाही.

Friday, March 23, 2018

Seven brief lessons

The book is called Seven brief lessons on Physics, but if you read it, you will appreciate that they are also Seven brief lessons in elegance. Let me say something about the Physics first and then come back to the harder part.

The book is a translation of articles physicist Carlo Rovelli (a leader in Loop quantum gravity) wrote for an Italian newspaper. Now there are tonnes of popular physics books, including brief ones, so one might ask, why read this one? I cannot think of the right word here, so let's use 'right focus'. When writing for a non technical audience, it is important to not miss the forest for the trees. Consider the Standard model, the best currently available theory of elementary particles. It is spectacularly well confirmed by experiments, but it is a piecemeal assembly not flowing from a single conceptual framework like relativity, and attempts to find an alternative have been made but failed. The book makes these points, but does not then get into quark generations, baryon conservation, symmetry breaking and other stuff that is advanced and undoubtedly important, but serves to obscure the essence in many a cases. 

OK, now let's move on to the harder stuff. Some of it is of course due to the 'right focus' I alluded to above, but it also goes beyond that. One important contributor is the level headed perspective, avoiding the extremity of Theory of everything on the one side, and that of life as insignificant chemical scum on the other. And then there are the sparkling prose, both technical and non technical.

This book would be a worthy read even if you don't care much about science. At just 79 pages, you need not fear for your time. And if you do love science, well, this is a classic. In either case, once you have read it, you will feel like returning to it every once in a while. Like I did.

Monday, February 19, 2018

It's only a B, but still..

I recently took (and surprise, surprise, completed) a course on edX. Things like that will be old news to many by now, but this is the first time I used a MOOC, so I thought I should record my impressions.

The course in question: 'Quantum Information Science I, Part I', given by Prof. Peter Shor and Prof. Isaac Chuang, giants of the field from MIT. Prof Shor is the discoverer of one of the best known quantum algorithms and Prof Chuang is, among other things, coauthor of the definitive textbook of the field. There was one long talk by Charles Bennett too, another giant and a pioneer of quantum cryptography, and which was certainly one of the best ones from the whole course.

The course was divided in three subunits (you can see the syllabus here), each with a set of lecture clips, concept questions and problems. While I had not studied this area before, I was not totally ignorant of it either and my chief concern was the amount of mathematics that would be needed. My math skills are what a normal (in a statistical sense, not on a scale of sanity) education would give, but thankfully most of the course was approachable. More linear algebra would certainly have helped though. Also not to say all the lectures were easily understandable, some certainly went over my head. The problems require work, though they are doable (or at least most are. As I said, it's only a B). 

So here is the overall impression, I learned a great deal, had a lot of fun working it out, and it was a wonderful experience (and for me, the best part) to watch these distinguished scholars so visibly in love with their subject. And lest anyone be inclined to question the claim about fun above, I offer this picture



[Yours truly trying to figure out the rotation axis on the Bloch sphere corresponding to Hadamard gate using an orange]

Sunday, February 11, 2018

आपलं माणूस

ट्रेलरवरून वाटतो त्यापेक्षा हा पिक्चर बराच वेगळा आहे आणि अनेक अनपेक्षीत वळणे घेत सुरूवातीपासून शेवटपर्यंत खिळवून ठेवतो. सुमित राघवन आणि इरावती हर्षे यांची कामं अगदी टॉप आहेत, आणि नाना विषयी काही बोलायची गरजच नाही (जशी कधीच नसते). अजय देवगणला फक्त एकच डायलॉग असल्याने त्याचं मराठी तपासता आलं नाही, पण बऱ्याच दिवसांनी अस्सल (सीरीयल्समधली नकली नव्हे) गावरान मराठी ऐकायला मिळाली.

Friday, February 9, 2018

A mind at play

Turing's was a shadowy figure until Alan Turing The Enigma appeared. A mind at play will likely do the same for Shannon.

Shannon of course is the father of Information Theory,  his insights forming the bedrock of digital communication. As the authors put it, 'information existed before Shannon, just as inertia existed before Newton'. It was Shannon who created the conceptual foundations needed to deal with information in a precise, quantitative manner. First of all, he clarified what information is. Information is what reduces uncertainty, one bit of it exists when we are choosing from two equally likely outcomes. Then he showed that all communication is expressible in terms of bits. Next, each communication channel has an upper limit on how many bits it can carry per second (dependent on the bandwidth and the signal-to-noise ratio). Within this limit, noise can always be defeated; a message can always be sent with an arbitrarily small amount of error. And lastly, all of the above stays true irrespective of whether the message has meaning or not.

The importance of his work was immediately recognized, propelling Shannon to scientific celebrity at 32, but Shannon chose not to pursue it. Information theory quickly became a buzzword in fields ranging from psychology to economics, but it was Shannon who cautioned against blindly jumping on the bandwagon. He returned to his work and spent the rest of his days inventing.

A mechanical mouse that could solve a maze and remember the solution (A concrete demonstration of AI when all the field had was theory). A juggling robot (Shannon was an accomplished juggler, and wrote one of the first papers on mathematics of juggling). A wearable computer to time roulette wheels and a system to place bets to maximize winning (I make my money on the Stock market, not by proving theorems, Shannon once said). A chess playing computer (and a paper establishing the foundations of the field). All sorts of customized unicycles. And the ultimate machine: when switched on, a mechanical arm came out of the box and turned itself off.

Shannon's was a fascinating life, and the book does a good job of bringing it out of the shadows. At a few places it feels a bit sketchy, but that does not take from it's readbility. The authors are clearly in awe of Shannon, and after reading it, you will be too.

Sunday, February 4, 2018

What I am watching update

A quick note on some good stuff I watched recently. Apart from the obvious purpose of sharing this with friends, it is also hoped that  should an unpaid troll (paid ones are just doing their job) were to ever wander on this page, it will have found one more way to spend its time constructively (and spare the rest of us). Enjoy.

Two seasons of Crown
Netflix has been a net positive addition to the quality of my life, but quite a bit of it deals with dark and/or supernatural themes, and no matter how well made, that gets tiresome after a while. Crown was a welcome break, with great performances and deeply engaging characters. Monarchy is not a subject that I would have explored on my own, so I learned a thing or two too, that I otherwise would not have.

Darkest hour
While it is hard to totally like Churchill, there is no denying his qualities either, and the movie brings them forth with force and intensity. I did not recognize at all that it was Gary Oldman in the lead role.

YZ
खदखदून हसलो असा पिक्चर खुप दिवसांनी पाहिला. 'बत्तीस' चे डायलॉग तर अप्रतिम. यात भरपूर फंडे आहेत, आणि ते काही सगळे हसन्यावारी घालवन्यासारखे आहेत अस नाही.