  The relation between the girth and the guaranteed error correction capability
of $\gamma$-left regular LDPC codes when decoded using the bit flipping (serial
and parallel) algorithms is investigated. A lower bound on the size of variable
node sets which expand by a factor of at least $3 \gamma/4$ is found based on
the Moore bound. An upper bound on the guaranteed error correction capability
is established by studying the sizes of smallest possible trapping sets. The
results are extended to generalized LDPC codes. It is shown that generalized
LDPC codes can correct a linear fraction of errors under the parallel bit
flipping algorithm when the underlying Tanner graph is a good expander. It is
also shown that the bound cannot be improved when $\gamma$ is even by studying
a class of trapping sets. A lower bound on the size of variable node sets which
have the required expansion is established.
