Research Article
On the Use of Graphs for Node Connectivity in Wireless Sensor Networks for Hostile Environments
Algorithm 4
Check if a graphic potentially connected degree sequence S is also forcibly connected.
Input: A potentially connected degree sequence S | Output: True if S is forcibly 1-connected, False | otherwise | 1 begin | 2 Sort S in non-increasing order | 3 | 4 | 5 | 6 for do | 7 if then | 8 res ⟵ True | 9 end | 10 else | 11 res ⟵ False | 12 break | 13 end | 14 end | 15 return res | 16 end |
|