Answered step by step
Verified Expert Solution
Question
1 Approved Answer
There are n houses in a village and we want to supply internet to each house by locating modems at each house or providing
There are n houses in a village and we want to supply internet to each house by locating modems at each house or providing cable to another house which has a modem (this may be wifi/microwave link if long distance). However the modems have a high price and the size varies due to different usage at that house and t cost of laying of cable varies between houses due to distance. Once a house has a modem with router, other houses may be connected to this Describe in pseudo code an algorithm that will have: 1. Input: the cost (size) of the modem for each house and the cost of cable between any pair of houses as a list of lists [houset, house2, cost] and provide the optimum construction. 2. Output: is a list length n where list int]}] plus total cost. [{house[modem boolean, houseLinkedTo: int, cost :
Step by Step Solution
★★★★★
3.42 Rating (168 Votes )
There are 3 Steps involved in it
Step: 1
To solve this problem you can use a greedy algorithm known as Kruskals Algorithm for findi...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started