tinycodinglm / math /math-0173.jsonl
winapiadmin's picture
Upload folder using huggingface_hub (part 16)
d517dc9 verified
|
Raw History Blame Contribute Delete
1.31 kB
opencode trace
System You are an expert mathematician and programmer.

You are an expert mathematician and programmer.

User

Explain graph matrices and spectral graph theory

Assistant

Adjacency matrix A: A[i][j]=1 if edge i-j. A^k[i][j] = number of paths length k from i to j.

Degree matrix D: diagonal, D[i][i] = degree of vertex i.

Laplacian L = D - A. Properties: L has eigenvalue 0 with multiplicity = number of connected components.

Fiedler vector: eigenvector for second-smallest eigenvalue of L. Used for graph partitioning (spectral bisection).

Kirchhoff's matrix tree theorem: number of spanning trees = any cofactor of L (delete row i, column i, take determinant).

Incidence matrix B: B[i][j] = 1 if edge j starts at vertex i, -1 if it ends there. L = B*B^T.

Algebraic connectivity: second-smallest eigenvalue of L. Measures how well-connected the graph is.

Normalized Laplacian: L_norm = D^{-1/2} L D^{-1/2}. Eigenvalues in [0,2]. Related to random walks.

Applications: graph partitioning, clustering, connectivity analysis, spanning tree counting.