I think that it’s extraordinarily important that we in computer science keep fun in computing. When it started out, it was an awful lot of fun. Of course, the paying customers got shafted every now and then, and after a while we began to take their complaints seriously. We began to feel as if we really were responsible for the successful, error-free perfect use of these machines. I don’t think we…
One of the most fundamental notions in type theory is equality. There are various forms of equality, including propositional equality, judgmental equality, typal equality, extensional equality, intensional equality, path equality (a key concept in homotopy type theory), among others. The list goes on, and any deep exploration of the concept of equality could easily expand to book length. Instead…
Inspired by Satyajit Ray’s Deep Focus—a compulsory reading at FTII Pune and NSD Delhi—I was struck by the depth and nuance with which Ray analyses his favourite films and directors. This led me to finally compile a list of my own 10 (+10) favourite films. However, I soon realised that rather than ranking them purely on cinematic merit, my choices were more personal—a reflection of the life lessons…
This is a digital rendition of M.C. Escher’s square limit artwork. The most surprising thing about this piece is that it is composed of only four basic tiles shown below: The entirety of this art is generated by taking these four tiles and using the power of Functional Programming à la function composition to create several powerful combinators that can render the infinite shapes. This technique…
Continuing from my Bayes Theorem-based blog post on solving the Monty-Hall problem, I will now show a rather elegant way to model the solution that exploits the humble List monad. To remind the reader, the Monty Hall problem involves a contestant initially choosing one of three doors, hoping to find a car behind it. Monty Hall then opens a different door, revealing a goat, and asks the contestant…
Today, while reading Steven Pinker’s latest book on critical thinking, Rationality, I was scribbling a solution to the Monty Hall problem. The Monty Hall problem is probably one of the most well-studied pop-science problem statement with different intuitive explanations of the solution. In case, dear reader, you have been living under a rock here is the problem statement:
After scouring through the entire web for close to 5 years and giving up out of sheer frustration every time, I was finally able to upload my TeX sources to arXiv (as of 17.01.2024). The solution was buried as a comment to one of the lesser upvoted answers in a less popular StackExchange thread. I hope Google will push this post high up so that it can help Overleaf (and minted) users.
In pure lambda calculus (untyped or typed) the fix combinator is used to encode recursion. fix represents the least fixed point of a function f i.e the least defined x for which f x = x. An important concept is that a function need not have a least fixed point. But for those functions which do, the least fixed point is the base case for recursion. An intuition about the least fixed point is :
While Haskell is steadily gaining mainstream adoption in the industry, it still remains one of the most viable languages used as a teaching medium. Even if we strip the fancy type level features in Haskell, algebraic data types and pattern matching are quite expressive enough to represent a lot of ideas. In this post I will be looking at the construction and operations of Red Black trees. Of…