In a directed acyclic graph with a source vertex s, the quality-score of a directed path is defined to be the product of the weights of the edges on the path. Further, for a vertex v other than s, the quality-score of v is defined to be the maximum among the quality-scores of all the paths from s to v. The quality-score of s is assumed to be 1.

F2 Raju S 23-2-2021 Swati D4

The sum of the quality-scores of all the vertices in the graph shown above is ______

This question was previously asked in
GATE CS 2021 Official Paper: Shift 2
View all GATE CS Papers >

Answer (Detailed Solution Below) 929

Free
GATE CS Full Mock Test
5.4 K Users
65 Questions 100 Marks 180 Mins

Detailed Solution

Download Solution PDF

Answer: 929 to 929

Explanation:

Given

Quality-Score of a directed path: Product of the weights of the edges on the path.

Quality-Score of a vertex: Maximum among the quality-scores of all the paths from s to v.

Quality-Score(s) = 1 

Quality-Score(a) = 9 ( only one path exist from s : s -> a)

Quality-Score(b) = 9× 1 = 9 ( only one exists from s: s -> a -> b)

Quality-Score(c) = 1 (only one path exists from s: s -> c)

Quality-Score(d) = Max(1 × 1 , 9 × 1) ( two paths from s: 1. s -> a -> d ; 2. s -> c -> d )

Quality-Score(d) = 9

Quality-Score(e) = Max(1× 1× 9 , 9 × 1× 9 , 9× 1× 1) ( 3 paths from s: 1. s -> c -> d -> e ; 2. s -> a -> d -> e3. s -> a -> b -> e)

Quality-Score(e) = 81

Quality-Score(f) = Max(1× 9) ( only one path exists from s: s -> c -> f)

Quality-Score(f) = 9 

Quality-Score(g) = Max(1 × 9 × 1, 1 × 1 × 9, 9 × 1× 9) (3 paths from s: 1. s-> c -> f -> g; 2. s-> c-> d-> g ; 3. s->a->d->g

Quality-Score(g) = 81 

Quality-Score(t) = 729 ( total 6 paths exists;  Maximum product of weights will be of s->a->d->e->t : 9× 1× 9× 9)

Sum = Quality-Score(s) + Quality-Score(a) + Quality-Score(b) + Quality-Score(c) + Quality-Score(d) + Quality-Score(e) + Quality-Score(f) + Quality-Score(g) + Quality-Score(t)

Sum = 1 + 9 + 9 + 1 + 9 + 81 + 9 + 81 + 729 = 929

Latest GATE CS Updates

Last updated on Jan 8, 2025

-> GATE CS 2025 Admit Card has been released on 7th January 2025.

-> The exam will be conducted on 1st February 2025 in 2 shifts.

-> Candidates applying for the GATE CE must satisfy the GATE Eligibility Criteria.

-> The candidates should have BTech (Computer Science). Candidates preparing for the exam can refer to the GATE CS Important Questions to improve their preparation.

-> Candidates must check their performance with the help of the GATE CS mock tests and GATE CS previous year papers for the GATE 2025 Exam.

More Graph Theory Questions

Hot Links: teen patti game teen patti bindaas teen patti master old version mpl teen patti teen patti customer care number