ON THE MATHEMATICAL THEORY OF THE DYNAMICS OF SWARMS VIEWED AS COMPLEX SYSTEMS