代做COMP9312 - 24T2 - Data Analytics for Graphs代做回归

COMP9312 - 24T2 - Data Analytics for Graphs

Exam Sample Questions

Q1

Consider the above graph and answer the following questions. Please show necessary intermediate steps.

1.1 Calculate the density of the graph.

1.2 Please use the Compressed Sparse Row (CSR) to represent the above graph.

1.3 Commonly used data structures for graph stroage include adjacency matrix, adjacency list and CSR. Assume that we are dealing with a static graph and we aim to run the Pagerank algorithm for the graph. Which data stucture is the best to represent a graph in the above case? What scenarios the other two data structures are more suitable in, repsectively? Justify your answer

Q2

Consider the above directed acyclic graph G and answer the following questions. Please show necessary intermediate steps.

3.1 Present the transitive closure for the given DAG.

3.2 Given the tree cover T, construct the corresponding compression scheme (do not merge adjacent intervals). Report the number of intervals used in the final compression scheme.

3.3 Show the result of the total-order-based 2-hop cover of the graph. Note that you should show your node order.

Q3

Consider the above graphs and answer the following questions. Please show necessary intermediate steps.

3.1 Does this graph G1 contains 4-core? If your answer is "yes", please find the 4-core in this graph. If your answer is "no", please explain why.

3.2 Does this graph G1 contains 5-truss? If your answer is "yes", please find all edges in 5-truss in this graph. If your answer is "no", please exaplain why.

3.3 The graph G2 is a subgraph from a large-scale graph. Node v1 has 5 neighbors, and we know their core numbers, which are shown in the figure. Please calculate the core number of node v1.

Q4

Consider the above graph and answer the following questions. The PageRank formulation is given as above where A is a given page, is the page that points to page A, d is the damping factor and is set as 0.85 in this question, C(T) is the number of links going out of T, N is the number of pages in the graph, PR(A) is the PageRank value of page A (initialized as 1/N for each page).

4.1 Please compute the PageRank value of page D of the above graph after one iteration.

4.2 Assume that we aim to implement pagerank algorithm using Pregel in distributed environment. We have three machines X, Y, and Z. We know that nodes A and B are located in X. Nodes C and D are located in Y. Nodes E, F, and G are located in Z. We run the PageRank algorithm in one iteration. How many messages are generated if the combiner is used? How many messages are generated if the combiner is not used? Justify your answer.

Q5

Consider the graph G6. The node embeddings for all nodes are stacked in H. We use the Dice-Similarity which is defined as follows to measure the similarity between two vectors .

5.1 Based on the above similarity function, which node has the highest similarity with node C. Which node has the lowest similarity with node C. Justify your answer.

5.2 Complete the table below. Use the symbol "T" the to indicate that the node embedding method uses the corresponding information to learn the node embedding. Otherwise, input the symbol "F".

5.3 Which algorithm has a better performance in an inductive learning manner, GraphSAGE or GCN? Give an explanation about your choice.

Q6

6.1 Which of the following technique is adopted by GraphSAGE but not adopted by GCN? (only one correct choice)

a. Aggregation of messages from neighbor nodes.

b. Adopting multiple GNN layers to be more expressive.

c. Sampling a subset of neighbor nodes for each node to reduce computation.

d. Need activation function to add nonlinearity.

6.2 Please determine whether the following statements about the benefits of attention mechanism used in graph neural networks are TRUE or FALSE.

a. The computation of attentional coefficients can be parallelized across all edges of the graph.

b. It allows different importance values of different neighbors for each node and the mean of importance values for each node retain the same.

c. It has fixed number of parameters, irrespective of graph size.

d. It does not depend on the global graph structure so that has inductive capability.

6.3 Please determine whether the following statements about Graph Attention Network are TRUE or FALSE.

a. It adopts the DeepWalk model to assign an attention value for each node.

b. It can be used for the node classification task.

c. It does not sample neighbor nodes for each node but aggregate all the neighborhood messages.

d. It is flexible to adopt multi-head attention.

6.4 Give the matrix formulation of GCN as below, why do we multiply and ? Why do we multiply and ? Give a short explanation.

Q7

Consider the GAT model on the above undirected graph with 9 nodes. Please compute the output of the first graph convolutional layer (i.e., ) step by step base on the following formula:

where indicates the -dimensional embedding of node v in layer l, and . is the weighting factor of node u's message to node v. denotes the weight matrix for the neighbors of v in layer l, denotes the dimension of the node embedding in layer l, denotes the neighbor set of the node v, denotes the self-looping weight matrix in layer l, denotes the ReLU non-linear function. The initial embeddings for all nodes are stacked in . is the weight matrices of layer 0.

Q8

Consider the above graph and answer the following questions. Please show necessary intermediate steps.

8.1 Please determine whether the following statements are TRUE or FALSE, and justify your answer.

a. In any correct DFS traversal starting from a, c must be traversed after b.

b. In some correct BFS traversal starting from c, a can be traversed before e.

c. In some correct DFS traversal starting from d, a can be traversed before e.

d. In any correct BFS traversal starting from b, e must be traversed after d.

8.2 Given the following pseudo-code of the prim's algorithm to compute the minimum spinning tree of an undirected weighted connected graph. Please analyze its time complexity, and present how to improve its time complexity (show how to revise the pseudo-code).

function MST-Prim(G(V,E)):

Input: An undirected weighted graph G

Output: Edges in the MST T

T = an empty list;

for each node v:

d[v] = ∞, p[v] = NULL, visited[v] = false;

pick an arbitrary node u, d[u] = 0, visited[u] = true;

add (d[u],u) to a priority queue Q;

While Q is not empty:

v = pop the node with the smallest d[] value from Q;

if visited[v]: continue;

visited[v] = true;

if p[v] != NULL:

add the pair (v,p[v]) to T;

for each neighbor u of v:

if !visited[u] && weight(u,v) < d[u]:

d[u] = weight(u,v);

add (d[u],u) to Q;

p[u] = v;

return T;

Q9

9.1 A cycle is a simple path in which the terminals are the same. For instance of the graph in Q9, {1,2,4,3,1} is a cycle. Assume that we have an undirected graph G(V,E) and a sequence of new edges inserted to G. For each new edge e, please design an algorithm to test if there exists a cycle containing e in the graph. Note that you are expected to preprocess the graph and maintain some index (data structure) to check cycles efficiently.

9.2 A clique is a complete graph in which every pair of nodes are connected. Given an integer k, a k-clique is a clique with k nodes. Given an undirected graph G(V,E) and an integer k, please write the pseudo-code to enumerate all k-cliques in G, and analyze the time complexity of your algorithm.







热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图