Farmer Raju has been elected mayor of his town!! One of his campaign promises was to bring internet connectivity to all farms in the area. He need someone help, of course.
Raju ordered a high speed connection for his farm and is going to share his connectivity with other farmers. To minimize cost, he wants to lay the minimum amount of optical fiber to connect his farm to all the other farms. Given a list f how much fiber it takes to connect each pair of farms, problem is to find out minimum amount of fiber needed to connect them all together. Each farm must connect to some other farm such that a packet can flow from any one farm to any other farm.