## All Weeks Applied Social Network Analysis in Python Coursera Quiz Answers

### Applied Social Network Analysis in Python Coursera Quiz Answers

Q1. Select all the true statements below.

- Connections between a set of items in the network are called vertices.
**Weighted networks are used to describe networks with unequal relationships between nodes.**- An undirected graph is a good choice to present a network with asymmetric relationships between nodes.
**When there are only two opposite relationships between nodes, a signed network is a good representation.**

Q2. A network that has parallel edges (a pair of nodes with different types of concurrent relationships) is called a ** __**.

- Directed Network
- Weighted Network
- Signed Network
**Multigraph**

Q3. Suppose we want to plot a network representing a small food web for students in a biology class. In order to give them a better understanding of the network, we want to show who is the predator and who is the prey. For those predators who have multiple options for prey, we also want to represent the predator’s preferences (i.e. which prey it likes most or second most). Choose the most appropriate type of network.

- Undirected Network
- Directed Signed Network
**Directed Weighted Network**- Unweighted Network
- Signed Network

Q4. Select all true statements:

**Edges can carry many labels or attributes.**- Suppose G is a graph and node A, B are two of G’s nodes. G.edge[‘A’][‘B’] and G.edge[‘B’][‘A’] will return the same value for all types of networks.
**Accessing node or edge attributes in NetworkX is the same as accessing values in a Python dictionary****Suppose we have created a nx.Graph()object G with some nodes and edges. The statement G.nodes(data=True) will return a list of tuples.**

Q5. Based on the following lines of code, what is the type of G.edge[‘A’][‘C’]?

`1 import networkx as nx`

2

3 G=nx.MultiGraph()

4 G.add_node('A',role='manager')

5 G.add_edge('A','B',relation = 'friend')

6 G.add_edge('A','C', relation = 'business partner')

7 G.add_edge('A','B', relation = 'classmate')

8 G.node['A']['role'] = 'team member'

9 G.node['B']['role'] = 'engineer'

**Dictionary**- List
- String

Q6. Based on the following lines of code, what’s the correct statement to access the edge attribute “friend”?

`1 import networkx as nx`

2

3 G=nx.MultiGraph()

4 G.add_node('A',role='manager')

5 G.add_edge('A','B',relation = 'friend')

6 G.add_edge('A','C', relation = 'business partner')

7 G.add_edge('A','B', relation = 'classmate')

8 G.node['A']['role'] = 'team member'

9 G.node['B']['role'] = 'engineer'

- G.edge[‘A’][‘B’][‘relation’]
**G.edge[‘A’][‘B’][0][‘relation’]**- G.edge[‘A’][‘B’][1][‘relation’]
- G.edge[‘A’][‘B’][‘relation’][0]
- G.edge[‘A’][‘B’][‘relation’][1]

Q7. After all lines of code below are executed, what is(are) the role(s) of node A?

`1 import networkx as nx`

2

3 G=nx.MultiGraph()

4 G.add_node('A',role='manager')

5 G.add_edge('A','B',relation = 'friend')

6 G.add_edge('A','C', relation = 'business partner')

7 G.add_edge('A','B', relation = 'classmate')

8 G.node['A']['role'] = 'team member'

9 G.node['B']['role'] = 'engineer'

Check all that apply:

- Manager
- Friend
- Business Partner
- Classmate
**Team member**- Engineer

Q8. Based on the bipartite network below, select all the edges you can add to the network while maintaining its bipartite structure.

**(1, B)****(3, E)**- (B, D)
- (2, 4)

Q9. Based on the bipartite network below, which of the following is the bipartite projection of the graph onto the set of circle nodes?

**D**

Q10. Based on this bipartite network, suppose you create a weighted bipartite projection of the graph onto the set of square nodes.

What is the weight of edge AC in the projection graph?

- 1
- 2
**3**- 4
- 5

#### Week 2: Network Connectivity

Q1. Consider the given network. What is the value of node F’s local clustering coefficient?

- 0.5
- 0.6
**0.7**- 0.8

