Graphs and enhancing Maple multiplication

  • Authors:
  • David R. Cecil

  • Affiliations:
  • College of Arts and Sciences Rongdong Wang, Department of Mathematics Texas A&M University - Kingsville 700 University Boulevard Kingsville, Texas

  • Venue:
  • Mathematics and Computer Education
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

Counting the number of paths in a graph is easily accomplished using powers of the adjacency matrix for the graph, while enumerating these paths is difficult. There appears to be only one technique, Floyd's algorithm [1], whose end result can be used, with a considerable amount of paper and pencil manipulation, to actually list in order the vertices that make up each path. Even so, Floyd's algorithm is used only to find shortest paths. This paper describes a technique in Maple that automatically prints out all paths of any desired length, along with the name of each vertex, proceeding in order from start (beginning vertex) to finish (ending vertex). This is accomplished by defining a new matrix multiplication that produces all paths, with the option of listing only the simple ones; can handle alphanumeric entries; and eliminates the clustering of parentheses and messy output obtained when using ordinary matrix multiplication with alphabetic entries.