In graph theory, a rooted tree is a connected acyclic undirected graph, where one vertex \(v_0\)  is designated as the root. For each vertex \(v_i\) , there is a unique path that connects \(v_i\)  and the root \(v_0\) . The number of edges in this path is called the depth of \(v_i\) . The depth of the root \(v_0\)  is stipulated as 0. The depth of a tree is the largest depth of its vertices. The \(k\) th level (or level \(k\) ) of a tree consists of all vertices whose depths are \(k\) . If the depth of a tree is \(m\) , it is also called an \(m\) -level tree. If two vertices \(v_i,v_j\)  are neighboring, and the depth of \(v_i\)  is smaller than the depth of \(v_j\) , then \(v_i\)  is the parent vertex of \(v_j\) , and \(v_j\)  is a child vertex of \(v_i\) . For \(v_i\)  and its child vertex \(v_j\) , the subtree with root \(v_i\)  is called a branch of \(v_i\) . A vertex without children vertices is called a leaf vertex [1]}.
