  In this paper, the stability condition for low-density parity-check (LDPC)
codes on the binary erasure channel (BEC) is extended to generalized LDPC
(GLDPC) codes and doublygeneralized LDPC (D-GLDPC) codes. It is proved that, in
both cases, the stability condition only involves the component codes with
minimum distance 2. The stability condition for GLDPC codes is always expressed
as an upper bound to the decoding threshold. This is not possible for D-GLDPC
codes, unless all the generalized variable nodes have minimum distance at least
3. Furthermore, a condition called derivative matching is defined in the paper.
This condition is sufficient for a GLDPC or DGLDPC code to achieve the
stability condition with equality. If this condition is satisfied, the
threshold of D-GLDPC codes (whose generalized variable nodes have all minimum
distance at least 3) and GLDPC codes can be expressed in closed form.
