  We introduce generalized dynamical pruning on rooted binary trees with edge
lengths. The pruning removes parts of a tree $T$, starting from the leaves,
according to a pruning function defined on subtrees within $T$. The generalized
pruning encompasses a number of discrete and continuous pruning operations,
including the tree erasure and Horton pruning. The main result is invariance of
a finite critical binary Galton-Watson tree with exponential edge lengths with
respect to the generalized dynamical pruning for an arbitrary admissible
pruning function. The second part of the paper examines the continuum 1-D
ballistic annihilation model $A+A \rightarrow \emptyset$ for a constant
particle density and initial velocity that alternates between the values of
$\pm$1. The model evolution is equivalent to a generalized dynamical pruning of
the shock tree that represents dynamics of sinks (points of particle
annihilation), with the pruning function equal to the total tree length. The
shock tree is isometric to the level set tree of the model potential (integral
of velocity). This equivalence allows us to construct a complete probabilistic
description of the annihilation dynamics for the initial velocity that
alternates between the values of $\pm$1 at the epochs of a stationary Poisson
process. Finally, we discuss several real tree representations of the ballistic
annihilation model, closely connected to the shock wave tree.
