Category Teaching

Yet another proof that primes are infinite

In CS131, we see the “Proof from the Book” due to Euclide that the number of prime numbers is infinite. Here is another favorite proof that is based on elementary facts. Suppose that is a list of all the primes. From what we have learnt about the  sum of geometric progressions we know that for […]

Denoising binary images

Let’s start by  writing the letter T using numpy in Python, encoded in a 0/1 array. Let’s visualize this. This is what we get, indeed the array represents the letter “T”. Now, let’s generate a corrupted version of this image by flipping each bit with some probability p. We can also do it a bit faster […]