Skip to main content

Posts

2026
2025
2024
2023
2022
Less More

2023

Enigma

Enigma Machines and how the internal wiring of their rotors was reverse-engineered is the topic of this note. I pieced this together from several sources, so it is a little convoluted but it mainly follows chapter 3.8 from the book Abstract Algebra by Lawrence and Zorzitto, albeit in a perhaps simplified, less rigorous way. Rejewski and his team of code breakers did a lot more than what is described in this note. For example, they designed and prototyped electro-mechanical computers to take over some of the tedious manual labor that was still needed to sift through possible permutations. Later, at Bletchley Park, Alan Turing and his team scaled up those prototypes and made the Bombe.

2022

Find Cycle

Introduction # In this Haskell cicada we dissect a clever algorithm for finding a cycle in a sequence of values generated by a function from a finite set to itself. I used this algorithm in a math note without further explaining it or its Haskell implementation. Before we dive in, let us set the stage. Given is a finite set $S$ and a function

Two excellent British shows

A Spy Among Friends # I cannot really explain why I like the John Le Carre type of content so much. If I let myself indulge in armchair psychology, maybe what appeals to me is the heightened awareness of the facade of ourselves that spies must have. These fictional I have no idea how real spies function or if there is any resemblance between fictional and real. spies are forced to distrust every aspect of their interactions and relationships, have to build intricate webs of lies and dole out information and withhold information at crucial times. There’s always this cat and mouse game, who is hunting whom. Moles have to be discovered and turned. This all makes for great fiction. There’s also the witty dialog, the posh manners, the higher moral calling, the self doubt. John Le Carre was a master chef of all this spy brew, mixing it all together into an elegant story. I consumed all of it and haven’t found a worthy successor of him yet. Well, I’m here to say, if we’re allowed to change the medium from novel to TV series, “A spy among friends” comes really close. Combine the terrific writing with fantastic performances, a strong female lead, patience to let the story unfold in six one-hour episodes and trust in the viewer to follow along and you have a very satisfying spy show. I have only one, slight complaint: does everybody in the show really have to smoke so much ?

Apfelstrudel

Today I’m making Apfelstrudel again. It is one of the few desserts I know how to make and my family likes it. I’m not making my own dough. That is way beyond my capabilities. For a sense of how skilled you have to be to pull off authentic strudel dough, watch this delightful documentary: I’m instead using puff pastry from Whole Foods:

Mastermind

Every so often I get the urge to dive into Haskell programming. It doesn’t happen often and the periods in between the dives are long enough that I have to start from the beginning each time because I forgot everything I learned last time. It also never lasts that long either, the urge goes away right about when Monads appear. Maybe this urge is similar to the life cycle of cicadas, so I will call the little projects coming from this current urge “Haskell cicadas”. If enough material comes out, maybe I can collect it into a little booklet with a nice cover Most likely this current urge will fizzle out before enough material accumulates. I do like the cover though. It is an image from Bill Nino on Unsplash. :

Transformer

Transformer by Nick Lane From the renowned biochemist and author of The Vital Question, an illuminating inquiry into the Krebs cycle and the origins of life. “Nick Lane’s exploration of the building blocks that underlie life’s big fundamental questions—the origin of life itself, aging, and disease—have shaped my thinking ... As Nick Lane tells it in his book “Transformer”, a biological cell is comparable to a big city: there are structures like buildings, there are pathways and flows, conveyer belts, machinery. One single cell undergoes one billion transformations a second.

Dough

Dough by Richard Bertinet Baking bread from dough involves the best kind of kitchen alchemy, for the possibilities to be conjured from the four ingredients of flour, water, yeast and salt are truly endless. Building on five easy recipes for basic doughs, Bertinet shows how even a beginner can achieve truly impressive ... Like many others I picked up bread making during the pandemic lockdown. It turned out to be a fun activity. I eventually landed on Richard Bertinet’s youtube video explaining dough handling.

Prison cells

A prison has $n$ cells with all cell doors shut initially. open full screen ↗ Your browser can't display this PDF inline. Open it directly.

Down to Earth

Down to Earth, Politics in the New Climatic Regime by Bruno Latour The present ecological mutation has organized the whole political landscape for the last thirty years. This could explain the deadly cocktail of exploding inequalities, massive deregulation, and conversion of the dream of globalization into a nightmare for most people. What holds these three ... I understand how we got here. It’s the universal desire to live in Cockaigne Cockaigne, the land of milk and honey. . Some of us live in Cockaigne. We’re busy protecting it, building walls and borders to keep the ones not in it out. We do that because we know Cockaigne as it stands doesn’t scale to everybody. The process of creating it has left a lot of people out, has created a lot of damage and destroyed the planet, forcing those not in the protective bubble of Cockaigne to deal with the consequences. We’re also in denial about our ability to keep this protective bubble up and how much suffering building Cockaigne has caused. In his book “Down to Earth” Bruno Latour French philosopher Bruno Latour died in October, 2022. strongly urges us to reconsider this fantasy, to step out of Cockaigne and come back down to Earth. In 140 pages and without using philosophical jargon Latour explains how we got into this mess and he tries to help us find a way out.

Points on circle

Points on circle. open full screen ↗ Your browser can't display this PDF inline. Open it directly.

Fibolucci

Exercise ‘Fibolucci’ from ‘Kaldewaij. Programming, The Derivation of Algorithms . Prentice Hall, 1990’. open full screen ↗ Your browser can't display this PDF inline. Open it directly.

Sequences

Counting inversions is the topic of the problem in this note. open full screen ↗ Your browser can't display this PDF inline. Open it directly.

No consecutive ints

Integer equations and multisets are the topics of the problem. open full screen ↗ Your browser can't display this PDF inline. Open it directly.

Three plus sqrt of five

Recurrence relations and modulo arithmetic are the topics of the problem in this note. open full screen ↗ Your browser can't display this PDF inline. Open it directly.

Bridge

Four people begin on the same side of a bridge. You must send them across to the other side in the fastest time possible. It is night. There is one flashlight. A maximum of two people can cross at a time. Any party who crosses, either one or two people, must have the flashlight to see. open full screen ↗ Your browser can't display this PDF inline. Open it directly.

Dutch National Flag

The Dutch National Flag Problem from ‘Kaldewaij. Programming, The Derivation of Algorithms . Prentice Hall, 1990’. open full screen ↗ Your browser can't display this PDF inline. Open it directly.

Minkowski Sum

Fast Fourier Transform and using it to speed up polynomial multiplication is the topic of the two problems in this note taken from Algorithms — Extended Dance Remix: Fast Fourier Transforms. open full screen ↗ Your browser can't display this PDF inline. Open it directly.

While A

Loop invariants is the topic of the problem in this note. open full screen ↗ Your browser can't display this PDF inline. Open it directly.

Bernstein

Cool proof of the Schröder-Bernstein Theorem. open full screen ↗ Your browser can't display this PDF inline. Open it directly.