The paper presents a linear-time algorithm for calculating the grundy number of trees, which is the maximum number of colors in a 'grundy coloring' of a graph. It derives an upper bound on the grundy number and demonstrates that trees and graphs with large girth achieve equality with this bound. Furthermore, it discusses the NP-completeness of the grundy coloring problem even for chordal and bipartite graphs.