  An algorithm for constructing a shortest binary k-stage machine generating a
given binary sequence is presented. This algorithm can be considered as an
extension of Berlekamp-Massey algorithm to the non-linear case.