Q2. Given the following two networks, which of the following is True?

- Network (A) has higher average local clustering coefficient and higher transitivity than (B).
**Network (A) has higher average local clustering coefficient but lower transitivity than (B).**- Network (A) has lower average local clustering coefficient and lower transitivity than (B).
- Network (A) has lower average local clustering coefficient but higher transitivity than (B).

Q3. Consider the network shown below and select all that apply.

**The radius of this network is half of its diameter.****The deletion of node G will make the network disconnected.****If we perform Breadth-First Search (BFS) from node A, the BFS tree we obtain will have a depth of 4.**- Node C and D are in the center of the network.
- F is the only in the periphery of the network.
**The eccentricity of node B and C are equal.**

Q4. Select all that apply for the network below.

**It is a disconnected graph with 2 connected components.****If edge (E,G) is removed, the number of connected components will not change.**- The local clustering coefficient of node I is higher than node J and K.
**We can make the graph connected by adding edge (E,J).**

Q5. Consider three networks (A), (B) and (C) below and select all that apply.

**Only network (B) is a strongly connected graph.**- We can change network (A) from a weakly connected graph to a strongly connected graph by adding a directed edge from node C to node D.
- All edges in network (B) are needed for the network to be strongly connected.
**We only need to add one directed edge in order to change network (C) to a strongly connected graph.**

Q6. Which of the following is true about network robustness and connectivity? Select all that apply.

**The closure of an airport and the cancellation of a flight route are examples of two different kinds of network attacks in the real world.**- Adding more edges to a network always makes it more robust.
- A network that has a high average local clustering coefficient always has a high node connectivity.
**Network robustness measures a network’s ability to maintain its connectivity.****Adding edges to a network can never make the network less robust.**

Q7. Consider the network given below.

What’s the node connectivity of the network?

**1**- 2
- 3
- 4

Q8. Consider the network given below.

What is the edge connectivity of the network?

- 1
**2**- 3
- 4

Q9. The directed network below shows how information can be transferred between nodes. For example, node A can pass the information to node C directly but not vice-versa. If node C wants to send messages to node A, all data must be forwarded by node B.

What is the total number of simple paths from node D to node K?

- 5
- 6
- 7
**8**- 9

Q10. The directed network below shows how information can be transferred between nodes. For example, node A can pass the information to node C directly but not vice-versa. If node C wants to send messages to node A, all data must be forwarded by node B.

Suppose we want to block all information channels from node E to node K. Which of the following options achieve this goal? Check all that apply.

- Removing node H only
- Removing node G and H
**Removing node F and H**- Removing edge (H,K)
**Removing edges (H,K) and (E,F)**- Removing edges (H,K) and (F,G)

#### Week 3: Influence Measures and Network Centralization

Q1. Based on the network below, what is the degree centrality of node D?

**0.67**- 0.42
- 0.57
- 0.50

Q2. Based on the network below, what is the closeness centrality of

node G?

- 0.875
**0.6**- 0.75
- 0.7

Q3. Based on the network below, what is the normalized betweenness centrality (excluding endpoints) of node G?

**0.33**- 0.47
- 0.67
- 0.24

Q4. Based on the network below, what is the betweenness centrality without

normalization of edge (G,F)?

- 4
- 5
**6**- 7

Q5. Select all True statements.

**The closeness centrality of a node describes how far the node is from others.**- The node with highest betwenness centrality in a network also has the

highest closeness centrality. - In directed networks, in-degree and out-degree centrality of a node are

always the same. **We can use subsets of node-pairs to approximate betweenness centrality.****The assumption of degree centrality is that important nodes have more connections.**

Q6. Select all True statements about Page Rank

(PR) and HITS in directed networks.

- Adding

out-links of a node will always decrease its PR. - Nodes with high in-degree centrality have higher PRs than nodes with

low in-degree centrality. - Nodes that have outgoing edges to good hubs are good authorities, and

