Notes

There's a total of 82 articles.




Creating a backing track from your favorite song for an open mic

Creating a backing track from your favorite song for an open mic
Photo by Brands&People on Unsplash

I perform in open mics in my spare time, when I decide to perform a cover of a song I usually play the guitar as well as singing it. Therefore, I prepare a backing track without those tracks that I use as background music during the performance.

In this article I show how to create a backing track using yt-dlp, demucs and ffmpeg.

Me
Published on Sun, Dec 1, 2024
Last modified on Mon, Dec 2, 2024
681 words - Page Source

Bachata

Bachata
This is my bachata dancing journey. I talk about how I first got started with bachata, and what motivated me to keep going. I talk about my experiences at bachata festivals, and how they’ve helped me to grow as a dancer. Finally, I also share some of my favorite bachata dancers and bachata combos that I’ve learned over the years
Me
Published on Sun, Nov 17, 2024
Last modified on Sun, Dec 1, 2024
1581 words - Page Source

Documenting my life

Documenting my life
Photo by Annushka Ahuja: https://www.pexels.com/photo/a-person-holding-a-camera-8114300/
Ordinary moments don’t have a value right now but they will value over time. I decided to document my life by journaling, printing pictures and making vlogs.
Me
Published on Sun, Nov 10, 2024
Last modified on Fri, Nov 22, 2024
651 words - Page Source

Kubernetes

Kubernetes
Kubernetes, source: kubernetes.io

Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications.


Me
Published on Sun, Apr 30, 2023
Last modified on Sun, Nov 10, 2024
54 words - Page Source

Productivity skills

Productivity skills
I try to improve my productivity every day to get better use of my time. This article summarizes the things I’m used to doing everyday at work. These are divided into: getting used to multitasking, having time for deep focus and for breaks, handling incoming emails, task management and development tools.
Me
Published on Wed, May 11, 2022
Last modified on Sun, Nov 10, 2024
1669 words - Page Source

Preparation for a Software Engineer interview

Preparation for a Software Engineer interview
This is my interview preparation plan for a software engineering role, I share a summary of my preparation, a plan of problems to tackle for coding interviews, the topics to study for a system design interviews and the questions to prepare for the behavioral section.
Me
Published on Mon, Oct 12, 2020
Last modified on Fri, Nov 22, 2024
5650 words - Page Source

Back of the envelope calculations

Back of the envelope calculations

When designing a system it’s important to consider the limitations of the technologies chosen, making some approximate calculations when the system is designed help us decide on the tradeoffs of the different approaches, these approximations include


This article has a table with latency comparison numbers, common numbers used in system design calculations and some challenges to put all of these info into practice.
Me
Published on Sat, Aug 8, 2020
Last modified on Sun, Nov 10, 2024
1128 words - Page Source

Introduction to Machine Learning

Introduction to Machine Learning
A super brief introduction to what ML is for, the problems where it can be applied along with some example applications.
Me
Published on Thu, Jun 25, 2020
Last modified on Sun, Jun 16, 2024
202 words - Page Source

Machine Learning Glossary

Machine Learning Glossary
A glossary of terms used in machine learning.
For an up to date glossary also check https://developers.google.com/machine-learning/glossary
Me
Published on Mon, May 25, 2020
Last modified on Sun, Jun 16, 2024
243 words - Page Source

Hyperparameter tuning

Hyperparameter tuning
Hyperparameter tuning is a process of finding out by trial and error the hyperparemeteres (the parameters fed into the model for it to change its inner parameters) to converge efficiently.
Me
Published on Mon, May 25, 2020
Last modified on Sun, Jun 16, 2024
223 words - Page Source

Data structures for massive datasets

Data structures for massive datasets
The algorithms that we use every day to manipulate data assume that we have access to all the data we need. What if there’s more data that can fit in a single computer or if accessing the data itself to do searches is expensive? If so, we can use specialized data structures that can help us “estimate” the actual value without actually computing it, in some cases an estimate might be good enough. These data structures are: count-min sketch, bloom filters, and reservoir-sampling.
Me
Published on Sat, May 9, 2020
Last modified on Fri, Nov 22, 2024
810 words - Page Source

Expectation maximization

