Complete the code to identify the main purpose of a gossip protocol.
The gossip protocol is mainly used for [1] information among nodes in a distributed system.
The gossip protocol helps nodes share and synchronize information efficiently.
Complete the code to describe how nodes select peers in gossip protocol.
In gossip protocol, each node randomly selects [1] to exchange information with during each round.
Nodes randomly pick one or more peers to share updates, ensuring information spreads quickly.
Fix the error in the description of gossip protocol's fault tolerance.
Gossip protocol is [1] to node failures because information is spread redundantly across many nodes.The protocol is resistant to failures due to redundant information spreading.
Fill both blanks to complete the description of gossip protocol's message complexity and convergence.
The message complexity per round is typically [1], and the protocol converges in [2] rounds.
Each node sends messages to a constant number of peers (O(1)), and the protocol converges in logarithmic rounds (log n).
Fill all three blanks to complete the pseudocode for a gossip protocol round.
def gossip_round(node): peer = node.[1]() data_to_send = node.[2]() peer.[3](data_to_send)
The node selects a random peer, gets its updates, and sends them to the peer.
