From transferring time, a mathematical model for city traffic optimization was put forward. Dual algorithm of this optimization was founded according to dual principle of the mathematical model. On the basis of the dual algorithm, cellular automata was designed to optimize the city traffic. In the cellular automata, every single bus station was regarded as a cellular. According to obtaining the optimal bus line or not, cellular was divided into two states. The next bus station of central cellular was regarded as a neighbor of the central cellular. Evolution rule only acts on the cellular which...