# Preliminary Concepts

graph LR
classDef currentPage stroke:#333,stroke-width:4px

ALG(["fas:fa-trophy Algorithmis fas:fa-trophy "])

ASY_ANA(["fas:fa-check Asymptotic Analysis#160;"])
click ASY_ANA "./math-asymptotic-analysis"

MAT_NOT(["fas:fa-check Mathematical Notation#160;"])
click MAT_NOT "./math-notation"

POL(["fas:fa-check Polynomials #160;"])
click POL "./math-polynomials"

MAT_FUN(["fas:fa-check Math Functions#160;"])
click MAT_FUN "./math-functions"

LOG(["fas:fa-check Logarithms#160;"])
click LOG "./math-logarithms"

COM(["fas:fa-check Combinatorics#160;"])
click COM "./math-combinatorics"

SET_NOT(["fas:fa-check Set Notation#160;"])
click SET_NOT "./math-set-notation"

GRA(["fas:fa-check Graphing#160;"])
click GRA "./math-graphing"

BW(["fas:fa-check Bitwise Logic#160;"])
click BW "./math-bitwise"

MAT(["fas:fa-check Matrices#160;"])
click MAT "./math-matrices"

ASY_ANA-->ALG
BW-->ALG
MAT-->ALG
COM & GRA & SET_NOT-->ASY_ANA
MAT_NOT--> SET_NOT
POL & LOG--> MAT_FUN
MAT_FUN--> GRA


A journey of a thousand miles begins with one step. - Lao Tzu

It’s common, especially for those with programming knowledge, to want to dive right in and start writing algorithms. This works to some extent; however, the simple fact of the matter is that without foundational competency in a select few mathematical concepts1, much of the algorithms landscape is inaccessible2. For some, spending time studying prerequisites isn’t a problem. For others, it’s an almost impenetrable barrier because they can’t immediately see the benefit. This is why readers are welcomed to “choose their own adventure”. There are essentially three paths through the content:

1. Work through all the preliminary concepts before attempting the first algorithm.
2. Each algorithm page has a “prerequisites” section at the top; study each preliminary topic in the order of encounter.
3. Forget preliminary concepts all together and dig in. It’s sometimes possible to derive the general notion from context.

For your convenience, the graph at the top of the page depicts the progression of preliminary concepts required for algorithm mastery. Clicking a node will take you the content. Some algorithms have additional prerequisites which are listed in the prerequisites section for the said algorithms. Feel free to dive as deep or shallow as you are comfortable with. There is no preferred path. The only recommendation is to at least skim Asymptotic Analysis before attempting an algorithm. The most important thing is to take Lao Tzu’s advice and take the first step. You’ll be surprised how far you’ll go.

## Math Anxiety

Math is scary to the point of phobia for many people. The condition is so common that it has a clinical term: “math anxiety”3. This isn’t surprising given the current state of mathematical education. High school graduates often perceive math as little more than an exercise in rote memorization of arbitrary steps. However, math of this ilk is not what’s covered here. Studying math in an applied context transforms it into a compelling and useful endeavor. It could even be described as fun!

To put you completely at ease, if you’re reading this you already have the skills you need to master the requite math. The only prerequisite for the preliminary concepts is a basic conception of arithmetic (addition, subtraction, multiplication, division, exponents). Furthermore, to make the best use of your time, there’s no more math than necessary to elucidate the subject matter. If you have programming knowledge, you already have many mathematical skills you may not even be aware of. Abstraction, logic, functions, and protocols (to name a few) are intuitive concepts for programmers. You have the Hideous Humpback Freak’s personal guarantee, if you put forth the effort, you will become proficient with algorithms and data structures.

Regardless of the path you choose, it’s time to get started!

1. Don’t let this intimidate you. The mathematical concepts presented here are fairly straightforward and are distilled down to what is required for mastery of the content. This won’t be anything like the endless problem sets from high school.

2. It’s been said that math isn’t a requirement for becoming a competent software developer. There are many gainfully employed programmers who know little more than basic arithmetic. It’s true, many people make a living writing software that consists of gluing pre-fabricated components together and shuffling data around. However, most complex software is impossible to write without a good understanding of math. Examples include: cryptography, signal processing, compression, ranking, optimization, artificial intelligence, and the list goes on. In short, all impactful (not to mention fun) software requires math.

3. The term originates from a 2002 paper entitled Math Anxiety: Personal, Educational, and Cognitive Consequences by Mark H. Ashcraft. It resonates with many people as evidenced by the more than half million results returned by a Google query for “math anxiety”.