---
title: Destination-Oriented Directed Acyclic Graphs
url: https://www.emergentmind.com/topics/destination-oriented-directed-acyclic-graphs-dodags
type: topic
---

# Destination-Oriented Directed Acyclic Graphs

A Destination-Oriented Directed Acyclic Graph (DODAG) is a foundational network structure in wireless and low-power networks for supporting loop-free, destination-rooted routing. DODAGs ensure every node has a directed path to a designated sink, forming the basis for large-scale routing in protocols such as RPL for Low power and Lossy Networks (LLNs) and addressing key problems in geographic forwarding. Formal properties, algorithms for their construction and maintenance—especially under dynamic conditions—and performance issues, such as subtree skewness and load-balancing, are central to both theoretical analysis and protocol design [1103.0133], [1903.01839].

## 1. Formal Definition and Structural Properties

In both RPL and geographic forwarding contexts, a DODAG is a directed, acyclic subgraph constructed to provide sink-oriented forwarding. Formally, let $\mathcal{N}$ be the set of nodes, $\mathcal{L} \subseteq \mathcal{N} \times \mathcal{N}$ the set of bidirectional links, and $\mathcal{S} \in \mathcal{N}$ the sink. The DODAG is $\mathcal{G}_\text{DODAG} = (\mathcal{N}, \mathcal{E})$, where:

- $\mathcal{E} \subseteq \mathcal{L}$, with no directed cycles
- Each non-sink node $n$ selects at least one parent $p$ such that $(n \to p) \in \mathcal{E}$
- Following parent pointers from any node reaches $\mathcal{S}$

Each node maintains a scalar "rank" $\mathcal{R}_n \ge 0$, monotonically increasing with hop-distance or link cost to the sink, enforcing loop-freedom and supporting parent selection [1903.01839]. The DODAG is distinguished by guaranteeing reachability from every node to the sink (root), a property not satisfied by generic DAGs, particularly when local minima ("stuck nodes") exist.

## 2. DODAG Construction Mechanisms in RPL

RPL constructs DODAGs through a distributed exchange of DODAG Information Object (DIO) messages:

- The sink initiates by broadcasting a DIO with the root's rank.
- Non-root nodes that receive DIOs compute candidate parents, calculate their own rank through the Objective Function, and announce their state in subsequent DIOs.
- Parent selection is finalized based on rank minimization, followed by propagation of downward routes via Destination Advertisement Objects (DAOs).

RPL leaves rank computation to the Objective Function. For example, ContikiRPL implements MRHOF (based on ETX), where $\mathcal{R}_n = \min_{p \in \mathcal{P}_n}(\mathcal{R}_p + ETX_{n,p})$ with ETX values filtered by EWMA. TinyRPL employs OF0 (hop-count), with a fixed per-hop increment. Hysteresis ensures stability by requiring a threshold of improvement before parent switching [1903.01839].

## 3. Link Reversal Algorithms and DODAG Repair

In dynamic or geographic forwarding settings, initially constructed DAGs may be destination-disoriented, with some nodes lacking outgoing links (local minima). Neighbor-oblivious link-reversal algorithms address these voids by updating node "states", guaranteeing that:

- No stuck nodes remain (all have outgoing links toward the sink)
- Acyclicity is preserved throughout

Each node $i$ maintains an integer $t_i$ (the "$t$-state") and a height $h_i(t_i)$, forming the state $a_i = (t_i, h_i(t_i), i)$ (full reversal) or $a_i = (t_i, h_i(t_i), (-1)^{t_i}i)$ (partial reversal). Link orientation is determined lexicographically: $i \to j$ iff $a_i > a_j$. Upon being stuck, a node increments $t_i$ to increase $h_i$ and flips incident links appropriately. Key properties are:

- $|t_i - t_j| \le 1$ for all neighbors
- No more than $N$ reversals per node (for $N$ nodes)
- $h_i(t_i)$ strictly increases with $t_i$

