Mi-Term Exmintion - Spring 0 Mthemtil Progrmming with Applitions to Eonomis Totl Sore: 5; Time: hours. Let G = (N, E) e irete grph. Define the inegree of vertex i N s the numer of eges tht re oming into i. Formlly, inegree(i) = {j N \ {i} : (j, i) E}. Similrly, efine the outegree of vertex i N s the numer of eges tht re oming out of i. Formlly, outegree(i) = {j N \ {i} : (i, j) E}. Suppose G stisfies the property tht for every vertex i N, outegree(i) = inegree(i). Tke pir of verties s, t N n suppose there re k ege-isjoint pths from s to t in G. Does G lso ontin k ege-isjoint pths from t to s? Prove this or provie ounterexmple. (5 mrks) Answer. We onsier ny s t ut (S, N \ S) of the grph G. Let C + = {(i, j) E : i S, j N \ S} n C = {(i, j) E : i N \ S, j S}. Now, inegree(k) = {i N : (i, k) E} = {i S : (i, k) E} + C. Similrly, outegree(k) = {i N : (k, i) E} = {i S : (k, i) E} + C +. Using the ft tht {i S : (i, k) E} = {i S : (k, i) E} n inegree(k) = outegree(k), we get C+ = C. Now, sine there re k ege-isjoint pths from s to t, there is ut suh tht C + = k. But for the sme ut C = k. This implies tht we n remove this set of k eges in C n there will e no pth from t to s. By Menger s theorem, the numer of isjoint pths from t to s is k.
. Consier the following system of inequlities. x x x x x x x x x x x x x x x x. () Construt the unerlying weighte irete grph of this system of inequlities suh tht the potentils of this grph orrespons to solution of this system. ( mrks) Answer. The unerlying irete grph hs four noes orresponing to eh of the four vriles. This is shown in Figure. Figure : Direte grph () Use this to onlue if this system of inequlities hs solution. If yes, fin solution or rgue why it oes not hve solution. (7 mrks) Answer. Sine there re no yles of negtive length in the unerlying irete grph, the system of inequlities hs solution. One solution n e foun y setting, sy, x = 0, n tking shortest pth from the orresponing to x to every other noe. In prtiulr, x =, x =, x = 5.
. Suppose G = (N, E, w) is weighte irete omplete grph. Further, suppose tht the weights in G stisfy the following tringle inequlity: for every i, j, k N we hve w(i, j) + w(j, k) w(i, k). Show tht G stisfies potentil equivlene if n only if w(i, j) = w(j, i) for every i, j N. (5 mrks) Answer. Fix ny pir of noes i, j N. Let shortest pth from i to j e (i, i,..., i k, j). Then, pplying tringle inequlity suessively, we get s(i, j) = w(i, i ) + w(i, i ) +... + w(i k, i k ) + w(i k, j) w(i, i ) + w(i, i ) +... + w(i k, i k ) + w(i k, j)... w(i, j). But w(i, j) s(i, j) implies tht w(i, j) = s(i, j). Now, potentil equivlene is equivlent to requiring s(i, j)+s(j, i) = 0 for ll i, j N. Hene, potentil equivlene hols if n only if w(i, j) + w(j, i) = 0 for ll i, j N.. Let G = (N, E) e n unirete iprtite grph, i.e., there exists prtition B H of N suh tht for every {i, j} E, we hve i B n j H. We sy iprtite grph G is k-regulr, where k is positive integer, if egree of every vertex is k. () Show tht if G is k-regulr iprtite grph, then B = H. ( mrks) Answer. Sine G is k-regulr, the sum of egree of verties on B sie is k B, whih is equl to the sum of egree of verties on H sie. Hene, k B = k H. This implies tht B = H. () Show tht if G is k-regulr iprtite grph, then the size of mximum mthing in G is B. (8 mrks) Answer. Let C e minimum vertex over. Clerly, B is vertex over. Hene, C B. Sine eh vertex hs egree k, y efinition of vertex over, k C k B. Hene, C = B. So, B is minimum vertex over. By Konig s theorem, the size of mximum mthing in G is B. 5. Let G = (N, E, w) e weighte unirete grph tht is onnete. Let C = (i, i,...,i k, i ) e yle of G. Let {i, i } e the unique mximum weight ege in yle C. Similrly, let {i, i } e the unique minimum weight ege in yle C. () Show tht {i, i } will not elong to ny MCST of G or give ounterexmple. (5 mrks)
Answer. Assume for ontrition tht {i, i } elongs to some MCST T of G. Hene, some ege {i j, i j+ } in C oes not elong to this MCST. Aing {i j, i j+ ) retes unique yle whih is roken y removing {i, i }. Sine the new grph ontins N eges, this is lso spnning tree. But the weight of {i j, i j+ ) is stritly less thn {i, i } implies tht T is not n MCST, ontrition. () Show tht {i, i } will elong to every MCST of G or give ounterexmple. (5 mrks) Answer. Figure gives ounterexmple, where the MCST is shown in rk eges ut the ege {, } is not prt of the MCST. Notie tht {, } is the minimum weight ege of the yle (,,, ). Figure : A ounterexmple 6. Fin mximum mthing n minimum vertex over of the unirete grph in Figure. (5 mrks) e f g Figure : An unirete grph Answer. The mximum mthing n minimum vertex over for the grph in Figure is shown in Figure in rk. Clerly, the shown eges onstitute mthing. It is
lso mximum mthing sine the mximum mthing nnot e of size greter thn. Further, the shown verties ( in numer) is minimum vertex over euse of Konig s theorem. f e g Figure : Mximum mthing n minimum vertex over 5