Topics in Theoretical Computer Science: An Algorithmist’s Toolkit | Mathematics | MIT OpenCourseWare

https://ocw.mit.edu/courses/mathematics/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/

Advertisements

mathematica graphing a 2 by 2 matrix as an object

is there a possibility to “transform” a matrix (inheriting the input-output “weights”) into a graph object inheriting the matrix relations?

you can convert it to an edge-weighted graph using WeightedAdjacencyGraph. This will give you a complete graph (a Graph expression) in which each vertex is also connected to itself. I am not sure how much sense it makes treat this matrix as a graph, given the full connectivity.

Since you have a fully connected graph, it does not matter in your case, but be aware that WeightedAdjacencyGraph represents missing edges with Infinity, not with zero. This is somewhat annoying because it is inconsistent with WeightedAdjacencyMatrix, which uses 0. While Infinity does make sense in some (not all) applications, it is much more common to see data that uses 0.

 

 

 

via [✓] Convert matrix into “Graph object”? – Online Technical Discussion Groups—Wolfram Community