Math & Algorithms

This section covers the theory and Python implementation behind a wide range of math and algorithm topics, including recommender systems, graph theory, linear algebra, quantum computing, and marketing statistics models.

[2026-05-01] : Removed several outdated articles.

2024

2023

[Marketing] RFM Analysis

Introduces RFM analysis and demonstrates generating dummy purchase data with Faker and Poisson/Gamma distributions, stored in SQLite via Python's sqlite3 module.

2022

[Linear Algebra] Neumann Series

Explains the Neumann series, its convergence condition, and how it approximates matrix inverses like (I - aA)^{-1}, with a Python implementation example.

[Linear Algebra] Spectral Decomposition

Derives the spectral decomposition of symmetric matrices from eigenvalues and eigenvectors, relates it to SVD, and gives a Python implementation example.

[Linear Algebra] Useful Formulas

Compiles useful matrix formulas from the Matrix Cookbook covering transpose, trace, determinant, differentiation, and the Woodbury inversion identity.

[Linear Algebra] Cofactor Expansion

Explains matrix cofactors and cofactor expansion with worked examples, and implements determinant calculation via cofactors in Python.

2021

[Linear Algebra] Rayleigh Quotient

Explains properties of the Rayleigh quotient for symmetric matrices, proves its max/min via Lagrange multipliers, with a Python example.

[qiskit] HHL Algorithm

Reviews the classical conjugate gradient method for solving linear equations, then studies qiskit's HHL algorithm for quantum linear system solving.

[qiskit] Grover's Algorithm

Explains Grover's algorithm, which searches unsorted data in O(√N) time, describing amplitude amplification theory as a rotation operation in vector space.

[qiskit] Shore's Algorithm

Reviews how RSA cryptography works, then explains Shor's algorithm, which could break RSA by using order-finding to perform prime factorization on a quantum computer.

[qiskit] Quantum Phase Estimation

Explains the theory of quantum phase estimation, combining phase kickback with the inverse quantum Fourier transform, then implements it in qiskit using a T-gate example.

[qiskit] Quantum Fourier Transform

Reviews the classical discrete Fourier transform and then applies the same idea to quantum states, explaining the theory of the quantum Fourier transform with qiskit.

[qiskit] Simon's Algorithm

Explains Simon's algorithm, which determines whether a function is one-to-one or two-to-one and finds the period of a two-to-one function, following the math step by step.

[qiskit] Dichi-Josa's Algorithm

Explains the Deutsch-Jozsa algorithm, which determines with a single query whether a function is constant or balanced, following the underlying math step by step.

[qiskit] Arithmetic on two qubits

Explains how to represent two-qubit and three-qubit states using the tensor product, and covers the basics of multi-qubit gate operations in qiskit.

2020