The conditions are given
Edge set consists of edges from i to j using either
- j = i+1 OR
- j=3i
What we think from here : Minimum we take vertex 1 max we take vertex 100
Now one important point is to reach 100 the maximum number which gets j = 3*i where i= 33 so j = 3*33 = 99
Half problem is solved.
We got 1--33--99--100
Now see to reach 33 how many minimum edges needed.
Maximum number between which get value j= 3i, i= 11 so j= 3*11= 33
What we get 1--11--33--99--100
So, problem solved almost minimum edge need to reach 11 from 1
Max number i which get j= 3i, i= 3 so j= 3*i =9 to reach 11 ..9--10--11
So we got another point
1--9--10--11--33--99--100
Now to reach 11 from 1
Max value of i = 3 so j= 3*i= 9 so 3--9
1--3--9--10--11--33--99--100
Note: Solved problem into half give u an idea how to get minimum for rest of the graph.