string - Encode a graph using a three-character language? -


suppose have alphabet 3 characters, say, 0, 1, @. how can represent unweighted (all vertices , edges have weight 1), undirected graph g = (v, e) using string of these characters?

you try adjacency matrix.

http://en.wikipedia.org/wiki/adjacency_matrix

maybe use @ represent each new line.

so 100@010@001@ identity matrix


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

post - imageshack API cURL -