Some new algorithms: tree, graph