---
title: 'Joint Degree Matrix (JDM): Realizability & Sampling'
url: https://www.emergentmind.com/topics/joint-degree-matrix-jdm
type: topic
---

# Joint Degree Matrix (JDM): Realizability & Sampling

A joint degree matrix (JDM) is a refinement of the degree sequence of a simple graph: for each pair of degree classes, it specifies the exact number of edges joining them. In the standard undirected formulation, if \(V_i=\{v:\deg(v)=i\}\), then \(J_{ij}\) counts edges between \(V_i\) and \(V_j\). The same information is sometimes written as a joint degree vector (JDV), obtained by flattening the upper-triangular part of the symmetric matrix; in that sense JDV and JDM are identical in content up to vectorization and symmetry conventions [1511.01035]. As a graph invariant, the JDM encodes degree mixing much more finely than the degree sequence and underlies realization theory, reconfiguration by swaps, Markov-chain sampling, and statistical models based on bidegree counts [1103.4875].

## 1. Definition, notation, and relation to degree mixing

For an undirected graph \(G\), the JDM \(\mathcal J(G)\) is the matrix with entries \(\mathcal J(G)_{k,l}\) equal to the number of edges between nodes of degree \(k\) and degree \(l\). In the equivalent JDV notation, one writes
\[
j_{ik}(G)=\bigl|\{xy\in E(G):x\in V_i,\ y\in V_k\}\bigr|
\]
for \(1\le i\le k\le n-1\), and the matrix form is recovered by symmetry, \(J_{ij}=j_{ij}\) for \(i\le j\) and \(J_{ji}=j_{ij}\) for \(i<j\) [1511.01035]. The associated degree vector \(d(G)\) has coordinates \(d(G)_k\), the number of nodes of degree \(k\), and the total number of edges is
\[
m=\sum_{k=1}^{\infty}\sum_{l=k}^{\infty} J_{k,l}.
\]
The JDM determines the degree counts by
\[
d_k=\frac{1}{k}\left(J_{k,k}+\sum_{l=1}^{\infty}J_{k,l}\right),
\]
equivalently \(k\,d_k=2J_{k,k}+\sum_{l\neq k}J_{k,l}\) [1103.4875].

This count-based object is the exact realization counterpart of the joint degree distribution (JDD). Once \(n=\sum_k d_k\) and \(m\) are known, the degree distribution and joint degree distribution are
\[
P(k)=\frac{1}{n}d_k,\qquad P(k,l)=\frac{1}{m}J_{k,l}.
\]
In that probabilistic sense, the JDM is an integer-valued realization of the degree-pair mixing pattern on edges. A common compression of that information is assortativity: the JDD captures the full degree mixing structure, whereas assortativity is only a sufficient statistic derived from it [1103.4875].

The JDM does not encode isolated vertices. Several formulations state this explicitly: degree-\(0\) vertices do not appear in the matrix, and the degree sequence is determined uniquely only up to isolated nodes [1103.4875]. In the JDV formulation used for extremal support questions, graphs are taken without isolated vertices unless noted otherwise [1511.01035].

## 2. Realizability and constructive characterization

The basic realizability problem asks when a prescribed matrix of degree-class edge counts is graphical. In count form, a matrix \(J\) is realizable by a simple graph if and only if the induced class sizes
\[
d_k=\frac{1}{k}\left(J_{k,k}+\sum_l J_{k,l}\right)
\]
are integers for all \(k\), and the capacity constraints
\[
J_{k,l}\le d_kd_l\quad (k\neq l),\qquad J_{k,k}\le \binom{d_k}{2}
\]
hold for all classes [1103.4875]. An equivalent class-based formulation writes the instance as \(\langle \mathbb V,d,D\rangle\), where the partition classes \(V_i\) are prescribed, every vertex in \(V_i\) must have degree \(d(V_i)\), and \(d_{ij}\) is the required number of edges between \(V_i\) and \(V_j\). Then realizability is characterized by
\[
2d_{ii}+\sum_{j\neq i} d_{ij}=|V_i|\cdot d(V_i),
\]
together with
\[
d_{ij}\le |V_i||V_j|\quad (i\neq j),\qquad d_{ii}\le \frac{|V_i|(|V_i|-1)}{2}.
\]
These conditions are both necessary and sufficient [1509.07076].

Constructive algorithms accompany both characterizations. One line of work builds, for each pair of classes \((k,l)\), a nearly regular bipartite graph when \(k\neq l\) and a nearly regular internal graph when \(k=l\), maintaining balanced residual degrees inside every class; the stated runtime is \(O(m)\) [1103.4875]. Another line first places the required inter- and intra-class edge counts arbitrarily and then rebalances degrees within each class by moving neighbors from overfull to underfull vertices; a more technical Balanced Degree Algorithm maintains
\[
\max_{v\in V_i}\deg_{G_\ell}(v)-\min_{v\in V_i}\deg_{G_\ell}(v)\le 1
\]
throughout the construction [1509.07076].

