Abstract:From the train marshalling problem, mathematicians autline a mathematics model. cal1ed as "the digit-grouped partition of sequence",and give some results. In this paper. we get a recursion formula,by which the number of digit of a sequence is reduced step by step,and obtain a dynamic algorithm solving a number of the optimal digit-grouped partition of sequence.