You are given an undirected graph G = \V, E). We define a function f(s) fors SV to be the mu
mber of edges in the induced subgraph of s.
Sum of cubes
The problem asks you to calculate the sum of f(s)“k over alls in 201|11) subsets of V.
As the answer could be very large, output it modulo (10^9+7).
Input
The first line of input contains an integer I denoting the number of test cases.
For each test case, the first line contains three space-separated integers n= |V), m = |el and
k.
Then m lines follow, each line contains two space-separated integers u, v denoting an edge
(u, v) is in E.
Answers
Answered by
3
Answer:
Let G=(V,E) be an undirected graph with a subgraph G1=(V1,E1). Weights are assigned to edges of G as follows.
w(e)={ 0, if e∈E1 1, otherwise
A single-source shortest path algorithm is executed on the weighted graph (V,E,w) with an arbitrary vertex v1 of V1 as the source. Which of the following can always be inferred from the path costs computed?
The number of edges in the shortest paths from v1 to all vertices of G
G1 is connected
V1 forms a clique in G
G1 is a tree
Similar questions