正在加载图片...
In general? Ni(s)=fall neighbors of s} a the vertices with distance 1 from s. N2(s)={all neighbors of N(s)}-N(s)-{s} the vertices with distance 2 from s. N3(s)={all neighbors of N2(s)}-N2(s)-N(s)-{s} the vertices with distance 3 from s. Ni(s)={all neighbors of Ni-1(s)}-Ni-1(s)-...- N1(S)-{S} If we find t in this step i,then d(s,t)=i. 13In general? ◼ 𝑁1(𝑠) = {all neighbors of 𝑠} ❑ the vertices with distance 1 from 𝑠. ◼ 𝑁2(𝑠) = {all neighbors of 𝑁1(𝑠)} − 𝑁1 𝑠 − {𝑠} ❑ the vertices with distance 2 from 𝑠. ◼ 𝑁3(𝑠) = {all neighbors of 𝑁2(𝑠)} − 𝑁2(𝑠) − 𝑁1(𝑠) − {𝑠} ❑ the vertices with distance 3 from 𝑠. ◼ … ◼ 𝑁𝑖(𝑠) = {all neighbors of 𝑁𝑖−1(𝑠)} − 𝑁𝑖−1(𝑠) − ⋯ − 𝑁1(𝑠) − {𝑠} ◼ If we find 𝑡 in this step 𝑖, then 𝑑(𝑠,𝑡) = 𝑖. s t 13
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有