Skip to content

Commit 52513ff

Browse files
committed
petersen boundary rank distribution code documented
1 parent 1878c48 commit 52513ff

File tree

3 files changed

+97
-3
lines changed

3 files changed

+97
-3
lines changed

docs/horn_map_reduce.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- Script: `experiments/horn_map_reduce.py`
55

66
## Purpose
7-
This script computes and validates the set of "missing" multi-indices for a chosen horn face in a simplicial-style indexing setup.
7+
This script computes and validates the set of "missing" multi-indices for a chosen horn face in the tensor horn-indexing model used by this script.
88

99
It focuses on indices that contain every horn face index except the omitted one (`horn_j`), using Dask for filtered map/reduce-style processing.
1010

@@ -64,3 +64,4 @@ From repository root:
6464
```bash
6565
.venv/Scripts/python.exe experiments/horn_map_reduce.py
6666
```
67+

docs/petersen_brd_right_cosets.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# `petersen_brd_right_cosets.py` documentation
2+
3+
## Location
4+
- Script: `experiments/petersen_brd_right_cosets.py`
5+
6+
## Purpose
7+
This script computes the exact mod-2 boundary-rank distribution (BRD) for the Petersen graph under the vertical simplicial boundary used in the rank-shifted bisimplicial DSTM / total-decalage model.
8+
9+
For each relabeling of vertices, it computes the rank over `F_2` of the vertical boundary matrix and tabulates how often each rank occurs.
10+
11+
## Mathematical Model
12+
- Graph: Petersen graph with `N = 10` vertices and `15` edges.
13+
- Vertex model: vertices are the 2-subsets of `{0,1,2,3,4}` (Kneser labeling).
14+
- Edge rule: two vertices are adjacent iff the two 2-subsets are disjoint.
15+
16+
Adjacency matrices are encoded as integer row bitmasks.
17+
18+
### Vertical Faces and Boundary
19+
For an `N x N` adjacency matrix `T`, the vertical face `d_k^v(T)` is principal deletion of row/column `k` with reindexing.
20+
21+
The mod-2 vertical boundary is:
22+
23+
`partial_v(T) = sum_{k=0}^{N-1} d_k^v(T)` over `F_2`.
24+
25+
In code, this is implemented as XOR of all principal deletions.
26+
27+
### Boundary Rank
28+
The script computes `rank_{F_2}(partial_v(T))` using bit-level Gaussian elimination on row bitmasks.
29+
30+
## Group-Theoretic Reduction
31+
Let `A` be the Petersen adjacency matrix and let relabelings act by:
32+
33+
`A^p = P_p A P_p^T`, with convention `p[i] = new label of old vertex i`.
34+
35+
The script builds `Aut(P)` from the induced `S_5` action on 2-subsets and obtains `|Aut(P)| = 120`.
36+
37+
Because `A^{p sigma} = A^p` for `sigma in Aut(P)`, the boundary-rank value is constant on right cosets of `S_10 / Aut(P)`.
38+
39+
So it is exact to enumerate a right transversal only:
40+
- `|S_10 / Aut(P)| = 10! / 120 = 30240` representatives.
41+
42+
SymPy is used for:
43+
- permutation groups,
44+
- right coset transversal generation,
45+
- induced permutation handling.
46+
47+
## Algorithm
48+
1. Build Petersen adjacency row bitmasks from the Kneser model.
49+
2. Build `Aut(P)` as induced permutations of 2-subsets.
50+
3. Enumerate a right transversal of `S_10 / Aut(P)`.
51+
4. For each representative:
52+
- relabel adjacency matrix,
53+
- compute `partial_v`,
54+
- compute `rank_{F_2}`.
55+
5. Accumulate:
56+
- unweighted counts over coset representatives,
57+
- weighted counts over all `10!` labelings by multiplying each bucket by `|Aut(P)|`.
58+
59+
## Built-In Checks
60+
Before BRD computation, `verify_basic_facts()` asserts:
61+
- `|Aut(P)| = 120`,
62+
- transversal size equals `10! / 120`.
63+
64+
## Output
65+
The script prints:
66+
- graph size data,
67+
- automorphism-group size,
68+
- right-coset count,
69+
- BRD over right-coset representatives,
70+
- BRD over all `10!` labelings,
71+
- total-labelings consistency check.
72+
73+
Current output:
74+
- Unweighted (right-coset transversal):
75+
- rank `4`: `376`
76+
- rank `6`: `8496`
77+
- rank `8`: `21368`
78+
- Weighted (all labelings):
79+
- rank `4`: `45120`
80+
- rank `6`: `1019520`
81+
- rank `8`: `2564160`
82+
- Total check: `3628800` (equals `10!`).
83+
84+
## Logging
85+
This script does not configure file logging.
86+
All reporting is printed to standard output.
87+
88+
## Run
89+
From repository root:
90+
91+
```bash
92+
.venv/Scripts/python.exe experiments/petersen_brd_right_cosets.py
93+
```

experiments/petersen_brd_right_cosets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ def main() -> None:
354354

355355
counts_cosets, counts_all = brd_histogram_over_right_cosets()
356356

357-
print("Petersen graph BRD using the mod-2 vertical boundary ∂_v")
357+
print("Petersen graph BRD using the mod-2 vertical boundary partial_v")
358358
print("-------------------------------------------------------")
359359
print(f"Number of vertices : {N}")
360360
print(f"Number of edges : {len(EDGES)}")
@@ -373,4 +373,4 @@ def main() -> None:
373373

374374

375375
if __name__ == "__main__":
376-
main()
376+
main()

0 commit comments

Comments
 (0)