Advanced maths

Directed graph kernel calculator with all independent absorbing sets

Enumerate independent vertex sets that absorb every outside vertex along an outgoing arc.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Enumerate independent vertex sets that absorb every outside vertex along an outgoing arc.

THE FORMULAK is a kernel iff no arc has both endpoints in K and ∀v∉K ∃k∈K with v→k.

A worked example

The directed cycle 1→2→3→4→1 has exactly two kernels, {1,3} and {2,4}. A directed three-cycle has none.

Good to know

Loopless directed graphs with 1–20 vertices and at most 100 arcs; antiparallel arcs allowed. Exhaustive subset bitsets, exact total kernel count, size distribution and one witness; full list only up to 500 displayed sets with explicit list truncation. Odd directed cycles can have no kernel. No kernel-perfectness claim over all induced subgraphs.

Make the arc direction explicit

Supply a square binary matrix with zero diagonal. Entry one in row i and column j means an arc from i to j. The direction is essential because absorption looks for an outgoing arc from each outside vertex into the proposed kernel; reversing every arc can change which sets qualify.

The accepted model allows antiparallel arcs, so both i→j and j→i may be present. It excludes loops and weights. Up to twenty vertices and one hundred arcs are supported. Labels in the returned sets identify the original rows; no inferred geometric arrangement, reachability closure or transitive completion is added to your graph.

Directed graph kernel with all independent absorbing sets exampleKernel {1,3} absorbs outside vertices 2 and 412341 → 2 → 3 → 4 → 1Absorbing arcs: 2 → 3 and 4 → 1
Scroll across to see the full diagram.
The directed cycle 1→2→3→4→1 has exactly two kernels, {1,3} and {2,4}. A directed three-cycle has none.

Compare this with the Minimum dominating set calculator from graph edges. Enumerate kernels of a directed graph: no arc joins selected vertices, and every unselected vertex has an outgoing arc into the selected set. Existing domination takes undirected edges and minimizes closed-neighborhood coverage without the kernel independence condition.

Combine independence with absorption

Independence means that no directed arc joins two vertices of the selected set in either direction. Absorption means each excluded vertex has a direct arc into at least one selected vertex. Paths of length two do not count, and a selected vertex does not need to point toward any other selected vertex.

A kernel therefore balances two conditions that can conflict. A large independent set can fail to absorb a particular outside vertex, while a strongly absorbing set may contain a forbidden internal arc. The calculation tests both conditions on each candidate subset, producing a complete count rather than assuming a maximal independent set must work.

Exhaust subsets without losing counts

Represent vertex sets by bit masks and enumerate all subsets. For a candidate mask, inspect arcs within the set, then test that each outside row has a neighbor bit inside it. This is an exhaustive finite test with at most 2^20 masks; it makes no heuristic choices about which vertices ought to enter first.

Record the number of accepted masks at each size and the total count. Displaying only the first five hundred sets is a presentation limit, not a sampling procedure. The size distribution and total remain exact when the list is truncated, so distinguish the number displayed from the number proved to exist.

Check even and odd directed cycles

For the default four-cycle, {1,3} is independent, and outside vertices 2 and 4 point to 3 and 1 respectively. Switching the chosen parity gives {2,4}, which also works. A singleton cannot absorb the vertex two steps away, and larger sets contain an arc, leaving exactly two kernels.

On a directed three-cycle, every independent nonempty set is a singleton. Its predecessor points into it, but its successor does not. Thus no singleton absorbs all outside vertices. The empty set also fails absorption, and every larger set violates independence. A zero answer here describes a genuine mathematical possibility, not necessarily invalid input.

Read the selected-set illustration

The illustrated four-cycle marks alternating vertices as the kernel and highlights the incoming arcs from the unselected vertices. Arrows enter the selected set, matching the absorption convention. Reading the arrows backward would instead check a different notion, often called a dominating independent set under the opposite direction convention.

For a returned witness, inspect each outside vertex individually and identify its absorbing neighbor. Then inspect pairs inside the set for arcs in both orientations. These two short checks are enough to verify one witness, even though confirming the total count still requires the exhaustive enumeration over all subsets.

Handle sinks and empty cases

A sink has no outgoing arcs, so it must belong to every kernel: if excluded, it could not point into the chosen set. Two sinks joined by an arc cannot occur because the tail would not be a sink. In an edgeless graph, all vertices are sinks and the whole vertex set is the unique kernel.

A nonempty graph never has the empty set as a kernel under this convention. Disconnected components can be studied separately: a global kernel is a union of one kernel from each component with no cross arcs. If any such component has no kernel, the entire graph has none, providing a useful independent check.

Keep the conclusion graph-specific

Finding a kernel in the supplied graph does not show that every induced subgraph also has one. That stronger kernel-perfectness property quantifies over many different graphs obtained by deleting vertices. This page enumerates kernels only in the exact directed graph you entered and makes no claim about all its induced subgraphs.

Likewise, a kernel count does not solve a shortest-path, feedback-vertex or reachability problem. Use the witness list when independent absorbing selections are the intended objects. Preserve the adjacency orientation with any exported result, since the same unlabeled drawing with reversed arrows may support a different family of selected sets.

A few questions, answered

Which direction gives absorption?

Every vertex outside K must have an arc pointing into K.

Can a graph have no kernel?

Yes. A directed odd cycle is a basic example.

Why must a sink be selected?

A sink outside the set cannot have an outgoing arc into it.

Are counts truncated at five hundred?

No. Only the displayed witness list is truncated; the total and size distribution are exact.

Find your calculator

Start typing to explore the library.