In this paper, routing and wavelength assignment (RWA) algorithms whose optimum object is the minimum number of wavelength required in wavelength division multiplexing all optical network were studied. Since the number of wavelength required (NWR) obtained by the existing two RWA algorithms is associated with the numbering order of the nodes in the network, a statistics method was proposed to modify the RWA algorithms. With this statistics method, a smaller NWR can be acquired. And, it is the first time that the statistics method was proposed to compare the performance of different RWA algorithms. Two RWA algorithms can be compared by contrasting the distribution of the NWRs obtained by each RWA algorithms.