Connected realizability is stricter than ordinary realizability. For JDM instances, the reduced instance
\[
|\widetilde V_i|=\max\{1,\ |V_i|-d_{ii}\}
\]
and the associated reduced capacities \(\widetilde D\) are used to characterize whether a connected realization exists. The criterion is expressed through the existence of a valid tree for the reduced instance, equivalently through the absence of a certificate \((\mathcal F,\mathcal A)\) violating a weighted connectivity inequality. A polynomial-time algorithm either constructs a connected realization or outputs such a certificate [1509.07076].

## 3. Reconfiguration by swaps and uniform sampling

Local moves preserving the JDM are restricted swap operations. If \(ac,bd\in E\), \(bc,ad\notin E\), and \(a,b\) lie in the same degree class \(V_i\), then the swap
\[
ac,bd\Rightarrow bc,ad
\]
preserves all JDM counts. This operation preserves the JDM because it replaces one edge from \(V_i\) to the degree class of \(c\) and one edge from \(V_i\) to the degree class of \(d\) by edges of the same class-pair types [1302.3548].

A central structural theorem is that the realization space of a fixed JDM on a fixed labeled vertex set is connected under restricted swap operations. The proof in "On Realizations of a Joint Degree Matrix" corrected an earlier erroneous argument by Stanton and Pinar; the error was that equal neighborhoods of a chosen vertex in two realizations do not imply that the truncated graphs obtained by deleting that vertex have the same JDM [1302.3548]. The corrected proof proceeds by transforming arbitrary realizations into balanced realizations, then matching degree spectra vertex by vertex, and finally resolving the remaining differences inside each degree-class pair.

