We consider the problem of two chemical species, A and B, undergoing an annihilation process A+B ! B, on generic discrete inhomogeneous structures, such as disordered solids, glasses, fractals, polymer networks and gels. Two particular cases are analysed: in the …st one A is immobile and B is di¤using (target decay process), in the second one A is di¤using and B is immobile (trapping process). The survival probability of A is analytically calculated in the limit of large times, showing that, while for the target decay it is related to the spectral dimension e d of the structure, for the trapping problem it depends, in general, on a di¤erent anomalous dimension, we call the exploration dimension.