506 views
0 0 votes

In a directed acyclic graph (DAG) with a source vertex $s$, the quality-score of a directed path is defined to be the sum of the weights of the edges on the path. For any other vertex v , its quality-score is the maximum quality-score among all possible paths from $s$ to $v$. The qualityscore of $s$ is 0 .
 


What is the sum of the quality-scores of all vertices on the graph? 

3 Answers

0 0 votes
Quality-score = maximum sum of edge-weights on any path from s to that vertex.

Compute path sums:
  score(s) = 0

  score(a) = s->a = 3

  score(b) = s->b = 1

  score(c) = max( s->a->c = 3+2 = 5,  s->b->c = 1+5 = 6 ) = 6

  score(d) = max( s->a->d = 3+6 = 9,
                  s->a->c->d = 3+2+1 = 6,
                  s->b->c->d = 1+5+1 = 7 ) = 9

Sum of quality-scores = 0 + 3 + 1 + 6 + 9 = 19
0 0 votes
Quality score of s= 0(given)

Quality score of  a= 3 (from weight edges)

Quality score of b= 1

Quality score of c= max(3+2, 1+5)=6

Quality score of d= max(3+6, 1+7)=9

so sum of all quality scores= 0+3+1+6+9=19 (ans)
Answer:
Position:
Show:

Related questions

4 4 votes
3 3 answers
504
504 views
GO Classes asked Sep 23, 2025
504 views
Consider the directed, weighted graph G defined by the following vertices and edges:Vertices: $\{A, B, C, D, E, F\}$Edges and Weights:$\mathrm{A} \rightarrow \mathrm{B}(4...
1 1 vote
1 1 answer
317
317 views
GO Classes asked Sep 23, 2025
317 views
Consider a state space of positive integers from 1 to 100 , where the start state is 1. The successor function for a state numbered $n$ returns two states: $n * 2$ and $n...
5 5 votes
2 2 answers
583
583 views
GO Classes asked Sep 23, 2025
583 views
Consider the following three functions:$f(n)=\left(\log _2 n\right)^{\log _2 n}$ $g(n)=n^{\sqrt{\log _2 n}}$ $h(n)=(\sqrt{n})$ !Which of the following statements about th...
3 3 votes
1 1 answer
690
690 views
GO Classes asked Sep 23, 2025
690 views
Consider the following two functions, designed to test a deep understanding of asymptotic behavior:$$\begin{gathered}f_1(n)= \begin{cases}(n!)^2 & \text { for } 0 \leq n ...