MethodMath
Combinatorics
17 questions

Enumeration, generating functions, recurrence relations, graph theory, and combinatorial designs. Counting and arrangement problems.

Login to follow

Questions about Combinatorics

IM
Updated May 16, 2026

Question details

What is the difference between Eulerian and Hamiltonian paths in graph theory?

I am studying graph theory and I keep confusing Eulerian paths with Hamiltonian paths. Can someone clarify the difference? Eulerian path: A path that uses every edge exactly once. Hamiltonian path: A path that visits every vertex exactly once. My questions: 1. What are the necessary and sufficient conditions for a graph to have an Eulerian circuit? 2. What are the conditions for a Hamiltonian cycle? (I hear this is much harder — why?) 3. Does the Knight's Tour problem involve Eulerian or Hamiltonian paths? 4. How do I find an Eulerian circuit in a graph using Fleury's algorithm? Examples would really help.

more
1318
DA
Updated May 16, 2026

Question details

How to prove a graph is bipartite using graph coloring?

I need to understand the relationship between bipartite graphs and 2-colorability. A graph G = (V, E) is bipartite if its vertices can be partitioned into two sets V₁ and V₂ such that every edge connects a vertex in V₁ to a vertex in V₂. The theorem states: A graph is bipartite if and only if it contains no odd cycles. How would I prove this? Also, given a graph, what algorithm can I use to determine if it's bipartite? For example, is this graph bipartite? - Vertices: 1, 2, 3, 4, 5 - Edges: (1,2), (2,3), (3,4), (4,5), (5,1), (1,3)

more
1405
DA
Updated May 16, 2026

Question details

How to solve recurrence relations using generating functions?

I'm trying to solve recurrences like: aₙ = 5a_(n-1) - 6a_(n-2), a₀ = 1, a₁ = 2 I can solve this using the characteristic equation method, but I want to learn the generating functions approach. Define G(x) = ∑_(n=0)^(∞) aₙ xⁿ. Then: ∑_(n=2)^(∞) aₙ xⁿ = 5∑_(n=2)^(∞) a_(n-1)xⁿ - 6∑_(n=2)^(∞) a_(n-2)xⁿ How do I manipulate these sums to get a closed form for G(x), and then extract an explicit formula for aₙ?

more
0338
DS
Updated May 16, 2026

Question details

How many ways to arrange n distinct objects in a circle? (Circular permutations)

I understand that for arranging n distinct objects in a line, there are n! ways. But for a circle, the answer is (n-1)!. Why? For example, with 4 people at a round table: - Rotational symmetry means arrangements that differ only by rotation are considered the same - So 4! / 4 = 6 = 3! But what if the circle has a fixed reference point (like numbered seats)? Does it become n! again? Also, what about arrangements of beads on a necklace where flipping over is also considered the same (dihedral symmetry)? Does the count become (n-1)!/2?

more
2395
DS
Updated May 16, 2026

Question details

How to use the Pigeonhole Principle to solve combinatorial problems?

The Pigeonhole Principle: If n items are placed into m containers and n > m, then at least one container contains at least two items. The generalized form: If n items are placed into m containers, then at least one container contains at least ⌈ n/m ⌉ items. Can someone show how to apply this to non-trivial problems? For example: 1. Prove that among any 5 points in a unit square, there exist two points at distance ≤ 1/√2. 2. In any set of 13 integers, there exist two whose difference is divisible by 12. 3. Any subset of size 6 from 1, 2, \ldots, 10 contains two numbers that sum to 11. What is the general strategy for identifying "pigeonholes" in a problem?

more
1514
IM
Updated May 15, 2026

Question details

How to solve a first-order linear ODE using an integrating factor?

I'm studying differential equations and I keep making mistakes when using the integrating factor method. For a first-order linear ODE of the form: dy/dx + P(x)y = Q(x) The standard approach is to multiply both sides by the integrating factor μ(x) = e^(∫ P(x) dx). But why does this work? And what is the systematic procedure for a problem like: dy/dx + 2xy = x, y(0) = 1

