As you all know a disadvantage of SQL is the lack of the universal quantifier construct; so when you need to write a complex SQL query there are two ways to proceed:

Image of money

There are tons of articles about the topic but I’ve not been able to find a mathematical explanation of why the avalanche method is the best, if you find it please let me know.

Anyway here’s what I have learned:

A small function for accessing a cell in a quad-tree matrix.

The quad-tree is a tree data structure with (guess what) 4 children. They are used for various applications (Wikipedia-page), like for example storing an image. The picture is decomposed in a series of squares of size 2ⁿx2ⁿ which are…

This article will show the steps to obtain the formula for the mortgage/loan with fixed rate.

Here a fancy image to scare people off.

Photo by Monstera from Pexels

Let’s dive in. The standard way of seeing a loan is that the principal is growing due to the interest and the client make recurrent deposit…

This is a basic tutorial on how to create a docker container for each project, with the purpose of keep the libraries installed on your PC under control.

The goal is to set a container with all the needed libraries, for every project; and sharing the source folder with the…

For setting a DNS server on a device with BalenaOS there are 2 things to consider: the google DNS are the default one and that the OS uses NetworkManager and DNSmasq. (OS overview).

The 2 steps to make are: disable google DNS and configure the NetworkManager that has to feed…

I have found two decent (and open source) ways for doing the incremental backup of the disk:

In this article I only show the use of…

We all know how the process to convert a integer number in binary, but in a functional language it’s possible to do it without iteration.

I wrote the code in Haskell. It will take a while to understand why it works.

This is the conversion with the least significant bit…

Given a graph G=(V,E), the Wiener index has two equivalent definitions:

Where d(i,j) is the shortest path between the two nodes.

Resources: Wikipedia, Mathworld.

Note: The summation series are used in the calculation.

The path graph

For this graph is easier to use the second formula that require an ordering of the nodes…

I often encounter reasonings that use the sum of inequalities and this property is intuitive but I was wondering what’s the proof of this operation.
This is what I call sum of inequalities:

sum of inequalities

This is the other version, where it’s enough to have a single strict inequality to obtain a…


Too lazy to open up a blog

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store