search

Author - aurélien-ooms

Modular Arithmetic Mon, May 11, 2020 02:00 CEST

Positional notation. An arbitrary precision integer on a computer is represented as a list of digits (limbs). They are just bigger. Today’s computers can hold 64 bits per limb. Modular arithmetic consists in applying addition and multiplication to integers modulo a certain number \(n\). Given an implementation of addition, multiplication, and division over the integers, we can emulate addition or multiplication modulo \(n\) by performing the corresponding operation on integers then taking the result modulo \(n\).

The Drunkard's Pilgrimage
The Drunkard's Walk Wed, Oct 17, 2018 02:00 CEST

A drunkard is zigzagging home. At every steps forward (or backward) he is making, he also moves \(1\) step to the left with probability \(p\) and \(1\) step to the right otherwise. He starts \(i\) steps to the right of a river. What is the expected number of steps forward before he falls into the river?

Gaussian elimination Fri, Jun 19, 2015 02:00 CEST

Python implementation.