This connectivity result motivates Markov-chain samplers over the space of simple realizations. One construction uses a JDM configuration model and endpoint switches within degree neighborhoods. The simple-graph chain is aperiodic, because with probability \(0.5\) it stays in place, and it is symmetric and irreducible, so it converges to the uniform distribution on simple graphs with the prescribed JDM [1103.4875]. A related legal-switch chain on \(\Omega=\langle\mathbb V,d,D\rangle\) chooses a legal switch uniformly and accepts it with probability
\[
\frac{\ell(G)}{\ell(G)+\ell(G')},
\]
which again yields an aperiodic irreducible chain with uniform stationary distribution [1509.07076].

The unresolved point is rapid mixing in full generality. Empirical evidence based on edge-indicator autocorrelation suggested quick mixing in practice and led to the heuristic recommendation of running the simple-graph chain for about \(5m\) steps [1103.4875]. That heuristic does not amount to a general theorem, and several works explicitly leave the mixing rate of the full JDM realization chain open [1302.3548].

## 4. Balanced realizations and regimes with provable rapid mixing

Balanced realizations form a particularly tractable subspace. For a fixed graphical JDM \(J\), if \(d_j(v)\) denotes the number of neighbors of \(v\) in class \(V_j\), and
\[
\Theta_{i,j}=\frac{J_{i,j}}{n_i}
\]
for \(n_i\neq 0\), then a realization is balanced if
\[
|d_j(v)-\Theta_{i,j}|<1
\]
for every class pair and every vertex in the source class. Equivalently, each partial degree is either the floor or the ceiling of the class average, so edges between two degree groups are distributed as uniformly as possible [1307.5295].

Every graphical JDM admits a balanced realization, and the restricted-swap Markov chain on the set of all balanced realizations has polynomially bounded relaxation time:
\[
\frac{1}{1-\lambda_2}=O(\operatorname{poly}(n)).
\]
The proof decomposes balanced realizations into labeled unions of almost regular and almost semi-regular bipartite factors, then applies a conductance-based factorization theorem together with fast mixing results for the factor chains [1307.5295]. This result is substantial but applies only to the balanced subset, not to all JDM realizations.

A later rapid-mixing theorem fully resolves the first nontrivial unrestricted case: JDMs with exactly two degree classes. In that setting, the restricted switch chain on \(\mathcal G(c,d)\) is rapidly mixing for all instances. The proof passes through an augmented state space \(\mathcal G'(\gamma,d)\), a hinge-flip chain, and strong stability with constant \(k=6\), and then transfers the flow bound to the natural switch chain by an embedding argument [1803.01338].

These results define the current proven landscape. Rapid mixing is established for balanced realizations of arbitrary graphical JDMs and for all two-class JDM instances, but not for the full realization space with three or more degree classes [1307.5295].

## 5. Extremal sparsity and statistical implications

The JDM has many formally possible cells but comparatively small achievable support. In JDV notation, the support is
\[
A(G)=\{(i,k): j_{ik}(G)\neq 0,\ 1\le i\le k\le n-1\},
\]
and the number of possible positions is
\[
\#\{(i,j):1\le i\le j\le n-1\}=\binom{n}{2}.
\]
The extremal problem is to maximize \(|A(G)|\) over all \(n\)-vertex graphs [1511.01035].

A lower bound comes from the half graph \(H_n\), with vertex set \(\{v_1,\dots,v_n\}\) and edge set
\[
E(H_n)=\{v_iv_j:i+j>n,\ i\neq j\}.
\]
Its degree sequence is
\[
n-1,n-2,\dots,\left\lfloor \frac n2\right\rfloor,\left\lfloor \frac n2\right\rfloor,\dots,2,1,
\]
and its support size is
\[
|A(H_n)|=
\begin{cases}
\dfrac{n^2}{4}, & n\text{ even},\\[4pt]
\dfrac{n^2-1}{4}, & n\text{ odd}.
\end{cases}
\]
Hence
\[
\max_G |A(G)| \ge \left(\frac12+o(1)\right)\binom{n}{2}.
\]
Two upper-bound methods show that asymptotically only a little over half of all possible cells can be nonzero. One yields
\[
\limsup_{n\to\infty}\frac{|A(G)|}{\binom{n}{2}}\le 0.55225694\ldots,
\]
and a combinatorial argument yields
\[
\frac{|A(G)|}{\binom{n}{2}}\le (1+o(1))\frac{13}{24}=(1+o(1))0.541\overline{6}.
\]
Accordingly,
\[
\left(\frac12+o(1)\right)\binom{n}{2}\le \max_G |A(G)|\le \left(\frac{13}{24}+o(1)\right)\binom{n}{2},
\]
so only about half of the JDM cells can be nonzero in any graph [1511.01035].

This extremal sparsity has a direct modeling consequence. In the \(2\)K or bidegree-distribution exponential random graph model, the sufficient statistics are the JDM entries. If an observed graph has \(j_{ik}=0\), then the corresponding parameter is not estimable from that observation. Since even the most favorable graph can make only about half of the cells nonzero, a single network observation can support estimation of at most about half of the JDM-based parameters [1511.01035].

## 6. Generalizations, related models, and directed variants

The JDM is a special case of broader partition-based edge-count models. In the Partition Adjacency Matrix (PAM) model, the vertex set is partitioned into arbitrary classes \(\Pi=(P_1,\dots,P_k)\), the degree sequence is given explicitly, and a matrix \(M\) prescribes the exact number of edges between and within the partition classes. Choosing the partition classes to be degree classes makes JDM an instance of PAM [1508.00542]. Skeleton graphs re-encode the same information as PAM: the partition classes become vertices of an auxiliary graph, allowed class pairs become bones, and bone weights prescribe edge counts. This formulation is especially useful when the number of partition classes is small or the interaction pattern has special topology, such as two classes or a skeleton graph with at most one cycle [1508.00542].

| Formulation | Constraint object | Representative result |
|---|---|---|
| JDM | Edges between degree classes | Realizability, connectivity by restricted swaps, and exact-constrained sampling [1103.4875] |
| PAM / skeleton graph | Edges between arbitrary partition classes | JDM is a special case; polynomial results for two classes and at-most-one-cycle skeleton graphs [1508.00542] |
| Directed JDM + DCM | Source out-degree to target in-degree counts | Rescaled construction with exact realization of adjusted targets and bounded deviation of distributions [2507.23025] |

In the skeleton-graph setting, the exact two-class problem is already subtler than ordinary JDM reconfiguration. The number of crossing edges between the two classes has a parity restriction under swaps, realizability with exactly \(k\) crossing edges is decidable in polynomial time, and the realization space need not be connected under preserving swaps alone; connectivity is recovered by allowing preserving swaps together with double swaps [1508.00542]. This underscores that JDM-type constraints become structurally harder when degree classes are replaced by arbitrary partitions.

A directed specialization of the JDM was introduced for linearly rescaled sampling of large directed networks. There the matrix is
\[
A=\{a_{ij}\mid a_{ij}=|\{(v_1,v_2)\in E: d_{v_1}^{out}=i,\ d_{v_2}^{in}=j\}|\},
\]
so rows index source out-degree classes and columns index destination in-degree classes. It is paired with a degree correlation matrix
\[
B=\{b_{ij}\mid b_{ij}=|\{v\in V:d_v^{out}=i,\ d_v^{in}=j\}|\}.
\]
After scaling by a factor \(1/k\), flooring \(A\), ceiling \(B\), and adding an adjustment matrix \(D\), the final targets
\[
A^\odot=A'+D,\qquad B^\odot=B'
\]
are realized exactly by a directed construction, while the original joint degree and degree-correlation distributions are preserved only approximately, with explicit sparsity-refined bounds [2507.23025]. In that directed setting, empirical data on eight networks showed \(\%JDM\) below \(30\%\) in all cases and around \(1\%\) for node size larger than \(10^6\), reinforcing the broader theme that degree-pair matrices are typically sparse objects [2507.23025].

Across these formulations, the JDM serves as a canonical exact summary of degree mixing. It determines the degree sequence up to isolated vertices, supports clean realizability criteria, admits local reconfiguration moves, and yields both constructive and sampling-based graph models. At the same time, its realization spaces reveal sharp limits: full rapid-mixing theorems remain restricted, connected realizability is substantially subtler than ordinary realizability, and even extremal JDMs can occupy only about half of their potential cells.

Source: https://www.emergentmind.com/topics/joint-degree-matrix-jdm