nodes that have incoming edges from good authorities are good hubs. **The authority and hub score of each node is obtained by computing multiple iterations of HITS**algorithm and both scores of most networks are convergent.**Adding in-links of a node will never decrease its PR.**

Q7. Given the network below, which value of alpha (damping parameter) listed below in the

NetworkX function pagerank maximizes the

PageRank of node D?

**0.95**- 0.8
- 0.9
- 0.5

Q8. Based on the network below, what is the basic PR of node C at step k = 1?

**0.625**- 0.375
- 0.125
- 0.25
- 0.5

Q9. Based on the network below, what are the corresponding normalized

authority and hub scores of node C correspondingly after two iterations of HITS

algorithm?

**0.57, 0.09**- 0.8,

0.2 - 0.33,

0.33 - 0.4, 0.4

Q10. Based on the network below, which of the following is NOT True? Check all that apply.

- At each step, the sum of all nodes’ basic PR is always 1.
- At step k (k>=1), node A’s basic PR is always the same as node C’s

basic PR at step k-1. **Node D’s basic PR at step k (k>=1) is always 0.**- Node D’s

authority and hub score after k iterations (k>=1) are always 0.

#### Week 4: Applications

Q1. Suppose P(k) denotes the degree distribution

of the following network, what is the value of P(2) + P(3)?

- ⅙
- ⅓
**½**- ⅚

Q2. Let P(k) denote the in-degree distribution of

the given network below. What value of k gives the highest value of P(k)?

**1**- 0
- 3
- 2

Q3. Select all that apply

- Networks with a power law distribution have many nodes with large

degree and a few nodes with very small degree. **If we draw a power law distribution in log-log scale, the distribution will look like a straight line.**- In the Preferential Attachment Model, a new node always connects to the

node with highest in-degree. **The Preferential Attachment Model generates a network with a power law degree distribution.**

Q4. Select all that apply

**Some Small-world networks have high local clustering coefficient and small average shortest path.**- The

degree distribution of small-world networks follows power-law distribution. - The Preferential Attachment Model generates a small-world network.
- Small-world networks are always connected.
**In the small-world model starting with k nearest neighbors, increasing the rewiring probability p generally decreases both the average clustering coefficient and average shortest path.**

Q5. Suppose we want to generate several

small-world networks with k nearest neighbors and rewiring probability p. If p

remains the same and we increase k, which best describes the variation of average

local clustering coefficient and average shortest path?

- Both of them will increase.
- Both of them will decrease.
**Average local clustering coefficient will increase and average shortest path will decrease.**- Average local clustering coefficient will decrease and average shortest

path will increase.

Q6. Based on the network below, suppose we want to apply the common neighbors

measure to add an edge from node H, which is the most probable node to connect

to H?

**A**- B
- C
- G

Q7. Based on the network below, what is the Jaccard coefficient of nodes D and

C?

- 0.29
- 0.33
**0.40**- 0.50

Q8. Based on the network below, if we apply Resource Allocation method to

predict the new edges, what is the value of Resource Allocation index of nodes

C and D?

- 0.20
- 0.33
- 0.70
**0.83**

Q9. Based on the network below, what is the preferential attachment score of

nodes C and D?

- 5
- 8
**10**- 15

Q10. Assume there are two communities in this

network: {A, B, C, D, G} and {E, F, H}. Which of the following statements

is(are) True? Select all that apply.

- The Common Neighbor Soundarajan-Hopcroft score of node C and node D is 2.
**The Common Neighbor Soundarajan-Hopcroft score of node A and node G is 4.**- The Resource Allocation Soundarajan-Hopcroft score of node E and node F

is 0. **The Resource Allocation Soundarajan-Hopcroft score of node A and node G is 0.7**

#### Get All Course Quiz Answers of Applied Data Science with Python Specialization

Introduction to Data Science in Python Coursera Quiz Answers

Applied Plotting, Charting & Data Representation in Python Quiz Answers

Applied Machine Learning in Python Coursera Quiz Answers

Applied Text Mining in Python Coursera Quiz Answers

Applied Social Network Analysis in Python Coursera Quiz Answers