Exploiting a Prioritized MAC Protocol to Efficiently Compute Min
and Max in Multihop Networks
Björn Andersson, Nuno Pereira and Eduardo TovarInstitute Polytechnic Porto
Portugal
Calculating the maximum temperature
A
B C D
E
One node (node C) wants to know the maximum One node (node C) wants to know the maximum temperature in an area.temperature in an area.
Calculating the maximum temperature
A
Node C broadcasts a request.Node C broadcasts a request.
B C D
What is your What is your temperature?temperature?
E
Calculating the maximum temperature
A
The other nodes respond.The other nodes respond.
B
E
C D
2222˚̊CC
Calculating the maximum temperature
A
2020˚̊CC
B C D
E
The other nodes respond.The other nodes respond.
Calculating the maximum temperature
A1818˚̊CC
B C D
E
The other nodes respond.The other nodes respond.
Calculating the maximum temperature
A
B C D
E
1919˚̊CC
The other nodes respond.The other nodes respond.
Calculating the maximum temperature
A
Now node C knows that max temperature is 22Now node C knows that max temperature is 22˚̊CC..
B C D
I heard 22I heard 22˚̊CC, , 2020˚̊C, C, 1818˚̊C, 19C, 19˚̊C.C.
So the maximum So the maximum temperature is 22temperature is 22˚̊C.C.
E
Calculating the maximum temperature
A
B C D
E
The time complexity is The time complexity is O(O(mm), where ), where mm is the number of nodesis the number of nodes
Calculating the maximum temperature
A
B C D
E
⇒⇒ We need a faster way to compute the maximum We need a faster way to compute the maximum temperature.temperature.
Calculating the maximum temperature
A
Node C broadcasts a request.Node C broadcasts a request.
B C D
What is your What is your temperature?temperature?
E
Calculating the maximum temperature
B
A
C D
Empty Empty msgmsg
Empty Empty msgmsgEmpty Empty msgmsg
withwithprioprio=20=20with with prioprio=18=18
with with prioprio=22=22
EEmpty Empty msgmsg
with with prioprio=19=19
The other nodes respond The other nodes respond in parallelin parallel……
Calculating the maximum temperature
B
A
C D
Empty Empty msgmsg
Empty Empty msgmsgEmpty Empty msgmsg
withwithprioprio=20=20with with prioprio=18=18
with with prioprio=22=22
EEmpty Empty msgmsg
with with prioprio=19=19
By transmitting empty msg. The priority of the By transmitting empty msg. The priority of the msgmsg is given is given by the temperature.by the temperature.
Calculating the maximum temperature
B
A
C D
Empty Empty msgmsg
Empty Empty msgmsgEmpty Empty msgmsg
withwithprioprio=20=20with with prioprio=18=18
with with prioprio=22=22
EEmpty Empty msgmsg
with with prioprio=19=19
Now node C knows that max temperature is 22Now node C knows that max temperature is 22˚̊CC..
Calculating the maximum temperature
B
A
C D
Empty Empty msgmsg
Empty Empty msgmsgEmpty Empty msgmsg
withwithprioprio=20=20with with prioprio=18=18
with with prioprio=22=22
EEmpty Empty msgmsg
with with prioprio=19=19
And this is faster. Time complexity in O(1).And this is faster. Time complexity in O(1).
Calculating the maximum temperature
B
A
C D
Empty Empty msgmsg
Empty Empty msgmsgEmpty Empty msgmsg
withwithprioprio=20=20with with prioprio=18=18
with with prioprio=22=22
EEmpty Empty msgmsg
with with prioprio=19=19
Can we do the same trick in Can we do the same trick in multihopmultihop networks?networks?
Outline of this talk
1. Assumptions
2. The new algorithm for computing min and max in multihop networks
3. Implementation
4. Conclusions
Assumptions
There is no noise.
There are no faults in nodes.
All nodes run a prioritized MAC protocol (similar to CAN).
The MAC protocol has a large number of priorities (similar to CAN)
low priority number = high priority (similar to CAN)
Assumptions
The MAC protocol performs a tournament and selects the highest priority nodes (the one with the lowest priority number) (similar to CAN).
Before the tournament, the MAC protocol synchronizes the nodes (similar to CAN)
The new algorithm
Let us partition the set of computer nodesLet us partition the set of computer nodes……
The new algorithm
…… such that each partition constitute a broadcast domain.such that each partition constitute a broadcast domain.
The new algorithm
…… such that each partition constitute a broadcast domain.such that each partition constitute a broadcast domain.
If this computernode performsa wirelessbroadcastthen ...
The new algorithm
…… such that each partition constitute a broadcast domain.such that each partition constitute a broadcast domain.
these nodesreceives it.
The new algorithm
Idea 2. Use the algorithm for computing MIN in each broadcast doIdea 2. Use the algorithm for computing MIN in each broadcast domain.main.
The new algorithm
Idea 2. And combine the results in each partition.Idea 2. And combine the results in each partition.
The new algorithmA running example. What do to before runA running example. What do to before run--timetime
The new algorithmThe partition ids of nodesThe partition ids of nodes
1
2
1
3
4
4
5
6
7
5
8
1
6
5
6
1
3
9
5
10
2
11
10
12
9
6
3
3
6
13
1
7
7
14
5 13
10
4
6
11
15
9
5
8
16
4
17 12
1
7
13
6
10
4
3
2
7
13
10
4
14
3
14
18
13
13
8
13
10
2
19
18
6
12
12
1
7 10
1
8
2
7
11
2
13
18
1
6
10
3
17
5
12
20
19
12
16
1
6
14
The new algorithmTime slot ids of nodesTime slot ids of nodes
1
2
1
2
1
1
3
4
5
3
2
1
4
3
4
1
2
6
3
7
2
3
7
7
6
4
2
2
4
6
1
5
5
8
3 6
7
1
4
3
9
6
3
2
8
1
9 7
1
5
6
4
7
1
2
2
5
6
7
1
8
2
8
10
6
6
2
6
7
2
3
10
4
7
7
1
5 7
1
2
2
5
3
2
6
10
1
4
7
2
9
3
7
5
3
7
8
1
4
8
The new algorithmTemperature at each nodeTemperature at each node
26
14
13
13
23
28
16
10
14
28
18
18
19
27
27
26
14
13
20
13
20
29
22
15
14
20
15
29
24
16
19
12
12
14
27 17
25
14
18
21
12
18
29
13
16
18
10 12
21
20
15
11
11
20
28
15
10
26
14
16
12
15
18
26
12
28
14
27
12
14
10
26
22
29
29
20
18 21
23
21
11
20
23
24
10
13
29
11
29
26
29
23
23
18
20
25
16
16
14
10
The new algorithmTemperature at each nodeTemperature at each node
26
14
13
13
23
28
16
10
14
28
18
18
19
27
27
26
14
13
20
13
20
29
22
15
14
20
15
29
24
16
19
12
12
14
27 17
25
14
18
21
12
18
29
13
16
18
10 12
21
20
15
11
11
20
28
15
10
26
14
16
12
15
18
26
12
28
14
27
12
14
10
26
22
29
29
20
18 21
23
21
11
20
23
24
10
13
29
11
29
26
29
23
23
18
20
25
16
16
14
10
Here is onepartitionassigned totime slot 1.
The new algorithmTemperature at each nodeTemperature at each nodeafter time slot 1.after time slot 1.
13
14
13
13
14
14
16
10
14
28
18
13
19
27
27
13
14
13
20
13
20
29
22
15
14
20
15
29
24
16
13
12
12
14
27 17
25
14
18
21
12
18
29
13
16
14
10 12
13
20
15
11
11
14
28
15
10
26
14
14
12
15
18
26
12
28
14
27
12
14
10
26
22
29
29
13
18 21
13
21
11
20
23
24
10
13
13
11
29
26
29
23
23
18
20
25
16
13
14
10
Here is onepartitionassigned totime slot 1.
The new algorithmTemperature at each nodeTemperature at each nodebefore time slot 2.before time slot 2.
13
14
13
13
14
14
16
10
14
28
18
13
19
27
27
13
14
13
20
13
20
29
22
15
14
20
15
29
24
16
13
12
12
14
27 17
25
14
18
21
12
18
29
13
16
14
10 12
13
20
15
11
11
14
28
15
10
26
14
14
12
15
18
26
12
28
14
27
12
14
10
26
22
29
29
13
18 21
13
21
11
20
23
24
10
13
13
11
29
26
29
23
23
18
20
25
16
13
14
10
The new algorithmTemperature at each nodeTemperature at each nodebefore time slot 2.before time slot 2.
Here is onepartitionassigned totime slot 2.
13
14
13
13
14
14
16
10
14
28
18
13
19
27
27
13
14
13
20
13
20
29
22
15
14
20
15
29
24
16
13
12
12
14
27 17
25
14
18
21
12
18
29
13
16
14
10 12
13
20
15
11
11
14
28
15
10
26
14
14
12
15
18
26
12
28
14
27
12
14
10
26
22
29
29
13
18 21
13
21
11
20
23
24
10
13
13
11
29
26
29
23
23
18
20
25
16
13
14
10
The new algorithmTemperature at each nodeTemperature at each nodeafter time slot 2.after time slot 2.
Here is onepartitionassigned totime slot 2.
13
11
13
13
14
14
16
10
14
28
13
13
19
27
27
13
13
13
20
13
11
29
22
15
14
20
13
13
24
16
13
12
12
14
27 17
25
14
18
21
12
18
29
13
16
14
10 12
13
20
15
11
11
14
13
11
10
26
14
14
12
13
18
26
12
28
13
27
12
11
10
26
22
29
29
13
18 21
13
13
11
20
23
11
10
13
13
11
29
13
29
23
23
18
20
25
16
13
14
10
The new algorithmTemperature at each nodeTemperature at each nodeafter time slot 10.after time slot 10.
13
11
13
13
14
14
16
10
10
16
13
13
10
16
10
13
13
13
16
11
11
21
11
12
13
10
13
13
10
10
13
10
10
10
16 10
11
14
10
21
12
13
16
13
16
14
10 12
13
10
10
10
11
14
13
11
10
10
11
14
10
13
10
13
10
10
13
10
11
11
10
13
10
12
12
13
10 11
13
13
11
10
21
11
10
13
13
10
11
13
10
16
12
18
10
12
16
13
10
10
The new algorithmEach node reportsEach node reportsto its leader nodeto its leader nodein the partitionin the partition
13
11
13
14
16
10
10
13
13
11
21
12
10
10
12
16
10
13
10
18
The new algorithm
13
11
13
14
16
10
10
13
13
11
21
12
10
10
12
16
10
13
10
18
This node is the leaderof the leaders.
The new algorithm
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10 10
10
10
10
10
10
10
10
10
10
10
10 10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10 10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
ImplementationQ: Does this algorithm work in practice?
Algorithm for efficiently computing MIN in a single broadcast domain:
A: Yes it works.
Algorithm for efficiently computing MIN in multihopnetworks:
A: Not yet implemented.
ConclusionsIt is possible to compute min and max efficientlyIt is possible to compute min and max efficientlyin in multihopmultihop networks.networks.
Top Related