Source: https://homes.cs.washington.edu/~suinlee/genome560/lecture7.pdf