Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tree Contraction Label leaf nodes 1...n –Rake odd indexed leaf nodes –Left Compress –Right Compress –Left Compress –Right Compress Key: avoid memory conflicts.

Similar presentations


Presentation on theme: "Tree Contraction Label leaf nodes 1...n –Rake odd indexed leaf nodes –Left Compress –Right Compress –Left Compress –Right Compress Key: avoid memory conflicts."— Presentation transcript:

1 Tree Contraction Label leaf nodes 1...n –Rake odd indexed leaf nodes –Left Compress –Right Compress –Left Compress –Right Compress Key: avoid memory conflicts

2 Tree Contraction for arithmetic expression each node has an expression: two variables x,y, and four coefficients a,b,c,d,e,f,g Rake: replace the variable with the corresponding value Compress: –note that node v has two children x and y, and x is compressed to v, then the expression associated with x has only one variable. –v has expression is f(x,y), and x has expression g( x ), –the expression of v => f(g(x),y) – general formula: Thus, compressing corresponds to computing the new coefficients.

3 Work Complexity of Compression Efficient? each compress involves 20 operations Note that the leaf node contains only variable or constant The coefficients are mostly zero if the operations do not involve division Worth while to compare this technique with other know optimization techniques (Cook etc.,)

4 Tree Compression Applications In general, let S be a set. F  {f | f : S  S  S} If S is finite, any tree contraction can be done efficiently Use finite table Number of children –rake x to v : add value of x to y –compress x to v : add value of x to y Height? f s1 s2

5 Vertex Cover of a tree and Tree Contraction Vertex cover of a tree F: not selected R: selected Mark all nodes with F Let x be the label of parent, y be the label of child f(x,y) : new label after raking or compressing the child f s s Sequential algorithm: computing f

6 VC of a tree How to do in parallel? –Apply tree contraction by applying f whenever rake or compress is done. How to handle node degree more than 2? –Convert it into a binary tree –For VC, many dummy nodes. –Labeling function should be adjusted? => Not necessary a b cd a ba0a0 c d a2a2 a1a1 

7 Other applications of Tree Contraction –Minimum Independent set for a tree –Dominating set for a tree For Eulerian tour technique –Biconnected components –Least Common Ancestor

8 Least Common Ancestor To be prepared

9 Evaluating Straight Line Program in parallel (Dynamically) Straight Line Program:


Download ppt "Tree Contraction Label leaf nodes 1...n –Rake odd indexed leaf nodes –Left Compress –Right Compress –Left Compress –Right Compress Key: avoid memory conflicts."

Similar presentations


Ads by Google