Expectation maximization
Expectation maximization is a method of finding maximum likelihood estimates of parameters of a model. The method alternates between making an expectation (E) step based on the current estimate of the parameters and a maximization (M) step which computes new parameters.
Me
Published on Mon, Mar 16, 2020
Last modified on Sun, Jun 16, 2024
530 words - Page Source

Bayesian Networks

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.
Me
Published on Thu, Mar 5, 2020
Last modified on Fri, Nov 22, 2024
1008 words - Page Source

Kafka

Kafka

Kafka is a distributed event streaming platform designed for building high-throughput, fault-tolerant, and scalable data streaming applications.


This article covers key designs in kafka such as how messages for a topic are shared into partitions assigned to brokers. Then we see some guarantees about producers, consumers and consumer groups.
Me
Published on Sat, Feb 29, 2020
Last modified on Fri, Nov 22, 2024
321 words - Page Source

Memtable & SSTable (Sorted String Table)

Memtable & SSTable (Sorted String Table)
Write path in Cassandra, source https://docs.datastax.com

The pattern of batching data up in memory, tracked in a write ahead log, and periodically flushed to disk is ubiquitous today. OSS examples are LevelDB, Cassandra, InfluxDB, or HBase.


In this article I implement a tiny memtable for a timeseries database in golang and briefly talk about how it can be compressed into a sorted string table.
Me
Published on Sat, Feb 29, 2020
Last modified on Sun, Nov 10, 2024
892 words - Page Source

Cassandra

Cassandra

Cassandra is a highly scalable, distributed NoSQL (non-relational) database management system designed for handling large amounts of data across multiple commodity servers.


This article covers key design features of cassandra such as the usage of consistent hashing, the write pattern to a write ahead log and a memtable, the read pattern from the memtable and from sstables, and finally and most important, some examples about data modeling for different types of queries.
Me
Published on Fri, Feb 28, 2020
Last modified on Fri, Nov 22, 2024
768 words - Page Source

Partitioning

Partitioning
Image source: https://www.enjoyalgorithms.com/blog/data-partitioning-system-design-concept

Data partitioning refers to the process of dividing a system’s data into smaller, more manageable subsets, which are distributed across multiple storage locations or nodes.


This article covers some strategies for partitioning including random partitioning, by hash key, by range and a hybrid approach for skewed workloads. We also see strategies to rebalance partitions if there's a static or dynamic number of partitions.
Me
Published on Mon, Jan 8, 2018
Last modified on Sun, Nov 10, 2024
511 words - Page Source

Non Functional Requirements

Non Functional Requirements

Non functional requirements refer to quality attributes or system characteristics that describe how well a software system or solution performs or behaves.


This article covers well known non functional requirements such as reliability, availability, scalability, performance and durability.
Me
Published on Tue, Jan 2, 2018
Last modified on Sun, Jun 16, 2024
241 words - Page Source

Implementing an A+ conformat Promise library in JavaScript the TDD way

Implementing an A+ conformat Promise library in JavaScript the TDD way
Future/promises refer to constructs used to synchronize program execution. Learning how it works under the hood by implementing it is a great fundamental skill to know.

This article is about writing an A+ Promise implementation from scratch following the A+ promise spec in JavaScript the TDD way.
Me
Published on Sat, Sep 16, 2017
Last modified on Sun, Nov 17, 2024
3189 words - Page Source

Divisibility

Divisibility

Let $a,b \in \mathbb{Z}$, we say that $a$ divides $b$, written $a \given b$, if there’s an integer $n$ so 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 $a, b$ are unknowns.
Me
Published on Sun, May 21, 2017
Last modified on Sun, Jun 16, 2024
1056 words - Page Source

Flat shading

Flat shading
Flat shading is the simplest shading model, we cover the advantages/disadvantages and a simple implementation in GLSL.
Me
Published on Thu, Jun 9, 2016
Last modified on Sun, Jun 16, 2024
106 words - Page Source

Diffuse shading

Diffuse shading
Diffuse shading is a technique to render the surface of objects that are not shinny.

As an example on the picture (credits to Marc Kleen) we see a real life car with a matte coating which we want to emulate using the Lambertian shading model.
Me
Published on Fri, Jun 3, 2016
Last modified on Sun, Jun 16, 2024
343 words - Page Source

