pracmidterm2soln - 15-750Midterm 2Page 1 of...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 15-750Midterm 2Page 1 of 915-750:Practice Midterm 2Name:Email:InstructionsFill in the box above with your name, and your email address.Do it, now!This exam is open book: That is, you may use two books (Kozen and CLRS), any handoutsfrom class, and your notes.Clearly mark your answers in the allocated space. If need be, use the back of a page for scratchspace. If you have made a mess, cross out the invalid parts of your solution, and circle the onesthat should be graded.Scan the test first to make sure that none of the 9 pages are missing. The problems are ofvarying difficulty, you might wish to pick off the easy ones first.With each problem requiring you to present an algorithm make sure include the following threebullets: Algorithm: Correctness: and Timing:You have 80 minutes. Good luck.130230330430E.C.3012015-750Midterm 2Page 2 of 9Problem 1:Solving Linear Systems to Find the Hitting Time (30 pts)Consider the following weighted graph.1v1v2v3v4121Show how to setup the linear system to find the hitting time fromv1tov4.Do not solve thesystem.What value from the solution is your hitting time?Solution:The linear system will just be to solve for voltages using the Laplacian. LetCi=jiCijandC=iCi.Lv=1-1-14-2-1-23-1-1-12v=C1C2C3C4-C1432-10(1)We solve this linear system under the constraint thatv4= 0. The voltagesviin the solution to thislinear system correspond to the hitting timeshi,4. Thus, the desired solution is simplyv1.Viewing as a Circuit.We derived in class using Kirchhoffs laws thatLv=I. In words, this saysthat the residual current at nodeiisIi= (Lv)i, thei-th component of the vectorI. Therefore, acircuit corresponding to the equation above is the following: for each nodei, we injectCiunits ofcurrents, and at node 4, we take outC=iCiunits. Note that the circuit cannot hold any current,so we take out exactly the amount of current we inject in.15-750Midterm 2Page 3 of 9Problem 2:Longest Path in a DAG (30 pts)LetG= (V,E) be a directed acyclic graph andsandtbe two distinguished vertices ofG. At eachvertex of this graph are some number of tokens and as you visit the vertex you can collect it tokens....
View Full Document

This document was uploaded on 11/03/2009.

Page1 / 8

pracmidterm2soln - 15-750Midterm 2Page 1 of...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online