  A Directed Acyclic Graph (DAG) can be partitioned or mapped into clusters to
support and make inference more computationally efficient in Bayesian Network
(BN), Markov process and other models. However, optimal partitioning with an
arbitrary cost function is challenging, especially in statistical inference as
the local cluster cost is dependent on both nodes within a cluster, and the
mapping of clusters connected via parent and/or child nodes, which we call
dependent clusters. We propose a novel algorithm called DCMAP for optimal
cluster mapping with dependent clusters. Given an arbitrarily defined, positive
cost function based on the DAG, we show that DCMAP converges to find all
optimal clusters, and returns near-optimal solutions along the way.
Empirically, we find that the algorithm is time-efficient for a Dynamic BN
(DBN) model of a seagrass complex system using a computation cost function. For
a 25 and 50-node DBN, the search space size was $9.91\times 10^9$ and
$1.51\times10^{21}$ possible cluster mappings, and the first optimal solution
was found at iteration 934 $(\text{95\% CI } 926,971)$, and 2256 $(2150,2271)$
with a cost that was 4\% and 0.2\% of the naive heuristic cost, respectively.
