Mathematical Notation & Symbols Reference
Complete glossary of set theory, asymptotic bounds, discrete math symbols, and recurrence notation.
Precise mathematical notation and unambiguous pseudocode syntax prevent misinterpretations between theoretical proofs and executable software. This chapter establishes the universal mathematical symbols, asymptotic definitions, pointer conventions, and language-independent pseudocode standards used across the entire curriculum.
Learning Objectives
#By the end of this chapter, you will be able to:
- Interpret and apply formal set theory, interval, and floor/ceiling notations in algorithmic contexts.
- Distinguish between asymptotic upper bounds (), lower bounds (), and tight bounds ().
- Read and author standardized, language-independent algorithmic pseudocode with explicit line numbering and scope.
- Map mathematical pointer notations (
HEAD,TAIL,node.next,adj[u]) to concrete memory references in C++, Java, Python, Go, and Rust.
1. Mathematical & Set Notations
#Standard mathematical conventions used throughout the 62 chapters to describe data domains, sizes, and operational invariants:
| Notation | Meaning | Example / Definition |
|---|---|---|
| Element of | ( belongs to set ) | |
| Not an element of | ( does not belong to set ) | |
| Proper subset / Subset | (Subset of vertices) | |
| Empty set | ||
| Natural numbers | or | |
| Integers | ||
| Real numbers | Continuous numerical domain | |
| Closed interval | All numbers such that | |
| Half-open interval | All numbers such that | |
| Floor function | Greatest integer (e.g., ) | |
| Ceiling function | Smallest integer (e.g., ) | |
| Summation | ||
| Product | ||
| Binary Logarithm | Strictly in computer science unless noted |
2. Asymptotic & Complexity Notations
#Asymptotic notation characterizes the limiting behavior of an algorithm's runtime or memory footprint as input size .
Asymptotic Growth Rate Hierarchy
#| Order of Growth | Common Term | Example Algorithm / Operation |
|---|---|---|
| Constant | Array indexing, hash table average lookup | |
| Logarithmic | Binary search, balanced BST lookup | |
| c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 | ||
| c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 | ||
| c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 | ||
| s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 | ||
| c69,-144,104.5,-217.7,106.5,-221 | ||
| l0 -0 | ||
| c5.3,-9.3,12,-14,20,-14 | ||
| H400000v40H845.2724 | ||
| s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 | ||
| c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z | ||
| M834 80h400000v40h-400000z"/>) | Sublinear | Square root decomposition, trial division |
| Linear | Linear scan, counting elements | |
| Linearithmic | Merge sort, heap sort, quick sort average | |
| Quadratic | Bubble sort, nested loops over arrays | |
| Cubic | Naive matrix multiplication, Floyd-Warshall | |
| Exponential | Recursive subset generation, naive Fibonacci | |
| Factorial | Generating all permutations, brute force TSP |
Formal Definitions
#| Symbol | Name | Formal Mathematical Definition | Practical Interpretation |
|---|---|---|---|
| Big-O | for all () | Upper Bound: Growth rate does not exceed | |
| Big-Omega | for all () | Lower Bound: Growth rate is at least | |
| Big-Theta | for all | Tight Bound: Exact rate within constant factors | |
| Little-o | Strict Upper Bound: Asymptotically strictly smaller | ||
| Little-omega | Strict Lower Bound: Asymptotically strictly larger |
3. Structural & Pointer Notations
#Memory & Linear Structures
A[i]: Element at zero-based index in array .length(A): Total active elements stored in structure .capacity(A): Total allocated physical buffer slots before a resize is triggered.HEAD: Pointer or reference to the initial node of a linked list.TAIL: Pointer or reference to the terminal node of a linked list.node.value: Data payload contained inside a node.node.next: Pointer referencing the successor node.node.prev: Pointer referencing the predecessor node (doubly linked list).NULL/NIL: Ground reference denoting absence of memory address.
Trees & Hierarchical Structures
#- : A tree structure.
root: The unique origin node possessing indegree 0.node.left,node.right: Left and right child references in binary trees.node.parent: Pointer to the direct ancestor.- : Height of node (longest downward edge-path to a leaf; leaf height ).
- : Depth of node (edges on path from root down to ; root depth ).
- : Balance Factor of node , defined as .
Graphs & Networks
#- : A graph consisting of vertex set and edge set .
- or : Total count of vertices (nodes).
- or : Total count of edges (arcs).
- : Edge connecting vertex to vertex .
- : Scalar weight or cost associated with edge .
- : Degree of vertex (total incident edges).
- : In-degree and out-degree in directed graphs (digraphs).
- : Adjacency list storing all vertices adjacent to .
4. Universal Pseudocode Specification Standard
#To ensure algorithms transfer seamlessly across C++, Java, Python, Go, and Rust, every algorithm in this curriculum follows a language-independent pseudocode standard.
Syntax Specifications
#- Line Numbering: Explicit 1-based numbering enables step-by-step state table tracing.
- Assignment Operator: Left arrow
←indicates assignment (reserving=for equality comparison). - Equality & Relations:
=(equality),≠(inequality),<,≤,>,≥. - Logical Operators:
and,or,notwritten in lowercase text. - Indentation Scoping: 4-space indentation defines block scope without language-specific braces.
- Control Flow:
while <condition>:for <var> ← <start> to <end>:(inclusive range)for each <item> in <collection>:if <condition>: ... else if <condition>: ... else:
- Signatures:
- Declaration:
ALGORITHM Name(parameters) - Exit:
return <value>
- Declaration:
Reference Implementation Pattern
#ALGORITHM BinarySearch(A, target)
Input: Sorted array A of length n, target value to locate
Output: Index of target in A, or -1 if target is not present
1. low ← 0
2. high ← length(A) - 1
3. while low ≤ high:
4. mid ← low + ⌊(high - low) / 2⌋
5. if A[mid] = target:
6. return mid
7. else if A[mid] < target:
8. low ← mid + 1
9. else:
10. high ← mid - 1
11. return -15. Key Takeaways
#- Strict Terminology: Distinguish between worst-case runtime and Big-O upper bounds; Big-O is a mathematical envelope, while worst-case is an operational scenario.
- Logarithmic Base: In computer science, implies base 2 unless explicitly denoted otherwise (due to binary subdivisions).
- Pseudocode Discipline: Explicit line numbering and unambiguous assignment (
←) eliminate translation errors when implementing algorithms across diverse programming languages.
References & Academic Attribution
#- Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2022). Introduction to Algorithms (4th ed.), Chapters 1–3. MIT Press.
- Knuth, D. E. (1997). The Art of Computer Programming, Volume 1: Fundamental Algorithms (3rd ed.). Addison-Wesley.
- IEEE / ACM Computing Curricula Guidelines (2020). Curriculum Guidelines for Undergraduate Degree Programs in Computer Science.