research/lab/py/carpet-nodal
0 directories and 2 files in research/lab/py/carpet-nodal.
carpet-nodal
- Builds the Sierpinski carpet as the Kronecker power at
levelof the 3 x 3 tile with the centre void,8^levelcells, asserted at 512 forlevel 3and 4096 forlevel 4. - Takes the cell graph on 4-neighbour adjacency between filled cells, checks it is one component, and diagonalises the combinatorial Laplacian
D - A, degree minus adjacency, densely withnumpy.linalg.eigh. - For the
k-th returned eigenvector counts strong nodal domainsnu_k: connected components of the positive cells plus connected components of the negative cells, a cell with|v| < 1e-9belonging to neither. - Clusters the spectrum at gap tolerance
1e-8into eigenvalue classes, reads the multiplicityr_kand the last index of each class, and checks everykagainst Courantnu_k <= kand against the discrete nodal domain theoremnu_k <= k + r_k - 1. - Prints per graph:
nu_k,r_kand the zero-cell count fork = 1..12, the maxima, the Courant and discrete-theorem fractions, the class and degeneracy counts, the five-bin histogram ofnu_k / k, the top eigenvector's sign pattern, and the first double eigenvalue where the two returned vectors, their sum and their difference disagree innu. - Controls: the
22 x 22and64 x 64grid graphs, once in numpy's basis and once in the separable cosine basis ordered by eigenvalue then by the mode pair(p, q), whose count is checked against(p + 1)(q + 1)derived from the one-dimensional sign changes. - On a degenerate eigenvalue the nodal count depends on the basis, so every
nu_kis a fact about the returned basis only; the theorem boundk + r_k - 1is the only basis-free statement, and the study claims nothing about the eigenspace. - Domain:
level 3, 4, zero tolerance1e-9, multiplicity tolerance1e-8;level 5has 32768 cells and is not attempted.
RUN
uv run python research/lab/py/carpet-nodal/nodal.py
Needs numpy and scipy. One pass, about 30 seconds, exits 0.
WITNESSES
- automata.md section 13, the nodal domain lines:
nu_kfork = 1..12atlevel 3andlevel 4, the Courant fraction 1 on all 512 and all 4096 returned eigenvectors, the degenerate index counts 262 of 512 and 2062 of 4096, the maximal multiplicities 4 and 20, and the double eigenvalue atk = 6, 7whose returned vectors have 4 domains while their sum and difference have 6. - The control lines: the separable count
(p + 1)(q + 1)on all 484 and 4096 grid eigenvectors, and the mean ofnu_k / koverk >= 2,0.605and0.536on the carpet against0.508and0.465on the separable grid. - The top eigenvector line: no edge joins two nonzero cells of one sign on any of the six graphs, and at
level 4twelve cells of that vector fall below the zero tolerance, so its printed count is 4084.