I've faced a problem and I don't know what approach I must follow, dynamic programming or greedy method, so here is the question.
Question: Given a directed tree $T=(V,\ E)$. We're required to find a set of vertices $A\subseteq V$ as big as we can such that for every two vertices $v,u\in A$ there isn't a path of length less than 3.
Note: tree can be a non-binary tree.
Example: In the image $A=[0,3,4,5]$.