Neighbor-oblivious versions require only detection of the stuck condition, not neighbor states, and can be efficiently implemented using finite-state (one- or two-bit) representations [1103.0133].

## 4. Finite-State Link Reversal Variants

To optimize for memory, finite-state approaches reduce $t_i$ to a bounded number of bits:

- **Two-bit full reversal**: $\tau_i = t_i \bmod 4$, using cyclic comparison for link directions; stuck nodes increment $\tau_i$
- **One-bit full reversal**: $\delta_i \in \{0,1\}$; orientation determined by $\delta_i$ and initial heights; incoming links flip on bit transition
- **Two-bit partial reversal**: Similar mapping with alternating tie-breaks using $(-1)^{\tau_i}$

These finite-state mechanisms guarantee that all stuck nodes resolve their condition in $O(N^2)$ total steps, preserve loop-freedom, terminate in a DODAG, and require each node to store only constant state bits plus initial parameters [1103.0133].

## 5. Skewness and Balancing in DODAGs

Skewness in DODAGs refers to the concentration of subtree sizes among parent nodes, causing load imbalance, queueing delay, and reliability degradation. Empirical studies demonstrate that standard Objective Functions (OF0, MRHOF-ETX) induce severe skewness: e.g., in 100-node testbeds, level-1 skewness $\mathcal{M}_1$ is roughly 3.0 (OF0), 2.0 (MRHOF), versus 1.0 with balancing extensions [1903.01839].

Skewness metrics quantify sub-DAG imbalance at a parent node $p$ (with $d_p$ children, $ST_i$ descendants each):

\[
\begin{aligned}
\mathcal{M}_1 &= \frac{ST^{\max} - ST^{\min}}{ST^{\text{avr}}} \\
\mathcal{M}_2 &= \frac{\sum_{i=1}^{k} |ST_i - ST^{\text{avr}}|}{k ST^{\text{avr}}} \\
\mathcal{M}_3 &= \frac{ST^{\max}}{ST^{\min}} \\
\mathcal{M}_4 &= \frac{ST^{\max} - ST^{\min}}{ST^{\min}}
\end{aligned}
\]
where $ST^{\max} = \max_i ST_i$, $ST^{\min} = \min_i ST_i$, $ST^{\text{avr}} = \tfrac{1}{k}\sum_{i=1}^{k} ST_i$.

Imbalance is observed to persist regardless of network size or common routing metrics [1903.01839].

## 6. Balancing Techniques: The SB-RPL Extension

SB-RPL introduces balancing via subtree-size-aware parent selection:

- Each DIO message appends the sender's current subtree size $ST_p$.
- Candidate parents are ranked by "Node Influence": $NI_{n,p} = \alpha ST_p + \beta ETX_{n,p}$, with $\alpha, \beta > 0$ tunable.
- Nodes select parents minimizing $\mathcal{R}_n = \min_p (\mathcal{R}_p + NI_{n,p})$.
- Upon attachment or detachment, nodes update and propagate $ST_n$ in DIOs.

Compared to OF0 or MRHOF, SB-RPL reduces skewness by approximately $3\times$ at multiple levels and increases packet delivery ratio (PDR) substantially (e.g., 80% for SB-RPL vs. 62–66% for other Objective Functions at 60 pkts/s). Latency decreases due to better subtree balance. Protocol overhead consists only of one additional byte per DIO and an extra per-neighbor field [1903.01839].

## 7. Relation to Gafni–Bertsekas Loop-Free Routing

Neighbor-oblivious link reversal algorithms and finite-state variants are part of the Gafni–Bertsekas general link-reversal framework. Nodes make local, strictly increasing state transitions upon becoming stuck, ensuring termination and loop-freedom in any connected topology. These properties are inherited when specialized to DODAG construction and maintenance, providing rigorous guarantees of network-wide convergence without centralized control [1103.0133].

Source: https://www.emergentmind.com/topics/destination-oriented-directed-acyclic-graphs-dodags