AlgoPlus//networking / vector-clocks
Read the theory

Lamport & Vector Clocks

Order events across processes without a shared clock — and detect concurrency.

Step
Legend
Local event
Send
Receive
AI Tutor Workspace
In a nutshell
Without a shared clock, processes order events with counters. Each holds a vector counting the events it knows of from every process. A local event bumps its own entry; a receive takes the element-wise max with the message's vector. Comparing vectors reveals causality — who came before whom, and which events are concurrent.
Ready
Press play to begin the cinematic walkthrough.
Give everyone a tally of what they've seen from everyone. If your tally dominates mine, you came after me; if neither dominates, we happened at the 'same time' — concurrent.
Key terms
Go deeper in the lesson
Read the full theory, intuition & complexity for Lamport & Vector Clocks.