In a finite graph, start with an active vertex set and thresholds . An inactive vertex becomes active once sufficiently many neighbours are active, and activated vertices remain active. Add eligible vertices until no more can be added. If is any threshold-closed set containing , induction shows every activated vertex lies in . The terminal active set is itself closed, so it is the least such closure and is independent of the eligible-vertex processing order.
For integer thresholds, compute active-neighbour counts and keep a work queue of vertices newly reaching their thresholds. Each vertex is queued once and each edge is inspected a constant number of times, giving running time. Strict-majority activation has , so an isolated inactive vertex never qualifies. A maximum priority queue of activation margins is an alternative implementation.
A maximum priority queue stores keyed entries and supports insertion, inspection and removal of an entry with greatest key, and key increases. A max-heap gives the following running times, with the size/capacity cost of the backing array accounted for separately:
Empty-queue inspections and removals need an explicit failure result. The index argument to increaseKey must identify the entry's current location: if callers use item handles, update their location records during swaps.