0
$\begingroup$

I have a confusion related the Lemma 22.1 in Cormen Leiserson Rivest Stein's Introduction to Algorithm book,

Here it is written that delta(s,v) <= delta(s,u) +1 ,where s,u,v are the vertices of a graph G My question is why <= is used ? Won't that be = only ? I am learning Algorithms and Data Structures. Image from CLSR

$\endgroup$

1 Answer 1

0
$\begingroup$

Consider the graph $G = (V,E)$ with $V = \{s,u,v\}$ and $E =\{ (s,u), (s,v), (u,v) \}$. You have: $$ \delta(s,v) = 1 < 1+1 = \delta(s,u) + 1. $$

$\endgroup$
1
  • $\begingroup$ Wow thanks a lot brother, got my answer $\endgroup$ Aug 19, 2023 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.