Introduction to surface shading

Introduction to surface shading
Surface shading is a process to color a surface, in computer graphic applications this is done to mimic how objects look in real life. This article covers the variables available in the rendering pipeline.
Me
Published on Fri, Jun 3, 2016
Last modified on Sun, Jun 16, 2024
180 words - Page Source

Building a first person shooter camera in C++

Building a first person shooter camera in C++

A first person camera captures objects from the viewpoint of a player’s character. Some aspects have to be considered like the characteristics of the camera (orbiting with the mouse and translation with keyboard keys) as well as how we could capture all these characteristics with math and linear algebra.


In this article I analyze the math needed to design and implement a 1st person shooter camera in C++.
Me
Published on Fri, Apr 29, 2016
Last modified on Sun, Jun 16, 2024
990 words - Page Source

Quaternions

Quaternions
Quaternions are an alternate way to describe orientation or rotations in 3d space using an ordered set of four numbers. They have the ability to uniquely describe any 3d rotation about an arbitrary axis and do not suffer from a problem using euler angles called gimbal lock.
Me
Published on Tue, Apr 26, 2016
Last modified on Sat, Nov 9, 2024
809 words - Page Source

gcc

gcc
GCC is a suite of compilers for various programming languages, including C, C++. In this article, I cover the compilation stages and the flags used to compile source code into a binary
Me
Published on Tue, Apr 5, 2016
Last modified on Sun, Jun 16, 2024
196 words - Page Source

make

make

“Make” is a build automation tool commonly used in software development to compile source code and create executable programs or other output files. It automates the process of building complex software projects, including compiling source code, linking object files, and creating executable files or other types of output.


In this article I cover the following: targets and prerequisites, variables, recipes to build an out of date target and finally an example of how to use it in a simple C++ project.
Me
Published on Thu, Mar 31, 2016
Last modified on Sun, Jun 16, 2024
1809 words - Page Source

CMake

CMake
CMake is a cross-platform build system generator of Makefiles, projects specify their build process with platform-independent CMake listfiles included in each directory of a source tree with the name CMakeLists.txt. This article explains how to use CMake to build projects.
Me
Published on Thu, Mar 31, 2016
Last modified on Sun, Jun 16, 2024
464 words - Page Source

C++ refresher

C++ refresher
Refresher notes on C++, includes mechanics of a C++ program, program structure, pointers, functions, classes and misc operations
Me
Published on Sat, Mar 26, 2016
Last modified on Sun, Jun 16, 2024
3216 words - Page Source

Culling & Clipping

Culling & Clipping

The math behind culling and clipping and how it’s related with the camera and with what it sees.


  • Culling is a process where geometry that’s not visible from the camera is discarded to save processing time.
  • Clipping is a process that removes parts of primitives that are outside the view volume (clipping against the six faces of the view volume).
Me
Published on Wed, Mar 16, 2016
Last modified on Sun, Nov 17, 2024
335 words - Page Source

Affine spaces

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”.
Me
Published on Tue, Mar 15, 2016
Last modified on Sun, Jun 16, 2024
933 words - Page Source

Vector spaces

Vector spaces

A vector space is a set whose elements are called “vectors” (denoted as $\v{v}$ or $\mathbf{v}$) which have two operations defined on them: addition of vectors and multiplication of an scalar by a vector.


This article covers some examples of vector spaces, basis of vectores spaces and linear maps.
Me
Published on Mon, Mar 14, 2016
Last modified on Sun, Jun 16, 2024
544 words - Page Source

Triangle in affine spaces

Triangle in affine spaces
In an affine space any point can be represented by a sum of an origin point plus a set of scaled vector. This article covers defining all the points in a triangle in an affine space.
Me
Published on Thu, Mar 10, 2016
Last modified on Sun, Jun 16, 2024
298 words - Page Source

Geometric tests

Geometric tests
Different algorithms to test geometric properties like finding the intersection of two lines.
Me
Published on Wed, Mar 9, 2016
Last modified on Sun, Jun 16, 2024
442 words - Page Source

Transformation matrix to transform objects from NDC coordinates to screen coordinates (viewport transform)

Transformation matrix to transform objects from NDC coordinates to screen coordinates (viewport transform)

