Global Optimal Path-Based Clustering Algorithm