A social network consists of n people numbered 0, ..., n-1. Some people in the network will become friends. If x is a friend of y, then y is a friend of x.
The people are added to the network in n stages, which are also numbered from 0 to n-1. Person i is added in stage i. In stage 0, person 0 is added as the only person of the network. In each of the next stages, a person is added to the network by a host, who may be any person already in the network. At stage i(0<i<n ), the host for that stage can add the incoming person into the network by one of the following three protocols:
Input | Diagram | Output |
people(6). host_protocol(1,0,0). confidence(0,13). |
![]() |
max_confidence(35). |
people(4). host_protocol(1,0,0). confidence(0,50). |
![]() |
max_confidence(60). |
people(10).
host_protocol(1,0,0).
confidence(0,20).
|
![]() |
max_confidence(155). |