↧
Diameter of a tree
Let $T(V, E)$ be a tree given as an adjacency list. For vertices $u, v \in V$, let $d(u, v)$ denote the length of the path from $u$ to $v$ in $T$. Give a linear-time algorithm to determine the value...
View ArticleLinear time tree isomorphism
Let $T_1 (V_1,E_2)$ and $T_2(V_2,E_2)$ be two undirected unlabeled trees. - Design a linear-time algorithm to decide if $T_1$ is isomorphic to $T_2$.
View ArticleLinear time algorithms on trees
Let $T(V,E)$ be a tree. Design linear time (i.e., $O(|V|)$ time) algorithms for the following problems : - Find an optimal [vertex cover](http://en.wikipedia.org/wiki/Vertex_cover) in $T$. - Find a...
View Article