Thoughts Previously Thunk

We Can Represent Our Graphs as Matrices

This is an "Adjacency Matrix:" 1 represents "is connected to"
graph G {
  /* list out all the nodes */
  1;
  2;
  3;
  4;
  5;
  /* list out all the edges */
  1 -- 2;
  2 -- 3;
  2 -- 4;
  3 -- 5;
  4 -- 5;
  1 -- 5;
}
12345
111001
211110
301101
401011
510111

Essential Navigational Toolset
Back Index Forth

This page is by Foofus; send your praise and/or complaints to Foofus at Foofus d0t Net.