One matrix transformation in the 3D to a 2D transformation pipeline is the viewport transform where objects are transformed from normalized device coordinates (NDC) to screen coordinates (SC).


In short it's the transformation of numbers in the range [-1, 1] to numbers corresponding to pixels on the screen, which is a linear mapping computed with linear interpolation.
In this article I cover the math behind the generation of the viewport transformation matrix.
Me
Published on Tue, Mar 8, 2016
Last modified on Sun, Jun 16, 2024
285 words - Page Source

Normals

Normals
A normal vector to a curve at a particular point is a vector perpendicular to the tangent vector of the curve at that point (also called a gradient).
Me
Published on Tue, Mar 8, 2016
Last modified on Sun, Jun 16, 2024
437 words - Page Source

Eigenvalues and eigenvectors

Eigenvalues and eigenvectors
An eigenvalue represents how the 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 how it’s applicable in compute graphics.
Me
Published on Mon, Mar 7, 2016
Last modified on Sun, Jun 16, 2024
417 words - Page Source

Projective space

Projective space
In projective geometry unlike euclidean geometry, two parallel lines meet at a point. Desargues introduced the concept of a line at finity where a point at infinity can be defined. This article covers the need of a point at infinity in projective space, the line at infinity and the projective plane.
Me
Published on Fri, Mar 4, 2016
Last modified on Sun, Jun 16, 2024
645 words - Page Source

Ray Tracing

Ray Tracing
Ray tracing is the process to identify the color of all the pixels in a 2d screen by emitting rays from all the pixels simulating how light travels in real life. This article covers the math for the ray generation from each pixel for both orthographic and perspective cameras.
Me
Published on Fri, Feb 26, 2016
Last modified on Sun, Jun 16, 2024
1240 words - Page Source

Rendering

Rendering
Rendering is a process that takes an input a set of objects and produces as its output an array of pixels (image) each of which stores information about the color of the image at a particular point in a grid (determined by the target width and height).
Me
Published on Fri, Feb 26, 2016
Last modified on Sun, Jun 16, 2024
358 words - Page Source

Transformation matrix for projection of 3D objects into a 2D plane (projection transform)

Transformation matrix for projection of 3D objects into a 2D plane (projection transform)

In Computer Graphics 3D objects created in an abstract 3D world will eventually need to be displayed in a screen, to view these objects in a 2D plane like a screen objects will need to be projected from the 3D space to the 2D plane with a transformation matrix.


In this article I cover two types of transformations: Orthographic projection and Perspective projection and analyze the math behind the transformation matrices.
Me
Published on Sun, Feb 14, 2016
Last modified on Fri, Nov 22, 2024
2559 words - Page Source

Transformation matrix to transform 3D objects from World Space to View Space (View transform)

Transformation matrix to transform 3D objects from World Space to View Space (View transform)

One matrix transformation in the 3D to a 2D transformation pipeline is the view transform where objects are transformed from world space to view space. a transformation matrix.


In this article I cover the math behind the generation of this transformation matrix.
Me
Published on Sat, Feb 13, 2016
Last modified on Sun, Jun 16, 2024
704 words - Page Source

Combining Matrix Transformations

Combining Matrix Transformations
Taking multiple matrices each encoding a single transformations and combining them is how we transform vectors between different spaces. This article creating a transformation matrix that combines a rotation followed by a translation, a translation followed by a rotation and creating transformation matrices to transform between different coordinate systems.
Me
Published on Wed, Feb 10, 2016
Last modified on Sun, Jun 16, 2024
1137 words - Page Source

Perspective projection

Perspective projection
Perspective projection is a fundamental projection technique that transforms objects in a higher dimension to a lower dimension. This transformation is usually used for objects in a 3d world to be rendered into a screen (a 2d surface), in the transformation these objects give the realistic impression of depth.

This article covers the math behind it and how to generate the transformation matrix to achieve the transformation.
Me
Published on Sat, Feb 6, 2016
Last modified on Sun, Jun 16, 2024
380 words - Page Source

Orthographic projection

Orthographic projection
Orthographic projection is a fundamental projection technique that transforms objects in a higher dimension to a lower dimension. This transformation is usually used for objects in a 3d world to be rendered into a screen (a 2d surface) and in the process keeps parallel lines parallel in the lower dimension.

