Documentation

CslibFrontier.Algorithms.PlantedClique.Selection

Uniform integer selection and degree cleanup #

largestIndices sorts runtime indices by decreasing absolute integer coordinate and keeps the requested number. It uses the same stable merge sort as List.selectLargest, with an exact agreement theorem for finite vectors. RecoveryInput.cleanup counts neighbors in that list and filters all declared vertices by the original degree threshold.

Both operations have unconditional native polynomial-time certificates on explicit encodings. Indices, list lengths and the target size are in unary; score magnitudes are binary integers. The semantic cleanup theorem assumes a duplicate-free selected list, which the selection procedure always supplies. The running-time theorem needs no such promise.

Select the first k indices in stable descending order of absolute integer coordinate.

Every selected index lies within the input vector.

Selection introduces no duplicate indices.

On a finite vector, native index selection is exactly the original selection after forgetting the bounded-index proofs, including the same choices among tied scores.

Sorting binary integer scores and taking a unary number of indices is uniformly polynomial-time. The comparator is charged for both coordinate lookups and both magnitudes.

Keep declared vertices having at least three quarters of the requested number of neighbors in the selected list. Duplicate entries, if supplied, are counted with multiplicity.

Every cleaned vertex is within the declared graph.

Degree cleanup returns each accepted vertex once.

Native list cleanup agrees with the graph operation when the input list represents the candidate set without duplicates.

Uniform native polynomial-time degree cleanup on arbitrary dense inputs and candidate lists.