tinycodinglm / math /math-0173.jsonl
winapiadmin's picture
Upload folder using huggingface_hub (part 16)
d517dc9 verified
|
Raw History Blame
1.31 kB
{"type": "session", "harness": "opencode", "id": "math-0173", "name": "Graph Matrices and Spectral Theory"}
{"type": "message", "message": {"role": "system", "content": "You are an expert mathematician and programmer."}}
{"type": "message", "message": {"role": "user", "content": "Explain graph matrices and spectral graph theory"}}
{"type": "message", "message": {"role": "assistant", "content": "Adjacency matrix A: A[i][j]=1 if edge i-j. A^k[i][j] = number of paths length k from i to j.\n\nDegree matrix D: diagonal, D[i][i] = degree of vertex i.\n\nLaplacian L = D - A. Properties: L has eigenvalue 0 with multiplicity = number of connected components.\n\nFiedler vector: eigenvector for second-smallest eigenvalue of L. Used for graph partitioning (spectral bisection).\n\nKirchhoff's matrix tree theorem: number of spanning trees = any cofactor of L (delete row i, column i, take determinant).\n\nIncidence matrix B: B[i][j] = 1 if edge j starts at vertex i, -1 if it ends there. L = B*B^T.\n\nAlgebraic connectivity: second-smallest eigenvalue of L. Measures how well-connected the graph is.\n\nNormalized Laplacian: L_norm = D^{-1/2} L D^{-1/2}. Eigenvalues in [0,2]. Related to random walks.\n\nApplications: graph partitioning, clustering, connectivity analysis, spanning tree counting."}}