Ask a question to Desklib · AI bot
Added on -2019-09-18
This text describes two representations of a social network: one as a set of pairs of friends, and the other as a dictionary where keys are names and values are sets of friends. It also lists several functions that can be implemented to analyze the network, such as finding the number of friends each person has, suggesting new friendships, checking if a group of people are all friends, finding the pair with the most mutual friends, checking if a group contains strangers, checking if a group covers the entire network, counting the number of triangles (triplets of people who know each other), and finding the smallest set of names that cover the network.
Trusted by 2+ million users,
1000+ happy students everyday
You are reading a preview
Upload your documents to download
or
Become a Desklib member to get accesss