Samanatha123
New member
- Joined
- May 3, 2021
- Messages
- 7
A workplace has a set of n computers that are connected in pairs by a set of m cables. The longer the cable, the more expensive it is. The engineer wants to save on cable cost, so she would like to determine the minimum total cable length that ensures that each computer has a way to communicate with any other computer. Each computer must have exactly one cable going in and one cable going out.
So what I got from this problem is that it can be solved in polynomial time by determining the shortest path that touches every vertex. This can be done with the traveling salesman reduction where it will visit each vertex once and find the minimum path. But then I realized, how would this apply to this problem if the cables have to go out and in so you would be visiting each vertex more than once. In this case, is it not NP-complete?
So what I got from this problem is that it can be solved in polynomial time by determining the shortest path that touches every vertex. This can be done with the traveling salesman reduction where it will visit each vertex once and find the minimum path. But then I realized, how would this apply to this problem if the cables have to go out and in so you would be visiting each vertex more than once. In this case, is it not NP-complete?