  Based on the ideas of Optimal Control, we introduce the new basic
characteristic of a bracket generating distribution, the Jacobi symbol. In
contrast to the classical Tanaka symbol, the set of Jacobi symbols is discrete
and classifiable. We give an explicit and unified algebraic procedure for the
construction of the canonical frames (the structure of absolute parallelism)
for all distribution with given Jacobi symbol. We describe all Jacobi symbols
for which this procedure ends up in a finite number of steps (i.e. all Jacobi
symbols of finite type) and distinguish the symplectically flat distributions
with given Jacobi symbol, which in the case of finite type are the maximally
symmetric distribution among all distribution with given Jacobi symbol. Also,
for the most of Jacobi symbols we relate the prolongation procedure and the
resulting prolongation algebra, which is the algebra of infinitesimal
symmetries of the corresponding symplectically flat distribution, to the
standard (in the sense of Kobayashi and Sternberg) prolongation of certain
subspace in the algebra of infinitesimal symmetries of the flat
(unparametrized) curve of flags associated with the Jacobi symbol. Finally, we
give an upper bounds for the size of the resulting prolongation algebra in
terms of certain spaces of polynomials vanishing on certain projective
varieties. For some class of Jacobi symbols we are able to identify the
resulting prolongation algebra with such spaces of polynomials. In this way we
get the description of the prolongation algebra for all Jacobi symbols of
finite type appearing in rank 2 and rank 3 distributions and also for most of
such Jacobi symbols appearing in rank 4 distributions. In particular, in the
case of rank 3 distributions this description is given in terms of the
tangential developable and the secant varieties of a rational normal curve.
