Toward the mathematics of a general theory of behavior, III the flanking heredity theorem