diff --git a/algorithms/BFS.md b/algorithms/BFS.md index aabe12a..328170c 100644 --- a/algorithms/BFS.md +++ b/algorithms/BFS.md @@ -1,3 +1,13 @@ +--- +title: Breadth First Search Algorithm Implementation and Analysis +category: algorithms +tags: + - graph-traversal + - shortest-paths + - graph-theory + - complexity-analysis +description: A comprehensive explanation of the Breadth First Search (BFS) algorithm, including implementation, complexity analysis, and mathematical proofs. The document covers the algorithm's properties for finding shortest paths in graphs and includes Python implementations with detailed theoretical foundations and lemmas about level ordering. +--- # Breadth First Search Completely explore the vertices of a graph in order of their distance from the starting node. diff --git a/algorithms/DAGs.md b/algorithms/DAGs.md index 29e31c9..b03c006 100644 --- a/algorithms/DAGs.md +++ b/algorithms/DAGs.md @@ -1,3 +1,14 @@ +--- +title: Topological Ordering and Properties of Directed Acyclic Graphs +category: algorithms +tags: + - graph theory + - topological sorting + - directed acyclic graphs + - proofs +description: A technical exploration of Directed Acyclic Graphs (DAGs) focusing on their topological ordering properties and fundamental lemmas. The document includes mathematical proofs of key DAG properties and presents a Python implementation of the topological sorting algorithm. +--- + # Directed Acyclic Graphs (DAGs) DAGs are pretty self explanatory, but their use cases are vast. diff --git a/algorithms/DFS.md b/algorithms/DFS.md index 1a0ca94..7fda972 100644 --- a/algorithms/DFS.md +++ b/algorithms/DFS.md @@ -1,3 +1,14 @@ +--- +title: Depth First Search Algorithm and Tree Properties +category: algorithms +tags: + - graph theory + - depth first search + - spanning trees + - graph traversal +description: A technical explanation of Depth First Search (DFS) algorithm and its tree properties, including both recursive and iterative implementations. The document covers key properties of DFS trees, including the ancestor-descendant relationship of non-tree edges, and includes a formal lemma and proof about DFS tree characteristics. +--- + # Depth First Search (DFS) Running DFS on a graph produces a DFS tree (or depth-first spanning-tree). The DFS tree contains all the vertices of the graph and the edges of the DFS tree are a subset of the edges of the original graph. diff --git a/algorithms/approximation-algorithms.md b/algorithms/approximation-algorithms.md index c5814f9..4801105 100644 --- a/algorithms/approximation-algorithms.md +++ b/algorithms/approximation-algorithms.md @@ -1,3 +1,14 @@ +--- +title: Approximation Algorithms +category: algorithms +tags: + - approximation + - algorithms + - vertex cover + - set cover +description: A survey of approximation algorithms, including the 2-approximation for vertex cover and the log(n) approximation for set cover. +--- + # Approximation Algorithms When faced with a problem that can be reduced to some NP-Complete problem, you (most probably) cannot generally solve it in polynomial time. For example: diff --git a/algorithms/bipartite-graphs.md b/algorithms/bipartite-graphs.md index 13ecce5..10eaf3f 100644 --- a/algorithms/bipartite-graphs.md +++ b/algorithms/bipartite-graphs.md @@ -1,3 +1,14 @@ +--- +title: Bipartite Graphs Properties, Proofs, and Detection Algorithm +category: Graph Theory +tags: + - bipartite graphs + - graph coloring + - odd cycles + - breadth-first search +description: A comprehensive overview of bipartite graphs, including their formal definition and key properties related to vertex coloring and odd-length cycles. The document presents important lemmas about the relationship between bipartite graphs and odd cycles, along with proofs using BFS layer analysis for bipartite graph detection. +--- + # Bipartite Graphs - **Definition**: An undirected graph $G = (V, E)$ is bipartite if there exists a partition of $V$ into two sets $V_1$ and $V_2$ such that every edge in $E$ has one endpoint in $V_1$ and the other in $V_2$. diff --git a/algorithms/connected-components.md b/algorithms/connected-components.md index 1210b56..f378493 100644 --- a/algorithms/connected-components.md +++ b/algorithms/connected-components.md @@ -1,3 +1,14 @@ +--- +title: Finding Connected Components in Undirected Graphs Using BFS/DFS +category: algorithms +tags: + - graph theory + - connected components + - breadth-first search + - depth-first search +description: Explains how to partition an undirected graph into connected components using BFS or DFS algorithms in O(|V| + |E|) time complexity. Includes Python implementation using adjacency lists and demonstrates how to create a data structure that enables O(1) time queries for path existence between vertices. +--- + # Connected Components Given an undirected graph $G = (V, E)$, you can find partition $V$ into sets of connected components $C_1, C_2, \ldots$ in $O(|V| + |E|)$ using breadth-first search (BFS) or depth-first search (DFS). diff --git a/algorithms/divide-and-conquer.md b/algorithms/divide-and-conquer.md index 3a30f2e..334ef03 100644 --- a/algorithms/divide-and-conquer.md +++ b/algorithms/divide-and-conquer.md @@ -1,3 +1,14 @@ +--- +title: Divide and Conquer Algorithm Analysis with Implementation Examples +category: algorithms +tags: + - divide-and-conquer + - algorithmic-complexity + - recursive-algorithms + - computational-geometry +description: A comprehensive examination of divide and conquer algorithmic strategies, focusing on their implementation and analysis. The document covers theoretical foundations with mathematical proofs, practical examples including bisection method and closest pair problem, and includes Python implementations demonstrating these concepts. +--- + # Divide and Conquer Reduce problem to multiple sub-problems. While in induction, you typically only reduce your problem size by 1, with divide and conquer it is more common to reduce to some constant fraction of your original problem size. After recursively solving each sub-problem, merge the solutions. diff --git a/algorithms/dynamic-programming.md b/algorithms/dynamic-programming.md index 76a401a..0a0329c 100644 --- a/algorithms/dynamic-programming.md +++ b/algorithms/dynamic-programming.md @@ -1,3 +1,14 @@ +--- +title: Dynamic Programming Algorithms and Problem Solutions Guide +category: algorithms +tags: + - dynamic-programming + - optimization + - algorithm-analysis + - problem-solving +description: A comprehensive guide covering various dynamic programming algorithms and their implementations, including knapsack, sequence alignment, and tree-based problems. Includes detailed explanations of problem-solving approaches, correctness proofs, and runtime analysis for each algorithm, with practical Python implementations. +--- + # Dynamic Programming **Dynamic Programming** is an algorithmic paradigm where you break up a problem into a series of **overlapping** sub-problems, building up solutions to progressively larger subproblems until the original answer is obtained. The key efficiency of DP is to **memoize** the answers to sub problems, often yielding a polynomial time algorithm. diff --git a/algorithms/graphs-intro.md b/algorithms/graphs-intro.md index 1b3898d..8d8bf29 100644 --- a/algorithms/graphs-intro.md +++ b/algorithms/graphs-intro.md @@ -1,3 +1,14 @@ +--- +title: Introduction to Undirected Graphs and Their Properties +category: Graph Theory +tags: + - graph fundamentals + - graph representation + - graph properties + - data structures +description: A comprehensive introduction to undirected graphs covering fundamental concepts, properties, and storage methods. The document explains key terminology, proves important theorems about degree sums and odd vertices, and compares adjacency matrix and list representations with their respective time and space complexities. +--- + # Graphs Introduction ## Undirected Graphs diff --git a/algorithms/greedy-algorithms.md b/algorithms/greedy-algorithms.md index 60a900b..7398673 100644 --- a/algorithms/greedy-algorithms.md +++ b/algorithms/greedy-algorithms.md @@ -1,3 +1,15 @@ +--- +title: Greedy Algorithms for Interval Scheduling and Partitioning +category: Algorithm Analysis +tags: + - Greedy Algorithms + - Interval Scheduling + - Interval Partitioning + - Proof Techniques + - Optimization +description: This document explores greedy algorithms for interval scheduling and partitioning problems. It provides detailed explanations of the algorithms, including Python implementations, and presents rigorous proofs of correctness using techniques such as "Greedy Stays Ahead" and exchange arguments. +--- + # Greedy Algorithms Choose the most attractive choice at each step, and hope that this will lead to the optimal solution. Proofs of correctness are particularly important for greedy algorithms. diff --git a/algorithms/induction.md b/algorithms/induction.md index eda4191..add452e 100644 --- a/algorithms/induction.md +++ b/algorithms/induction.md @@ -1,3 +1,16 @@ +--- +title: Mathematical Induction and Pigeonhole Principle Proofs +category: Mathematics +tags: + - Induction + - Pigeonhole Principle + - Proof Techniques + - Number Theory + - Combinatorics +description: This document presents detailed proofs using mathematical induction and the pigeonhole principle. It demonstrates the inductive proof for the sum of natural numbers and provides a step-by-step proof of the pigeonhole principle, emphasizing the general approach to inductive reasoning in mathematics. +--- + + # Induction Prove... diff --git a/algorithms/linear-programming.md b/algorithms/linear-programming.md index fc23401..4a9ad85 100644 --- a/algorithms/linear-programming.md +++ b/algorithms/linear-programming.md @@ -1,3 +1,15 @@ +--- +title: Linear Programming Fundamentals and Applications in Optimization +category: Operations Research +tags: + - Linear Systems + - Linear Programs + - Optimization + - Standard Form + - Application Examples +description: This document provides a comprehensive overview of linear programming, covering linear systems, linear programs, and their standard forms. It explains key concepts such as hyperplanes, polytopes, and convex sets, and demonstrates how to transform various optimization problems into linear programs. The document also explores practical applications of linear programming in areas like max-flow and weighted vertex cover problems. +--- + # Linear Programming ## Linear Systems diff --git a/algorithms/network-flows.md b/algorithms/network-flows.md index ee8b0e9..7000500 100644 --- a/algorithms/network-flows.md +++ b/algorithms/network-flows.md @@ -1,3 +1,15 @@ +--- +title: Network Flow Algorithms and Applications in Graph Theory +category: Graph Theory +tags: + - Max Flow Min Cut + - Ford-Fulkerson Algorithm + - Bipartite Matching + - Vertex Cover + - Independent Set +description: Comprehensive overview of network flow algorithms, including Max Flow/Min Cut and Ford-Fulkerson. Covers applications in bipartite matching, vertex cover, and independent set problems. Includes proofs, algorithms, and problem-solving techniques for graph theory concepts. +--- + # Network Flow - Max Flow and Min Cut ## Max Flow/Min Cut diff --git a/algorithms/runtime.md b/algorithms/runtime.md index 6d85416..d7c2a10 100644 --- a/algorithms/runtime.md +++ b/algorithms/runtime.md @@ -1,3 +1,14 @@ +--- +title: Measuring Algorithm Efficiency with Asymptotic Notation +category: Computer Science +tags: + - Algorithm Analysis + - Time Complexity + - Asymptotic Notation + - Efficiency Bounds +description: This document introduces methods for measuring algorithm efficiency using asymptotic notation. It defines O-notation, Omega-notation, and Theta-notation, and provides common efficiency bounds for various function types, emphasizing the importance of polynomial-time algorithms in practical computing. +--- + # Measuring Efficiency Time is roughly proportional to the number of operations performed. Generally, this holds for simple operations. As a side note, you should avoid hashing. diff --git a/algorithms/tmp.md b/algorithms/tmp.md deleted file mode 100644 index 1aaad09..0000000 --- a/algorithms/tmp.md +++ /dev/null @@ -1,9 +0,0 @@ -#1 - -The knights have a bipartite coloring - -Each vertex is a square, and there are edges between two vertices - -Independent set problem: find the largest set of vertices such that no two vertices are connected by an edge - - diff --git a/algorithms/tree-intro.md b/algorithms/tree-intro.md index ec480b4..584bd09 100644 --- a/algorithms/tree-intro.md +++ b/algorithms/tree-intro.md @@ -1,3 +1,15 @@ +--- +title: Tree Properties and Proof of Edge Count +category: Graph Theory +tags: + - Trees + - Acyclic Graphs + - Connected Graphs + - Induction Proofs + - Graph Properties +description: This document explores the fundamental properties of trees in graph theory. It provides a proof by induction that a tree with n vertices has n-1 edges and outlines three key properties of trees, demonstrating their interconnected nature. +--- + # Trees ### Lemma: acyclic and connected diff --git a/site/README.html b/site/README.html index 812e893..51fa1bb 100644 --- a/site/README.html +++ b/site/README.html @@ -170,6 +170,7 @@