Neighborhood Diversity Calculator

vertex type count

CalculatorsFreeNo Signup
4.5(690 reviews)
All Tools

Loading tool...

About Neighborhood Diversity Calculator

A neighborhood diversity calculator computing nd(G): partition V into classes where vertices in same class have identical closed neighborhoods (same neighbors + same adjacency to each other). nd ≤ 2^tw. Many problems FPT by nd. Lampis 2012. Client-side.

Neighborhood Diversity Calculator Features

  • nd(G)
  • Type classes
  • Twin groups
  • FPT problems
  • Common graphs
Neighborhood diversity nd(G): number of equivalence classes under 'same type' (u≡v iff N[u]\{v}=N[v]\{u}). Each class is a clique or independent set. Lampis (2012): many problems FPT by nd. nd ≤ 2^tw. Computable in O(n+m).

How to Use

Select graph:

  • nd: # types
  • Classes: Twin groups
  • FPT: Parameterized nd

Vertex Types

Two vertices have same type if they have identical neighborhoods (up to each other). Each type class is either a clique (all connected) or independent set (none connected). Graph compresses to nd-vertex 'type graph'.

FPT Results

Lampis 2012: independent set, domination, coloring, Hamiltonian — all FPT by nd. Uses ILP with nd variables. Very efficient for graphs with few vertex types (highly symmetric or regular structures).

Step-by-Step Instructions

  1. 1Select graph.
  2. 2Compute nd.
  3. 3Group by type.
  4. 4Identify cliques/ISets.
  5. 5Apply FPT.

Neighborhood Diversity Calculator — Frequently Asked Questions

What are 'twin' vertices?+

True twins: same closed neighborhood (adjacent + same neighbors). False twins: same open neighborhood (same neighbors, not adjacent to each other). Both form type classes in neighborhood diversity.

How is nd computed?+

Partition by sorting adjacency rows. O(n+m) via partition refinement. Very fast! The result is a partition into at most n classes, but usually much fewer for structured graphs.

When is nd small?+

Highly regular graphs (few distinct neighborhoods). Complete multipartite: nd = # parts. Graphs with many twins. Social networks with clear role structures. nd = 1 iff G is complete or edgeless.

Share this tool: