# Help the engineer

**Computer Science**Level 5

For example, the network below can be optimized by removing the edge from \(1\) to \(4\):

This saves a cost of \(3\).The engineer is given this larger network to optimize. What is the total cost saved?

**Details and assumtions**

The network is represented in the text file is represented in an adjacency matrix representation. Basically, the cost from node \(x\) to node \(y\) is represented in the matrix \(A\) as \(A_{xy}\)(column \(x\), row\(y\)). \(A_{xy}=0\) if a path doesnt exist from \(x\) to \(y\).

The example network in the picture above has the following adjacency matrix representation: