Mobility Matters
Home›Mobile agents on graphs›Computing with agents›Triangle and butterfly counting by agents

Triangle and butterfly counting by agents

\(n\) agents in an anonymous graph must count small subgraphs (triangles; butterflies in bipartite graphs) at every node.

Problem statement and measuresexpand

\(n\) agents with distinct identifiers (IDs) are placed on the nodes of an anonymous port-labelled graph with \(n\) nodes, \(m\) edges and maximum degree \(\Delta\). The start is rooted (all agents on one node), dispersed (one agent on each node) or arbitrary. Agents compute only by moving and by talking with agents on the same node. The agents must compute, at every node, the number of triangles (or butterflies) it belongs to: every agent (or node) learns its part of the output. Time is in synchronous rounds; memory in bits per agent.

Measures: Time, rounds; Memory, bits per agent.

Butterfly counting in bipartite graphs

verified
Time: unknownMemory: unknown

In a bipartite graph, agents starting dispersed count butterflies (\(K_{2,2}\)) per node in \(O(n\log L + \Delta)\) rounds.

Assumed (added on the last edge are outlined)

+Graph dynamicsstatic graph+Edge directionundirected+Identifiersdistinct identifiers (eponymous): agents have pairwise distinct identifiers+Communicationlocal (co-located agents communicate)+Timingsynchronous rounds+Initial configurationdispersed or scattered (one agent per occupied node)+Topologybipartite

Not assumed

Knowledgeno knowledge of graph parameters
Formal definitions of this setting
Graph dynamics: static graph
\(G_t=G\) for all \(t\): the edge set never changes.
Edge direction: undirected
\(G=(V,E)\) with \(E\subseteq\binom V2\); every edge can be traversed in both directions.
Identifiers: distinct IDs (eponymous)
Distinct identifiers (eponymous agents): the label function \(\mathrm{id}:\{1,\dots,k\}\to\{1,\dots,L\}\) is injective; usually \(L=k^{O(1)}\), so a label takes \(O(\log k)\) bits.
Communication: local communication
Agents at the same node at the same time can read each other's entire memory (face-to-face communication). Agents crossing on an edge do not meet.
Timing: synchronous
Time proceeds in rounds \(t=1,2,\dots\); in every round every agent communicates, computes and moves (at most one edge) simultaneously.
Knowledge: no knowledge
Agents know no graph parameter (\(n\), \(m\), \(\Delta\), \(D\)).
Initial configuration: dispersed start
Every initially occupied node holds exactly one agent (\(\ell=k\)). Also called a scattered start, notably in black hole search.
Topology: bipartite
\(V = V_1 \cup V_2\) with \(V_1 \cap V_2 = \emptyset\) and every edge joining \(V_1\) to \(V_2\); trees are a special case.

What is known

Time · rounds
unknown
—
lower boundnone known
introductory—
current best
\(O(n\log L + \Delta)\)
knows \(L\), an upper bound on the identifiers
Memory · bits per agent
unknown
—
lower boundnone known
introductory—
current best
\(O(\Delta\log L)\)
knows \(L\), an upper bound on the identifiers

Results, in order of publication

Chand et al. 2025 current best
Time \(O(n\log L + \Delta)\)Memory \(O(\Delta\log L)\)
knows \(L\), an upper bound on the identifiers

Introductory and current best. Leader election, a spanning tree and the two sides of the bipartition take \(O(n\log L)\) rounds with \(O(\log L)\) bits (Theorem 3.5), on any graph; per-node butterfly counts then take \(O(\Delta)\) rounds and the total \(O(\Delta + \min\{|V_1|,|V_2|\})\) (Theorem 4.4), with \(O(\Delta\log L)\) bits (Lemma 4.3).

Open questions

None recorded for this variant.

Notes

\(V_1\) and \(V_2\) are the two sides of the bipartite graph. Checked against the full text (arXiv 2506.17721).

What carries over from neighbouring settings

Read off the order of assumptions, not checked case by case: results may carry extra assumptions (shown on their pages), and asynchronous time is measured in epochs.

Algorithms from weaker settings work here

Triangle counting
Time \(O(n\log^2 n + \Delta\log L)\)Memory \(O(\Delta\log L)\)

Lower bounds from stronger settings hold here

No catalogued stronger setting.

Know a better result for this setting, or found a mistake? Suggest a result · Report an error. Accepted contributions are acknowledged.