Martingale and local martingale

Martingale is a stochastic process with the martingale property. If we have \(X_t\) as the stochastic process, the martingale property says that \(\mathbf{E}[X_t\mid\mathcal{F}_s] = X_s\), for \(s\lt t\). Closely related to this is the local martingale. However, the Wikipedia page does not have it clearly explained. Here is my narrative.... [more]

Akra & Bazzi (1998) On the solution of linear recurrence equations

This is a paper that extends the Master Theorem 1 for more general use. To recap, the Master Theorem is about the complexity of a recurrence algorithm. It assumed the recurrence relation has the form Jon L. Bentley, Dorothea Haken, and James B. Saxe. A general method for solving divide-and-conquer... [more]

Google Sheet API guided walkthrough

I have been doing this for quite some years and witnessed the Google Sheets API became matured. This are the steps we needed to do from scratch to create a credential and write some Python code to drive up Google Sheet API. [more]

A use case of metaclass

There are many algorithms out there that uses some “magic constants”. An example is the S-box in most of the block ciphers, which we cannot possibly avoid from the implementation. In some languages, we can hide them in a namespace. For instance in JavaScript, we can put everything inside a... [more]