This article covers the math behind it and how to generate the transformation matrix to achieve the transformation.
Me
Published on Fri, Feb 5, 2016
Last modified on Sun, Jun 16, 2024
450 words - Page Source

Translating objects with a Transformation Matrix

Translating objects with a Transformation Matrix
We build different types of transformation matrices to translate objects along cardinal axes, arbitrary axes in 2d and 3d with matrix multiplication!
Me
Published on Fri, Feb 5, 2016
Last modified on Sun, Nov 17, 2024
694 words - Page Source

Euler angles

Euler angles

Euler angles are a way to describe the orientation of a rigid body with 3 values, these values represent 3 angles:

  • yaw - Rotation around the vertical axis
  • pitch - Rotation around the side-to-side axis
  • roll - Rotation around the front-to-back axis
Me
Published on Fri, Feb 5, 2016
Last modified on Fri, Nov 22, 2024
1044 words - Page Source

Shearing objects with a Transformation Matrix

Shearing objects with a Transformation Matrix
Shearing is a transformation that skews the coordinate space, the idea is to add a multiple of one coordinate to the other
Me
Published on Fri, Feb 5, 2016
Last modified on Sun, Jun 16, 2024
356 words - Page Source

Introduction to rotation for computer graphics

Introduction to rotation for computer graphics

The basics of rotation in 2d and 3d for computer graphics with a focus on 3d rotation about cardinal axes and 3d rotation with quaternions.


For quaternions, please also look at https://eater.net/quaternions amazing animations!

Me
Published on Tue, Dec 15, 2015
Last modified on Sun, Jun 16, 2024
2262 words - Page Source

Scaling objects with a Transformation Matrix

Scaling objects with a Transformation Matrix
We build different types of transformation matrices to scale objects along cardinal axes, arbitrary axes in 2d and 3d with matrix multiplication!
Me
Published on Tue, Oct 20, 2015
Last modified on Sun, Jun 16, 2024
614 words - Page Source

Transformation matrix

Transformation matrix
A linear transformation can be represented with a matrix which transforms vectors from one space to another. Transformation matrices allow arbitrary transformations to be displayed in the same format. Also matrices can be multiplied to enable composition. This article covers how to think and reason about these matrices and the way we can represent them (row vectors vs column vectors).
Me
Published on Thu, Oct 15, 2015
Last modified on Sun, Jun 16, 2024
841 words - Page Source

Coordinate systems and transformations between them

Coordinate systems and transformations between them
The position and orientation of an object in real life can be described with direction and magnitude e.g. the TV is 3 meters in front of me. While that description is good for me it might be that for someone else in a room the TV is 5 meters to the right of that person. Information about objects are given in the context of a reference frame. Usually in Computer Graphics objects need to be expressed with respect to the camera frame, this article covers why we need to have multiple reference frames as well as the math needed to express objects in a different reference frame.
Me
Published on Thu, Oct 15, 2015
Last modified on Sun, Jun 16, 2024
855 words - Page Source

Quaternions

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.
Me
Published on Tue, Sep 8, 2015
Last modified on Sun, Jun 16, 2024
1448 words - Page Source

Complex numbers

Complex numbers

Imaginary numbers were invented to solve problems for equestions with no real roots, complex numbers extend imaginary numbers by adding a real number.


This article covers the definition of complex numbers, operations such as addition, product, norm, conjugate, inverse and square root. Finally, this article covers the geometric and polar representations of complex numbers.
Me
Published on Tue, Sep 8, 2015
Last modified on Fri, Nov 22, 2024
1514 words - Page Source

Hamiltonian Graphs

Hamiltonian graphs and hamiltonian cycles.
Me
Published on Tue, Jul 7, 2015
Last modified on Sun, Jun 16, 2024
108 words - Page Source

Eulerian Graph and Eulerian Trails

Eulerian Graph and Eulerian Trails

This article discusses Eulerian circuits and trails in graphs. An Eulerian circuit is a closed trail that contains every edge of a graph, and an Eulerian trail is an open trail that contains all the edges of a graph but doesn’t end in the same start vertex.


