Research Article

On the Use of Graphs for Node Connectivity in Wireless Sensor Networks for Hostile Environments

Algorithm 3

Check if a list of integers L is a graphical potentially connected degree sequence.
Input: A list of integers L
Output: True if the L is potentially connected, False
    otherwise
1 begin
2   n
3   Sort L in non-increasing order
4   if then
5    return False
6   end
7   if then
8    return False
9   end
10   if then
11    continueTrue
12   end
13   else
14    continueFalse
15   end
16   integrityFalse
17   while continue do
18    actualValue =
19    Delete from L
20    for i=1 : i≤actualValue do
21     
22     if then
23      continueFalse
24      break
25     end
26     else
27      continueTrue
28     end
29    end
30    if There’s some then
31     Sort L in non-increasing order
32    end
33    else
34     continueFalse
35     break
36    end
37   end
38   if integrity then
39    for : do
40     if then
41      resultTrue
42     end
43     else
44      resultFalse
45      break
46     end
47    end
48   end
49   if result then
50    return True
51   end
52   else
53    return False
54   end
55 end