Questions: Vector Clocks and Capturing Causality

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

Process P1 has vector clock [3, 1, 2] at event A. Process P2 has vector clock [1, 3, 2] at event B. What is the causal relationship between A and B?

AA happened before B, because P1 has the highest single entry
BB happened before A, because P2's second entry is larger
CA and B are concurrent — neither caused the other
DThe relationship cannot be determined without knowing the full message history
Question 2 Multiple Choice

Process P receives a message carrying vector [4, 2, 1] and P's current vector is [1, 3, 0]. What is P's vector clock immediately after receiving the message (P is the first process in the vector)?

A[5, 5, 1] — add the two vectors element-wise, then increment
B[5, 3, 1] — take element-wise maximum, then increment P's own entry
C[4, 3, 1] — take element-wise maximum only, with no increment
D[4, 2, 1] — replace P's vector with the sender's
Question 3 True / False

If event A has a smaller Lamport timestamp than event B, then A happened before B in the distributed system.

TTrue
FFalse
Question 4 True / False

Two events with incomparable vector clocks are concurrent, meaning no causal chain — no sequence of events and messages — connects them.

TTrue
FFalse
Question 5 Short Answer

Why do vector clocks require one integer entry per process, rather than a single integer like Lamport clocks?

Think about your answer, then reveal below.