Math
There's a total of 25 notes.
Thu, Mar 5, 2020
Bayesian Networks
A Bayesian network is a directed graph in which each node is annotated with quantitative probability
information. This article covers the definition of a Bayesian network with a graphical representation,
the determination of independence between variables, and the problem of finding the probability
distribution of a set of query values given some observed events.
Sun, May 21, 2017
Divisibility
Let $a,b \in \mathbb{Z}$. We say that $a$ _**divides**_ $b$, written $a \given b$, if there's an integer $n$ such that $b = na$. If $a$ divides $b$, then $b$ is _**divisible**_ by $a$, and $a$ is a _**divisor or factor**_ of $b$. Also, $b$ is called a _**multiple**_ of $a$. This article covers the greatest common divisor and how to find it using the Euclidean Algorithm, the Extended Euclidean Algorithm to find solutions to the equation $ax + by = gcd(a, b)$ where $x, y$ are unknowns.
Tue, Mar 15, 2016
Affine spaces
An affine space is a generalization of the notion of a vector space, but without the requirement of a fixed origin or a notion of "zero".
Wed, Mar 9, 2016
Geometric tests
Different algorithms to test geometric properties, such as finding the intersection of two lines.
Mon, Mar 7, 2016
Eigenvalues and eigenvectors
An eigenvalue represents how an object scales (or stretches/compresses) a particular direction (or eigenvector) when acted upon by the object. This article covers how to find these values in a square matrix, as well as their applicability in computer graphics.
Fri, Mar 4, 2016
Projective space
In projective geometry, unlike Euclidean geometry, two parallel lines meet at a point. Desargues
introduced the concept of a line at infinity where a point at infinity can be defined. This article
covers the need for a point at infinity in projective space, the line at infinity, and the projective plane.
Tue, Sep 8, 2015
Quaternions
Quaternions are a set of 4-dimensional vectors that are used to represent rotations in computer graphics. They were discovered by William Hamilton as an extension of 2D complex numbers to a 3D equivalent. This article covers the definition of a quaternion, its notation, and operations.
Tue, Sep 8, 2015
Complex Numbers
Imaginary numbers were invented to solve problems for equations with no real roots. Complex numbers extend imaginary numbers by adding a real number. This article covers the definition of complex numbers and operations such as addition, product, norm, conjugate, inverse, and square root. Finally, this article covers the geometric and polar representations of complex numbers.
Sun, Jun 14, 2015
Integer Factorization
Integer factorization is the process of decomposing a *composite* number into a product of smaller integers, if these integers are restricted to be prime numbers then the process is called **prime factorization**. This article covers factorization using trial division and fermat factorization through Pollard's Rho algorithm and using the sieve of eratosthenes.
Sat, Jun 13, 2015
Divisor Function
The divisor function returns the number of divisors of an integer. This article
covers important relations of the divisor function and prime numbers.
Thu, Jun 11, 2015
Primality Test
A prime number is a natural number greater than $1$ which has no positive divisors other than $1$ and itself. This article covers different algorithms for checking if a number is prime or not, including a naive test, the Eratosthenes Sieve, the Euler Primality Test, and the Miller-Rabin Primality Test.
Tue, Jun 9, 2015
Prime factors of a factorial
This article describes and implements a solution for the following problem:
given two numbers $n$ and $k$ find the greatest power of $k$ that divides $n!$
Tue, Jun 9, 2015
Special factorial modulo p
Let $n!_{\\%p}$ be a special factorial where $n!$ is divided by the maximum exponent of $p$
that divides $n!$. This article describes this problem and its solution, with
an implementation in C++.
Mon, Jun 8, 2015
Discrete Logarithm
The discrete logarithm finds a solution for $x$ in the congruence $a^x \equiv b \pmod{n}$ where
$a$, $b$, and $n$ are **integers**, $a$ and $n$ are coprime. This article covers two algorithms to solve this
problem: by trial multiplication and using Baby Step Giant Step.
Fri, Jun 5, 2015
Chinese Remainder Theorem
The Chinese Remainder Theorem (CRT) is a theorem that deals with finding a solution to a system of congruences. This article covers the definition of the CRT and an example implementation in C++.
Thu, Jun 4, 2015
Modular Arithmetic
Modular arithmetic is a type of arithmetic that deals with integers and remains within a fixed range of values. It involves performing arithmetic operations such as addition, subtraction, multiplication, and division, but with the added concept of a "modulus" or a "mod" value. This article covers the definition of a congruence relation, and some of its properties like addition, multiplication, exponentiation, and inverse. Next, I show how we can use the Extended Euclidean Algorithm to find the modular multiplicative inverse in a general case and in the case of coprime numbers.
Tue, Jun 2, 2015
Extended Euclidean Algorithm
The Extended Euclidean Algorithm finds solutions to the equation $ax + by = gcd(a, b)$
where $x, y$ are unknowns. This article covers a few applications of the Extended Euclidean Algorithm
like finding the modular multiplicative inverse of a number and finding solutions for
linear congruence equations.
Mon, Jun 1, 2015
Binary Exponentiation
Given two numbers $a$ and $n$, finding $a^n$ involves performing $n$ multiplications of $a$.
However, it's possible to do this in $log(n)$ operations using binary exponentiation.
Mon, Jun 1, 2015
Eratosthenes Sieve
The Eratosthenes Sieve is an algorithm to find prime numbers up to a positive number $n$
using $O(n)$ space.
Mon, Jun 1, 2015
Euclidean Algorithm
The Euclidean Algorithm finds the greatest common divisor of two numbers. In this article
I implement the algorithm from scratch in C++.
Mon, Jun 1, 2015
Euler's phi function
*Euler's phi function* represented as $\phi(n)$ gives, for a number $n$, the number of coprimes in the range $[1..n]$; in other words, the quantity of numbers in the range $[1..n]$ whose greatest common divisor with $n$ is the unity. In this article, I try to explain how it works and implement it in C++.
Thu, Apr 2, 2015
Derivative
The derivative is a concept that represents the rate of change or the slope of a function at a particular point. It is a fundamental concept in calculus and is used to analyze how a function changes with respect to its input as the input changes very slightly. This article covers the physical and geometric interpretation of the derivative, as well as some applications like finding maxima and minima in a function and the Newton-Raphson method.
Thu, Apr 2, 2015
Integral
An integral is a mathematical concept that represents the accumulation or summing up of quantities over a certain interval or region. In this article, we'll discuss the properties
of the integral by looking at an example of antidifferentiation and some examples
of evaluating definite integrals.
Thu, Apr 2, 2015
Taylor's Theorem and Infinite Series
Taylor series help approximate the value of a definite integral for a function
whose antiderivative is hard to find. This article explains the key ideas
behind Taylor's Theorem and an example of approximating its value with
a polynomial function.
Tue, Mar 31, 2015
Introduction to Calculus
This article gives an introduction to calculus, starting with the concept of a function
and how calculus helps us solve problems related to determining tangents to curves (expressed
as functions), finding the minima/maxima like determining the maximum range of a projectile,
and finding the length of curves, areas, and volumes.