Groups cities into perfectly separated geographic territories.
Time: O(I * K * V)
Space: O(K + V)
Use Case: Territory planning, dividing regions for distributors
Auto10
Algorithm Execution
Select an algorithm and generate steps to begin visualization
About K-Means Logistics Clustering
K-means clustering partitions points into k groups by assigning each point to its nearest cluster center and moving each center to the mean of its assigned points. Applied to logistics networks, it groups customers into service territories or candidate depot zones.
How it works
Lloyd's algorithm alternates two steps until stable: assign every point to the closest centroid, then recompute each centroid as the average of its points. Each iteration costs O(nk) distance computations and the objective, the sum of squared distances, never increases. Initialization matters: k-means++ spreads the starting centroids probabilistically and yields provably better expected results. The elbow method or silhouette scores guide the choice of k.
Applications
In supply chain design, k-means creates delivery zones and locates candidate warehouses at cluster centers before exact optimization. Beyond logistics it drives customer segmentation, image compression, anomaly detection baselines, and vector quantization in machine learning pipelines.