maximum no of edges is possible if we assign only one vertex to each component and at the last component we will assign all the vertices

we know component is a tree to each component must have a root/one vertex

4 component has 4 vertices and at 5th component we are left with 96 vertices

so maximum no. of edges = C (96,2)

=4560