Quantcast
Channel: TrueShelf : Crowdsourcing Exercises and Puzzles in Mathematics and Computer Science - latest exercises
Browsing latest articles
Browse All 6 View Live

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 Article



Linear 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 Article

Linear 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
Browsing latest articles
Browse All 6 View Live




Latest Images