This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: AMS/MBA 546 (Spring, 2008) Estie Arkin Network Flows - Final, sketch of solutions Average 85. 1). Consider a set of n numbers a 1 , a 2 , . . . , a n arranged in non-decreasing order of their values ( a i ≤ a i +1 ). We wish to partition these numbers into “clusters” so that (1) each cluster contains at least p numbers; (2) each cluster contains consecutive numbers from the list a 1 , a 2 , . . . , a n ; and (3) the sum of the squared deviation of the numbers from their cluster mean is as small as possible. Let ¯ a ( S ) = ( ∑ i ∈ S a i ) / | S | denote the mean of a set S of numbers forming a cluster. For a number a k in the cluster, its squared deviation from the cluster mean is ( a k − ¯ a ( S )) 2 . Describe how to formulate this problem as a shortest path problem. Make sure to clearly define the nodes and arcs of your graph, the costs on the arcs, and what are s and t . Construct nodes 0 , 1 , 2 , . . . , n where s = 0 and t = n . We build arcs ( i, j ) if j ≥ i + p . The cost of an arc ( i, j ) is the cost of a cluster i +1 , i +2 , . . . j which is ∑ j k = i +1 ( a k − ¯ a ( S )) 2 , where ¯ a ( S ) = ( ∑ j k = i +1 a k ) / ( j − i ). 2). (a). Given a tree on n > 2 nodes, with exactly 2 nodes of degree equal to 1, show that all other nodes of this tree must have degree equal to 2. Let d i be the degree of node i . We have 1 + 1 + d 3 + d 4 + ··· d n = 2( n − 1), since we know that the sum of the node degrees is 2 times the number of edges in any graph, and the number of edges in a tree with n nodes is n − 1. So ∑ n 3 d i = 2 n − 4, and d i ≥ 2 for i = 3 , ..., n . So 2( n − 2) ≥ 2 n − 4. Since we have equality, this implies that d i = 2 for i = 3 , ..., n ....
View Full Document
- Fall '08
- Graph Theory, Shortest path problem, DI, vital arc