more
1183
TD
Updated May 14, 2026

Question details

How to determine if a graph is planar using Kuratowski's theorem?

I am studying graph theory and I want to understand planar graphs — graphs that can be drawn on a plane without edge crossings. I know Kuratowski's theorem: A graph is planar iff it contains no subdivision of K₅ (complete graph on 5 vertices) or K_(3,3) (complete bipartite graph on 3+3 vertices). But: 1. What does a "subdivision" mean exactly? 2. Why are K₅ and K_(3,3) non-planar? 3. How do I check if a given graph contains a K₅ or K_(3,3) subdivision? 4. What is Euler's formula V - E + F = 2 for planar graphs and how is it used? Also, do all planar graphs have a straight-line drawing?

more
1183
DK
Updated May 10, 2026

Question details

How to count Catalan numbers and identify their combinatorial interpretations?

I am studying combinatorics and I am fascinated by Catalan numbers. The n-th Catalan number is: Cₙ = 1/n+1 C(2n,n) The first few are: 1, 1, 2, 5, 14, 42, 132, 429, ... My questions: 1. How is the formula derived from the recurrence relation Cₙ = ∑_(i=0)^(n-1) Cᵢ C_(n-1-i)? 2. What are the most common combinatorial interpretations of Catalan numbers? 3. How many valid sequences of n pairs of parentheses are there? (e.g., for n = 3: ((())), (()()), (())(), ()(()), ()()() — 5 ways) 4. How many binary trees with n nodes exist? 5. How many ways can a convex (n+2)-gon be triangulated? 6. How does the generating function C(x) = ∑ Cₙ xⁿ lead to the closed form? I want to understand the deep connections.

more
1259
ET
Updated May 8, 2026

Question details

How to compute combinations with repetitions (stars and bars)?

I am studying combinatorics and I understand the basic combinations formula C(n, k) = C(n,k) for choosing k items from n distinct items without repetition. But I am confused about combinations with repetition (also called multisets). The formula is: C(n + k - 1,k) where n is the number of types and k is the number of items chosen. Can someone explain: 1. Why the formula is C(n+k-1,k) using the stars and bars analogy? 2. How to apply it to: "How many ways to buy 10 donuts if there are 5 flavors available?" 3. What about the equation x₁ + x₂ + x₃ + x₄ = 15 with xᵢ ≥ 0? How many non-negative integer solutions? 4. What changes if xᵢ ≥ 1 (positive solutions)?

more
1286
MO
Updated May 4, 2026

Question details

How to compute the arc length of a parametric curve?

I am studying calculus and I need to compute the arc length of a curve defined parametrically. For a curve given by (x(t), y(t)) for a ≤ t ≤ b, the arc length formula is: L = ∫_a^b √(dx/dt\ ight)² + (dy/dt\ ight)² dt But where does this formula come from? And how do I apply it to a specific problem like finding the length of one arch of the cycloid x = t - sin t, y = 1 - cos t for 0 ≤ t ≤ 2π?

more
160
LH
Updated Apr 29, 2026

Question details

How to find the shortest path in a weighted graph using Dijkstra's algorithm?

I am studying graph theory and I need to understand Dijkstra's algorithm for finding the shortest path from a source vertex to all other vertices in a weighted graph. I know the basic idea: 1. Set distance to source = 0, all others = ∞ 2. Mark all vertices as unvisited 3. For the current vertex, consider all unvisited neighbors and update their distances 4. Mark current as visited, select the unvisited vertex with smallest distance 5. Repeat until all visited But I have specific questions: 1. Why does Dijkstra's algorithm fail with negative edge weights? 2. What is the time complexity with different data structures? 3. Can someone walk through the algorithm step-by-step on a concrete graph? For example, find shortest paths from A on: - A→B: 4, A→C: 2 - B→C: 1, B→D: 5 - C→D: 8, C→E: 10 - D→E: 2, D→Z: 6 - E→Z: 3

more
1169
IM
Updated Apr 28, 2026

Question details

How to integrate ∫ e^x sin(x) dx using integration by parts?

