According to the algorithm Research and implementation problems of Fano coding, this paper presents an algorithm with optimal deviation Combined with divide and conquer. In order to gain optimal deviation value, the algorithm must find the best open position in the probability series and achieve fano coding by the position.Given the recursive property in Fano coding algorithm, coding algorithm is designed for multi-module and single-module algorithm.By the time complexity analysis of the algorithm , the algorithm is improved.Examples simulation re-sults show,difference in time-consuming is ver...