jeffgerickson / algorithms

Bug-tracking for Jeff's algorithms book, notes, etc.
7.92k stars 1.02k forks source link

[Oops.] Inconsistent definition on page 329 #269

Open satyam-bhardwaj opened 1 year ago

satyam-bhardwaj commented 1 year ago

Please verify that the error is present in the most recent revision before reporting.

Chapter number or note title: 10. Maximum Flows and Minimum Cuts

Page number: 329

Error description: On page 329, $\partial f(v)$ denotes the total net flow out of any vertex $v$. However, the definition is $\partial f(v) = \Sigma_u f(u \rightarrow v) - \Sigma_w f(v \rightarrow w)$ which suggests the opposite, the total net flow into any vertex. It is also mentioned on page 329 that $|f| = \partial f(s)$. However, as per the definition of $|f|$ on page 328, it should be $|f| = -\partial f(s)$.

Suggested fix (if any): $\partial f(v)$ should be defined as $\partial f(v) = \Sigma_w f(v \rightarrow w) - \Sigma_u f(u \rightarrow v) $

BaiWenchao commented 1 year ago

I agree with your suggestion.

Actually, according to CLRS (2nd edition), in chapter 26, page 645, the definition of the total net flow at a vertex is the total positive flow leaving a vertex minus the total positive flow entering a vertex, which is consistent with your rectified formular.