This article also explains the Königsberg Bridge Problem and how it’s impossible to find a trail on it. Finally there are two implementations in C++ to find Eulerian trails in directed and underected graphs.

Me
Published on Sun, Jul 5, 2015
Last modified on Fri, Nov 22, 2024
1283 words - Page Source

Single Source Shortest Path (SSSP) in a graph

Single Source Shortest Path (SSSP) in a graph

Given a weighted graph $G$ with $V$ vertices and $E$ edges where all the weights are non-negative and given a source vertex $s$, the single source shortest path problem consists in finding the distance from $s$ to all the other vertices.


In this article I describe the problem in a weighted and unweighted graph as well as implementations using BFS for unweighted graphs and Dijkstra's algorithm for weighted graphs using an array and a priority queue.
Me
Published on Fri, Jul 3, 2015
Last modified on Sun, Jun 16, 2024
1248 words - Page Source

Introduction to Trees in Graph Theory

Introduction to trees in Graph Theory
Me
Published on Tue, Jun 30, 2015
Last modified on Sun, Jun 16, 2024
61 words - Page Source

Strongly Connected Components in Graph Theory

Strongly Connected Components in Graph Theory

Strongly connected component of a directed graph is a subgraph in which there exists a path from every vertex to every other vertex in the subgraph.


In this article I implement Tarjan's algorithm to find strongly connected components in a graph.
Me
Published on Thu, Jun 25, 2015
Last modified on Sun, Jun 16, 2024
918 words - Page Source

Minimum Spanning Tree

Minimum Spanning Tree

This article covers minimum spanning tree (MST), MSTs have important applications, MST can be used to minimize the cost of building a communication network, or it can be used to identify important features or patterns in a dataset.


I implement the Prim and Kruskal algorithms to find the minimum spanning tree in a graph with different implementations for sparse and dense graphs, also with the theory covered I also implement an algorithm to find the number of nimal spanning trees in a graph.

Me
Published on Wed, Jun 24, 2015
Last modified on Sun, Jun 16, 2024
2563 words - Page Source

Cut-vertices (articulation points) in Graph Theory

Cut-vertices (articulation points) in Graph Theory

A vertex $v$ in a connected graph $G$ is called a cut-vertex if $G - v$ results in a disconnected graph, note that $G - v$ is an induced subgraph of $G$ (meaning that $G - v$ contains all the vertices of $G$ but $v$ and a set of edges $G - V$ where $V$ consists of all the edges incident to $v$).


In this article I implement an algorthm to find the articulation points in an undirected graph, also I explain biconnected components in an undirected graph and explain concepts such as edge connectivity and vertex connectivity.
Me
Published on Wed, Jun 24, 2015
Last modified on Sun, Jun 16, 2024
1421 words - Page Source

Cut-edges (bridges) in Graph Theory

Cut-edges (bridges) in Graph Theory

An edge $e = uv$ of a connected graph $G$ is called a bridge if $G - e$ is disconnected (it increases the number of components).


In this article I implement an algorthm to find the bridges of an undirected graph using DFS. Next I describe an algorithm to find strong bridges in directed graphs.
Me
Published on Wed, Jun 24, 2015
Last modified on Sun, Jun 16, 2024
795 words - Page Source

Topological sorting of a graph

Topological sorting of a graph

Topological sorting is a linear ordering of the vertices of a directed acyclic graph (DAG) such that for every directed edge (u, v), vertex u comes before vertex v in the ordering. In other words, it is a way to order the vertices of a DAG such that there are no directed cycles.


In this article I implement the topological sorting algorithm as well as an example of how to use it to find the shortest path in a directed acyclic graph.
Me
Published on Wed, Jun 24, 2015
Last modified on Sun, Jun 16, 2024
410 words - Page Source

Traversal of graphs

Traversal of graphs

There are many ways to traverse a graph. For example through breadth-first search and depth-first search. Exploring it with a breadth-first search has interesting properties like implicitly computing the distance from a source $s$ to all the reachable vertices. Exploring it with a depth-first search has properties about edges like finding back edges, forward edges and cross edges.


This article has implementations for both BFS and DFS.
Me
Published on Wed, Jun 24, 2015
Last modified on Sun, Jun 16, 2024
970 words - Page Source

