# How to write complex SQL queries with universal quantification

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:

# On debt repayment strategies

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…

# Formula for mortgages and loans: an alternative view

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.

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…

# Setting a Docker container for each project

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…

# Set custom DNS on BalenaOS

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…

# Incremental backup of disk image on block level

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

# Binary conversion in functional language

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…

# The Wiener index for path, star, cycle and wheel graphs

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…

# Sum of inequalities

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: 