Merging vertex process

Правка en1, от typedeftemplate, 2022-04-26 23:02:00

Given a tree in which each vertex represents an interval [x_i, y_i], you can merge adjacent vertices iff they intersect. The merged vertex has a new interval corresponding to the intersection of the previous two intervals, and its neighbors are the union of the neighbors of the merged vertices. How can you minimize the number of vertices after the process terminates?

I tried rooting the tree and attempting dynamic programming, but I’m not sure how to approach this. Any ideas?

Теги tree, interval tree, dynamic programming

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский typedeftemplate 2022-04-26 23:02:00 505 Initial revision (published)