I am studying AP Calculus BC and I keep going in circles when trying to evaluate this integral: ∫ e^x sin(x) dx I tried using integration by parts with u = e^x and dv = sin(x)\,dx, which gave me: ∫ e^x sin(x)\,dx = -e^xcos(x) + ∫ e^xcos(x)\,dx Then I applied integration by parts again on ∫ e^xcos(x)\,dx and ended up back where I started. Could someone explain the standard technique for solving this type of cyclic integral?

more
1175
Chloe Villeneuve
Updated Apr 26, 2026

Question details

How to find a minimum spanning tree using Kruskal's and Prim's algorithms?

I am studying graph theory and I need to understand minimum spanning trees (MST). A spanning tree of a connected, undirected graph is a subgraph that is a tree and includes all vertices. I know two algorithms: 1. Kruskal's algorithm: Sort edges by weight, add edges one by one if they don't form a cycle 2. Prim's algorithm: Start from a vertex, repeatedly add the smallest edge connecting the tree to a vertex outside My questions: 1. Why do these algorithms work (correctness proof)? 2. What are the time complexities of each? 3. When should I use Kruskal vs Prim? 4. How do I detect cycles efficiently in Kruskal's algorithm? 5. Can I apply MST to a real-world problem like designing a fiber optic network connecting cities? For example, find the MST of the graph with vertices A-F and edges: AB:4, AC:2, BC:1, BD:5, CD:8, CE:10, DE:2, DZ:6, EZ:3.

more
1338
ZP
Updated Apr 26, 2026

Question details

How to solve linear congruences using the Extended Euclidean Algorithm?

I'm studying number theory and I need to solve linear congruences like: 17x ≡ 3 (mod 29) I know I need to find the modular inverse of 17 modulo 29 using the Extended Euclidean Algorithm. But I get confused with the back-substitution step. Could someone show me how to solve this specific congruence step by step, explaining how the Extended Euclidean Algorithm works?

more
1164
IM
Updated Apr 22, 2026

Question details

How to solve recurrence relations using the characteristic equation method?

I am studying discrete mathematics and I need to solve linear recurrence relations. For example: aₙ = 5a_(n-1) - 6a_(n-2), a₀ = 1, a₁ = 2 I know the characteristic equation is r² - 5r + 6 = 0, giving r = 2, 3, and the general solution is aₙ = α(2ⁿ) + β(3ⁿ). But what happens when: 1. The characteristic equation has repeated roots (e.g., aₙ = 4a_(n-1) - 4a_(n-2))? 2. The recurrence is non-homogeneous (e.g., aₙ = 3a_(n-1) + 2ⁿ)? 3. The recurrence has complex roots? Can someone explain the complete solution method for each case?

more
1110
DT
Updated Apr 22, 2026

Question details

How to find the chromatic number of a graph and prove it with graph coloring?

I am studying graph theory and I need to understand graph coloring. A proper coloring assigns colors to vertices so that adjacent vertices have different colors. The chromatic number χ(G) is the minimum number of colors needed. My questions: 1. How do I find the chromatic number of simple graphs like Cₙ (cycle), Kₙ (complete), and K_(m,n) (complete bipartite)? 2. How do I prove that the chromatic number of a planar graph is at most 4 (Four Color Theorem)? 3. What is Brooks' theorem for upper bounds on χ(G)? 4. How do I use the greedy coloring algorithm? 5. What are the applications of graph coloring (scheduling, register allocation)? For example, find χ(G) for the Petersen graph.

more
1340
IM
Updated Apr 15, 2026

Question details

How to use the inclusion-exclusion principle for counting problems?

I am studying combinatorics and I understand the basic inclusion-exclusion principle for two sets: |A ∪ B| = |A| + |B| - |A ∩ B| But I need help with: 1. The general formula for n sets 2. A concrete example: How many integers from 1 to 100 are divisible by 2, 3, or 5? 3. How to handle problems where we want elements that belong to exactly one set (not just at least one)? I know the general formula involves alternating sums of intersections, but I get confused with the signs.

more
1210