Introduction to Graph Theory

Introduction to Graph Theory

Graph Theory has numerous applications in real life, it can be used in problems found in social networks, transportation networks, the internet, chemistry, computer sciense, electrical networks among others.


In general, any problem that involves relationships between objects can be modeled as a graph.
Me
Published on Mon, Jun 22, 2015
Last modified on Sun, Jun 16, 2024
2366 words - Page Source

Integer Factorization

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.
Me
Published on Sun, Jun 14, 2015
Last modified on Sun, Jun 16, 2024
1623 words - Page Source

Divisor Function

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.
Me
Published on Sat, Jun 13, 2015
Last modified on Sun, Jun 16, 2024
681 words - Page Source

Primality Test

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 erathostenes sieve, the euler primality test and the miller-rabin primality test.
Me
Published on Thu, Jun 11, 2015
Last modified on Sun, Jun 16, 2024
1381 words - Page Source

Prime factors of a factorial

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$
Me
Published on Tue, Jun 9, 2015
Last modified on Sun, Jun 16, 2024
254 words - Page Source

Special factorial modulo p

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++.
Me
Published on Tue, Jun 9, 2015
Last modified on Sun, Jun 16, 2024
854 words - Page Source

Discrete Logarithm

Discrete Logarithm
The discrete logarithms 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. I cover two algorithms to solve this problem: by trial multiplication and using baby step giant step.
Me
Published on Mon, Jun 8, 2015
Last modified on Sun, Jun 16, 2024
588 words - Page Source

Chinese Remainder Theorem

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 defition of the CRT and an example implementation in C++.
Me
Published on Fri, Jun 5, 2015
Last modified on Sun, Jun 16, 2024
613 words - Page Source

Modular Arithmetic

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 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.
Me
Published on Thu, Jun 4, 2015
Last modified on Sun, Jun 16, 2024
1000 words - Page Source

Extended Euclidean Algorithm

Extended Euclidean Algorithm
The extended euclidean algorithm finds solutions to the equation $ax + by = gcd(a, b)$ where $a, b$ 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.
Me
Published on Tue, Jun 2, 2015
Last modified on Sun, Jun 16, 2024
814 words - Page Source

Binary Exponentiation

Binary Exponentiation
Given two numbers $a$ and $n$ finding $a^n$ involves doing $n$ multiplications of $a$, however, it’s possible to do this in $log(n)$ operations by using binary exponentiation.
Me
Published on Mon, Jun 1, 2015
Last modified on Sun, Jun 16, 2024
191 words - Page Source

Erathostenes Sieve

Erathostenes Sieve
The erathostenes sieve is an algorithm to find prime numbers up to a positive number $n$ using $O(n)$ space.
Me
Published on Mon, Jun 1, 2015
Last modified on Sun, Jun 16, 2024
138 words - Page Source

Euclidean Algorithm

Euclidean Algorithm
The euclidean algorithm finds the greatest common divisor of two numbers. In this article I implement the algorithm from scratch in C++.
Me
Published on Mon, Jun 1, 2015
Last modified on Sun, Jun 16, 2024
425 words - Page Source

Euler's phi function

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 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++.
Me
Published on Mon, Jun 1, 2015
Last modified on Sun, Jun 16, 2024
520 words - Page Source

Derivative

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 physical and geometric interpretation of the derivative as well as some applications like finding maxima and minima in a function and newton-raphson.
Me
Published on Thu, Apr 2, 2015
Last modified on Fri, Nov 22, 2024
3427 words - Page Source

Integral

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 an example of antidifferentiation and some examples of evaluating definite integrals.
Me
Published on Thu, Apr 2, 2015
Last modified on Sun, Jun 16, 2024
2925 words - Page Source

Taylor's Theorem and Infinite Series

Taylor's Theorem and Infinite Series
Taylor Series helps 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.
Me
Published on Thu, Apr 2, 2015
Last modified on Sun, Jun 16, 2024
793 words - Page Source

Introduction to Calculus

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 minim/maxima like determinining the maximum range of a projectile, and to find the length of curves areas and volumes.
Me
Published on Tue, Mar 31, 2015
Last modified on Sun, Jun 16, 2024
421 words - Page Source