Elamur GroupantsโŒ•
โ˜ฐ

algorithm-k-core

The groupant beside algorithms/src/k_core/mod.rs in the Mova repository: what the code computes, what it never does, how to go back from its outputs, its invariants, cost and checks.

Facts

Implementation material. A Mova code model describes this code at one source revision: partial models, finite checks and their stated scope. It is not a reviewed general exposition, and its labels are shown as written, never raised.

Components

componentlabelwhere
approximantbounded checkedForward
astpartialsyntax.json
costsymbolic unmeasuredCost
descriptantpresentdescriptant
invariantsource derivedInvariant
testsbounded executedevidence

Obernants

The typed relations around the forward model: the behaviour complement (what the code never does), the reverse reconstruction (every input compatible with an output) and specialised views.

idtypelabelwhere
nonbehaviorbehavior_complementpartial source derivednonbehavior
compatible_inputsreverse_reconstructionpartial source derivedcompatible_inputs
subset_certificatemaximality_certificatepartial source derivedsubset_certificate
nested_coresparameter_monotonicitypartial source derivednested_cores
idempotencefixed_pointpartial source derivedidempotence
edge_extensionmonotone_extensionpartial source derivededge_extension

Model text

Migration: consolidated into model.md, 2026-11-04, operator decision; fresh hash-bound references to the former files were rebound to the sections below.

descriptant

k_core mod

Original std-only Rust. Prospective model is retained beside implementation. Source citations identify algorithm provenance; no copied implementation. Exact bounded graph semantics are useful independently of any unmeasured optimization. Finite oracle checks and mutant discrimination improve confidence; groupant count alone proves no improvement.

model

k_core mod model

Forward

Simple undirected graph n<=256,m<=65536. Repeatedly delete vertices with live degree below k; return ascending survivors, unique maximal induced minimum-degree-k subgraph. FIFO deletion, each edge visited O(1) after O(V^2+E) validation. O(V^2+E) time/storage. k=0 retains all. Seidman (1983).

Invariant

Deleted vertices cannot belong to any minimum-degree-k induced subgraph. For live vertices degree equals count of live neighbors; survivor set is maximal.

Cost

Simple undirected graph n<=256,m<=65536. Repeatedly delete vertices with live degree below k; return ascending survivors, unique maximal induced minimum-degree-k subgraph. FIFO deletion, each edge visited O(1) after O(V^2+E) validation. O(V^2+E) time/storage. k=0 retains all. Seidman (1983).

nonbehavior

Type: behavior_complement. Let R be the deterministic relation specified by Forward including validation precedence and tie rules, X the declared input type and Y its Result type. Behavior complement is (X times Y) minus R. Specifically outputs violating Deleted vertices cannot belong to any minimum-degree-k induced subgraph. For live vertices degree equals count of live neighbors; survivor set is maximal. are excluded; a valid-input Err or a wrong successful witness is excluded. Resource, cycle and structural rejections are determined before algorithmic output.

compatible_inputs

Type: reverse_reconstruction. Given survivor set S, compatible graphs make G[S] minimum degree at least k and every vertex outside S eventually peelable. For k=1, a three-vertex path and a triangle differ but both can yield all vertices when no isolated vertices. Errors identify violated validation predicates.

subset_certificate

Type: maximality_certificate. Output equals union of all vertex subsets whose induced minimum degree is at least k. Union preserves the minimum-degree predicate and gives unique maximality.

nested_cores

Type: parameter_monotonicity. For k<=l, core_l(G) is a subset of core_k(G). core_0(G) is every vertex; k>=n gives empty on simple n-vertex graphs.

idempotence

Type: fixed_point. Restrict G to returned vertices, retaining their labels. Applying k-peeling again deletes none.

edge_extension

Type: monotone_extension. Adding an absent undirected edge cannot remove vertices from a k-core; the prior induced feasible set still witnesses membership.

Limits

Partial syntax omits macro expansion and type resolution. No executable approximate profile: categorical graph semantics and feasibility have no justified percentage relaxation here. Integer operations are bounded by caps; flow uses checked i128/u64 arithmetic, with Overflow defensive under current caps. No callbacks. Allocator failure is outside typed status.

evidence

Evidence โ€” 2026-10-30

Eleven tests across five algorithms, including independent exhaustive small-domain characterization. This file belongs to k_core. Two debug and two optimized runs matched normalized statuses. Strict clippy-driver --test -D warnings passed. A compiled production mutant failed a named assertion; exact bytes restored and positive rerun passed. Raw receipts: $MOVA_DATA/runs/octopus-wave25-graphs-2026-10-30/k_core-*.txt. No timing or whole-system improvement claim. Source SHA-256: 37a416e1386fa1f72fcf9fa8771e88af0a2a98d0bf51b94df3605c8462065707.

prospective

Prospective model โ€” 2026-10-30

Simple undirected graph n<=256,m<=65536. Repeatedly delete vertices with live degree below k; return ascending survivors, unique maximal induced minimum-degree-k subgraph. FIFO deletion, each edge visited O(1) after O(V^2+E) validation. O(V^2+E) time/storage. k=0 retains all. Seidman (1983). Allocation failure is outside typed errors. Resource caps precede vertex/edge validation. No callbacks. Exact categorical output has no justified percentage surrogate; executable approximation profiles unsupported.

This page in Markdown โ†’ https://md.groupants.elamur.ai/free/en/mova/algorithms/src/k_core/mod.rs.groupant/