Abstract:Based upon the conception of the least loop,the most loop and direction factor presented by the author firstly,the algorithm of searching out the least and most loops has been designed.By building the adjoining matrix, confirming the start-point of searching,vectorizing the searching sides,calculating the direction factor of adjoining sides,we can search out the next side of the least loop or the most loop rapidly.With a valid searching side being confirmed at every searching and the searching scope being reduced by forming degenerate graph,the time compexity of the algorithm is much less. In the research of the automatic calculating system of construction quantities, the problem of houses partition and out-wall partition had been solved succesfully by utilizing this searching algorithm.