【发布时间】:2020-04-24 03:50:40
【问题描述】:
我有一个 n=|V| 的异步网络无向树 (V,E)过程。对于我的网络,我唯一知道的是所有进程都有唯一的 ID (UID),它们知道邻居的数量,但不知道网络的直径和大小。我尝试在这样的网络中构建一个领导者选举算法,如下所示:
A convergecast of <leader> messages is initiated starting from the
leaves of the tree.
Each leaf node is initially enabled to send a <leader> message to
its unique neighbor. Any node that receives <leader> messages from
all but one of its neighbors is enabled to send an <leader> message
to its remaining neighbor.
In the end,
1. Some particular process receives <leader> messages along all
of its channels before it has sent out an <leader> message
the process at which the <leader> messages converge elects
itself as the leader.
2. <leader> messages are sent on some particular edge in both
directions.
the process with the largest pid among the processes that are
adjacent to this edge elects itself as the leader.
我的想法是否正确,上述算法是否在所有进程都知道领导者的情况下终止?
【问题讨论】:
标签: algorithm graph-algorithm distributed