learngraphtheory.org

Interactive Graph Theory Learning

Guest User

Using app without sign in

Algorithm Selection

K-Means Logistics Clustering

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.

Read the full article: Operations Research and Graph Theory

Related algorithms: Facility Location, Fleet Dispatching (mTSP)

Interactive Controls
Basic Actions
Double Click → Add Node
Drag → Move Nodes
Shift + Click → Connect Nodes
Right Click → Context Menu
Advanced
Ctrl + Click → Multi-Select
Delete Key → Remove Selected
Double Click Edge → Edit Weight
Ctrl + Drag → Pan View

Zoom Controls

100%
Nodes: 4
Edges: 4