Emulate an unstructured P2P overlay using peersim that consists of 2500 peers, where
• Each peer in the overlay has 5 neighbors chosen randomly
• Each peer has a list of 10 integers that are chosen randomly between [1, 25000] without repetition. Note 1 and 25000 are included.
• Each peer at a time i.e., every one minute selects one of its neighbors randomly and sends to him the average he has (note for the first time the average he has is the average of his list integer values)
• The peer receive an average, it averaged it with the average he has (note for the first time the average he has is the average of his list integer values) and then update the average he has
• For each cycle of the simulation create output file that includes 2501 lines, the 2500 lines represents the out of peers. Where each line consists of three values (peer id, its average at that time, and the error Perror of its average)
Where Pavg is the peer average he has at that time, and Gavg is the general average of the list which it’s equal to 12500.5
• The last line of the file includes the mean error of all peers