Number of Ways [Help Needed]

Revision en1, by Varun12, 2022-08-18 17:42:07

Given a tree with tree nodes vertices where each vertex denotes a place in a land, find the number of ways such that exactly k vertices have an active connection. A vertex has an active connection when there is a tower in that vertex, or there is a tower in any other vertex directly connected to that vertex. Determine the total number of ways such that exactly k places have an active connection in HackerLand for each k=0,1,2,.,tree nodes. Since the answer can be large, return it modulo (10^9+7).

Tags graphs, graph theory

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Varun12 2022-08-18 17:42:07 531 Initial revision (published)