# Distributed Butterfly Analysis using Mobile Agents

arXiv: https://arxiv.org/abs/2506.17721 · HTML: https://mlsanity.com/paper/2506.17721/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Placed in General LLM agent frameworks and benchmarks, one of 16 directions in LLM agents and tool use.
- Builds on 0 of its 22 references that are in the map.
- First posted on arXiv 21 Jun 2025.

## Placed in

- LLM agents and tool use / [General LLM agent frameworks and benchmarks](https://mlsanity.com/agents/general-llm-agent-frameworks-and-benchmarks/)

## Abstract (arXiv)

Butterflies, or 4-cycles in bipartite graphs, are crucial for identifying cohesive structures and dense subgraphs. While agent-based data mining is gaining prominence, its application to bipartite networks remains relatively unexplored. We propose distributed, agent-based algorithms for Butterfly Counting in a bipartite graph G((A,B),E). Agents first determine their respective partitions and collaboratively construct a spanning tree, electing a leader within O(n log λ) rounds using only O(log λ) bits per agent. A novel meeting mechanism between adjacent agents improves efficiency and eliminates the need for prior knowledge of the graph, requiring only the highest agent ID λ among the n agents. Notably, our techniques naturally extend to general graphs, where leader election and spanning tree construction maintain the same round and memory complexities. Building on these foundations, agents count butterflies per node in O(Delta) rounds and compute the total butterfly count of G in O(Delta+min|A|,|B|) rounds.
