# Rules of converting a weighted digraph to an undirected graph?

What are the rules of converting a weighted digraph to a weighted, undirected graph?

I understand that the edges should go in both directions from vertex to vertex. However, do the weights of each edge to/from other edges need to be the same? If not, how does one decide which weight to attach to the undirected vertices?

For example, can this adjacency matrix representation of a weighted digraph be converted into an undirected weighted graph?

• Can you give more context to your situation? What is the purpose of the conversion? What is the problem you're trying to solve? For some problems the conversion may be trivial, for others it may be more difficult. Can we change the shape of the graph, add more vertices and edges or can we only merge existing bidirectional edges in some way? – ryan Jul 7 '17 at 2:42

Translate the program function int int (hello_) repeat end begin int into Java.