agentleFS
8b-is8b-is/smart-tree/skills/ramsey-karp-fpt/SKILL.md

ramsey-karp-fpt

Skill275 starsChanged 26 days agoMITView on GitHub

Ramsey-Theoretic 256-Bit SIMD Bitboard Bron-Kerbosch, Fox-Sudakov/Rödl Erdős-Hajnal Bi-Clique API Conformance Bug Hunter, and Karp's 21 NP-Complete Fixed-Parameter Tractable (FPT) Reduction Engine for Smart Tree across Gemini, ChatGPT, DeepSeek, and Claude on Antigravity (agy), OpenCode, Crush, and Claude Code.

The file

Files
SKILL.md

Ramsey, Erdős–Hajnal & Karp-21 FPT Engine (smart-tree v10.10.0+)

"Complete disorder is impossible." — Ramsey Theory (Paul Erdős, 1935–1989)

ramsey-karp-fpt (src/mem8/regularity/ramsey_erdos_hajnal.rs & salience_karp_manybody.rs) turns NP-complete graph problems into sub-millisecond static analysis over the 5-color AST symbol graph (Import, CallRef, TraitImpl, TypeBound, MutableShared) plus the 6th anti-color $c_\emptyset$.


1. 256-Bit Bitboard Bron–Kerbosch & Erdős–Hajnal Bi-Cliques

  1. Matula–Beck Degeneracy Ordering ($d \ll n$): Computes $(v_1, \dots, v_n)$ in $O(|V| + |E|)$ bucket-queue time so every forward monochromatic neighborhood $N_c^+(v_i)$ has size $\le d \le 255$.
  2. BitSet256([u64; 4]) Hardware Bitboard: Executes Tomita-pivoted Bron–Kerbosch set intersections ($P \cap N(u)$, $X \cap N(u)$) in four CPU AND + felix_popcnt_u64 / felix_tzcnt_u64 instructions with zero heap allocations inside the recursion.
  3. Erdős–Moser Tournament vs. Cyclic Deadlock Knot (CliqueTopology):
    • TransitiveTournament ($\vec{T}_k^{(c)}$): Clean acyclic compilation/call pipeline.
    • CyclicDeadlockKnot: Mutual lock/call cycle; emits feedback_back_edges (Minimum Feedback Arc Set) and RefactorPrescription::BreakDeadlockCycle or FlattenCircularImports.
  4. Fox–Sudakov / Rödl Pure & Almost-Pure Bi-Cliques (ErdosHajnalBiClique):
    • Pure Bi-Clique ($d_c(A, B) = 1.0$): $|A|$ structs all depend on the exact same $|B|$ targets $\rightarrow$ ExtractSharedTraitFacade.
    • Almost-Pure Bi-Clique ($1 - \delta \le d_c(A, B) < 1.0$): Pinpoints API Conformance Bugs via missing_anomaly_edges — the exact pair $(a^, b^)$ where struct $a^$ forgot to implement or call sibling method $b^$.

2. Taming Karp's 21 NP-Complete Problems in smart-tree

Karp NP-Complete Problemsmart-tree Reduction & AlgorithmComplexity
#3 Clique ($\omega(G)$)Degeneracy-ordered BitSet256 Tomita Bron–Kerbosch$O(d \cdotV\cdot 3^{d/3})$ FPT
#4 Independent Set ($\alpha(G)$)Caro–Wei greedy minimum-degree anti-color $c_\emptyset$$O(V\logV+E)$
#2 Vertex CoverGavril maximal-matching 2-Approximation (vertex_cover_2approx_size)$O(V+E)$
#7 Feedback Arc SetTournament degree-rank back-edge isolation (feedback_back_edges)$O(k^2)$ per clique
#11 Chromatic Number ($\chi$)Moser–Tardos Constructive LLL worktree solver (moser_tardos.rs)$O(\mathcal{U}/ \text{poly})$
#12 Clique CoverSzemerédi $\varepsilon$-regular partition (super_nodes_k)$O(K^2 \cdotE)$
#15 Steiner TreeMehlhorn Voronoi Dijkstra + Kruskal MST 2-Approximation$O(E+V\logV)$
#18 KnapsackErdős-distance radial shell packer (knapsack_budget_utilization)$O(K \log K)$

3. CLI Invocation

# Run Ramsey & Erdős–Hajnal 256-Bit Bitboard + Bi-Clique + Karp-21 Audit:
st --ramsey-cliques .

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.