GATE / CS ARCHIVE

GATE CSE 2020 / QUESTION 5

GATE CSE 2020 Q5

General Aptitude · Data Interpretation & Logical Reasoning · Full GATE CSE 2020 paper

GATE 2020, Q5 1 mark · MCQ
Report issue

Data Interpretation & Logical Reasoning

Question 5, GATE 2020: Find the cheapest directed route from 1 to 2, counting edge costs and tolls. Complete figure equivalent, edge:rupees: 1→a:200, a→c:100, c→2:100, a→2:200, 1→b:300, b→2:200, 1→f:100, f→b:0, b→d:0, d→e:100, f→e:100, e→2:200. Tolls: a,e cost 200 each; b,c,d,f cost 100 each. Options: A 1-a-c-2; B 1-f-b-2; C 1-b-2; D 1-f-e-2.
Question 5, GATE 2020: Find the cheapest directed route from 1 to 2, counting edge costs and tolls. Complete figure equivalent, edge:rupees: 1→a:200, a→c:100, c→2:100, a→2:200, 1→b:300, b→2:200, 1→f:100, f→b:0, b→d:0, d→e:100, f→e:100, e→2:200. Tolls: a,e cost 200 each; b,c,d,f cost 100 each. Options: A 1-a-c-2; B 1-f-b-2; C 1-b-2; D 1-f-e-2.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Worked explanation

A useful accounting rule is route cost = sum of directed edge weights + sum of tolls at intermediate vertices. Do not confuse a zero-cost edge with a free toll booth. For B, the edges cost 100+0+200=300 and booths f,b add 100+100=200, totaling 500. For A, edges total 400 and booths add 300, totaling 700. C totals 500+100=600 and D totals 400+300=700. For completeness, route 1-a-2 costs 400+200=600. A detour b-d-e-2 costs 0+100+200 plus tolls d,e instead of direct b-2 at 200, so it cannot improve a route already reaching b. This checks the global minimum as well as the listed options.

Derivation and answer

Include both edge costs and every visited toll. The listed routes cost: 1-a-c-2=200+100+100+200+100=700; 1-f-b-2=100+0+200+100+100=500; 1-b-2=300+200+100=600; 1-f-e-2=100+100+200+100+200=700. Thus B.

Original paper, page 2 · Answer key