Homework 1
CSIT6000K- Social Networks and Social Computing: A Data Science Perspective

Due date: Mar 09 11:59PM HK time

一组心理学研究人员要求一所大学的每个学生给该大学的五个朋友命名。这使他们在学生上形成了一个社交网络,其中每个节点正好有五个邻居。如图所示,在这个社交网络中,假设一个学生A有五个邻居B,C,D,E和F。
用明确的“是”或“否”答案回答以下问题,然后解释您的原因。 1.1。是否可能恰好有20个节点与A的距离恰好是2? [5分]
1.2。是否可能恰好有25个节点与A的距离恰好是2? [5分] 1

1.3。是否可能恰好有4个与A的距离恰好是2的节点? [5分]
2.一位著名的人类学家正在研究一个雨林稀少的地区,那里有30个农民沿着一条30英里长的河流居住。每个农民生活在一块占地1英里的河岸上的土地上,因此他们的土地正好划分了他们共同覆盖的30英里的河岸。
假设生活在彼此之间不到6英里的所有成对农民之间通过牢固的纽带相连,而生活在至少6英里之间但不到15英里的所有成对农民之间则以薄弱的纽带相互连接。彼此居住至少15英里的农民在社交网络中没有优势。此网络中的所有节点是否都满足“强三合会封闭”属性?解释你的理由。 [8分]
3.考虑我们在上一个问题中看到的雨林农民的相同情景。假设情况与上一个问题几乎相同,但数字略有不同。同样,彼此之间相距不到6英里的所有成对农民之间都建立了牢固的联系。但是现在,彼此之间至少居住6英里但不到8英里的所有成对农民之间都通过薄弱的纽带相连。彼此居住至少8英里的农民在社交网络中没有优势。有了这些新数字,网络中的所有节点是否都满足“强三合会封闭”属性?解释你的理由。 [8分]
2个

4.考虑一个规则晶格(类似于我们在Watts-Strogatz模型中看到的晶格),证明邻居之间的连接数为3𝑐(𝑐− 2),其中𝑐为平均度。 [9分]
8
实用问题(60分)
5.此问题的目的是使您熟悉NetworkX和网络分析中的基本概念。在这个问题中,我们选择ego-Facebook数据集作为我们的测试基础。由于我们不会深入研究此任务中的社交圈子,因此您只需要下载数据文件facebook_combined.txt.gz,该文件将在此图中保存所有边的列表。
对于那些有兴趣了解此数据集的人来说,可以查看“数据集信息”,“ readme-Ego.txt”和原始资料的介绍:学习发现自我网络中的社交圈子。 NIPS,2012年。

1. A group of psychology researchers ask each student in a college to name five friends in the college. This gives them a social network on the students in which each node has exactly five neighbors. Consider a student A in this social network, with five neighbors B, C, D, E, and F, as shown here.

Answer the following questions with an explicit Yes or No answer, and then explain your reason. 1.1. Is it possible for there to be exactly 20 nodes whose distance from A is exactly two? [5 points]

1.2. Is it possible for there to be exactly 25 nodes whose distance from A is exactly two? [5 points] 1

1.3. Is it possible for there to be exactly 4 nodes whose distance from A is exactly two? [5 points]

2. A famous anthropologist is studying a sparsely populated region of a rain forest, where 30 farmers live along a 30-mile-long stretch of river. Each farmer lives on a tract of land that occupies a 1-mile stretch of the riverbank, so their tracts exactly divide up the 30 miles of riverbank that they collectively cover.

Suppose that all pairs of farmers who live within less than 6 miles of each other are connected by a strong tie, and all pairs of farmers who live at least 6 but less than 15 miles from each other are connected by a weak tie. Farmers who live at least 15 miles from each other do not have an edge in the social network. Do all of the nodes in this network satisfy the Strong Triadic Closure property? Explain your reasoning. [8 points]

3. Consider the same scenario of the rain forest farmers that we saw in the previous question. Suppose that the situation had been almost the same as in the previous question, but with slightly different numbers. Again, all pairs of farmers who live within less than 6 miles of each other are connected by a strong tie. But now, all pairs of farmers who live at least 6 but less than 8 miles from each other are connected by a weak tie. Farmers who live at least 8 miles from each other do not have an edge in the social network. With these new numbers, do all nodes in the network satisfy the Strong Triadic Closure property? Explain your reasoning. [8 points]

2

4. Consider a regular lattice (similar to what we saw in Watts-Strogatz model), prove that the number of connections between neighbors is 3 𝑐(𝑐 − 2), where 𝑐 is the average degree. [9 points]

8

Practical Questions (60 points)

5. The purpose of this question is to get you familiar with NetworkX and basic concepts in network analysis. We choose ego-Facebook dataset as our testbase in this question. Since we are not going deep to detect social circles in this assignment, you will only need to download the datafile facebook_combined.txt.gz, which saves the list of all the edges in this graph.

For those of you who are interested in knowing what this dataset is about you may check the “Dataset Information”, “readme-Ego.txt”, and the introduction of the source paper: Learning to Discover Social Circles in Ego Networks. NIPS, 2012.

We have provided the code for loading the edge list datafile as well as generating a graph from it, you will be required to complete the code which could answer the following questions:

5.1. Number of nodes, Number of edges, Whether the network is connected or not? [10 points] 5.2. Find out the id of node (or nodes) with maximum degree. [10 points]

5.3. What is the clustering coefficient of the maximum degree node (or nodes) and what is the average clustering coefficient of the whole network? [10 points]

5.4. How many triangles in the network? [10 points]
5.5.
What is the shortest path from node 5 to node 3000? [10 points]
5.6.
What are the diameter and average shortest path length of the network? [10 points]

Make sure when loading the datafile, its path is correct. You may need to change it according to where you save the datafile.

3


EasyDue™ 支持PayPal, AliPay, WechatPay, Taobao等各种付款方式!

E-mail: easydue@outlook.com  微信:easydue


EasyDue™是一个服务全球中国留学生的专业代写公司
专注提供稳定可靠的北美、澳洲、英国代写服务
专注提供CS、统计、金融、经济、数学等覆盖100+专业的作业代写服务