mathematics model is set and solved by linprog function in optimistic toolbox of MATLAB 6.5.The solution only containing zeros and ones is acquired using branch and bound algorithm.The experimental results indicate that this algorithm is suitable for small TSP(traveling salesman problem).