Let’s say we have 8 houses. We want to setup telephone lines between these houses. The edge between the houses represent the cost…