Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设您有一个只有三个字符的字母表,例如0, 1, @. 如何G = (V, E)仅使用这些字符的字符串来表示未加权(所有顶点和边的权重为 1)的无向图?
0, 1, @
G = (V, E)
你可以试试邻接矩阵。
http://en.wikipedia.org/wiki/Adjacency_matrix
也许使用 @ 来表示每个新行。
所以 100@010@001@ 将是单位矩阵