Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have never taken any formal classes in graph theory, but I have recently been using a number of graph theory concepts in my daily work. One area that I have not seen much work on, however, is analysis of multiple graphs constructed from the same nodes but with different edges. For example, take the first five letters of the alphabet and the underline (_) representing a space.

We can make the following image representing the phrase "a bad bed":

A simple graph of "a_bad_bed"

where the colors represent different structural elements.

  • Black = alphabetical order
  • Green = first word "a" plus termination indicator "_"
  • Red = second word "bad" plus termination indicator "_"
  • Blue = third word "bed"

Given a graph like this, I would like to do things like construct a graph consisting of selected subgraphs; in this case they would be "a", "bad", and "bed", but the concept should be general. Or, I would like to be able to examine properties of specific subgraphs without having to create duplicate nodes. For example, if you assign a number to each letter based on the alphabetical order, I would like to be able to examine aspects of the numbers associated with each subgraph. Keep in mind that this is just a generic description, I'm working with physical processes, not linguistics.

I have looked into nested heirarchical graphs and many other areas, but nothing quite fits what I'm going for and I don't know enough of the theory even to be able to tell if I'm using the correct language. Does anyone have any suggestions of where I should look?

share|cite|improve this question
This is an odd thing to think of as a graph, in that they are really paths through the letters, rather than graphs. Yes, paths are a type of directed graph, but they are a very particular type. How many edges would be between $d$ and $e$ in your graph representation of the word "ceded"? I think you need to be clearer about your example. – Thomas Andrews Dec 9 '11 at 20:23
For another example, the graph you'd get from "abacab" would have directed edges (a,b), (b,a), (a,c), and (c,_). But you cannot reconstruct the word from the graph because the graph for $acabab$ is the same, even if you add multiple edges for each pair of letters. – Thomas Andrews Dec 9 '11 at 20:39
Yes, I could have been more explicit in my example; I was simply trying to keep things generic. What I am actually working with is material movement in a factory. I want to have one representation of the plant, but I want be able to query that representation so as to know whether material moves from Scale A to Forklift B to Pallet C; or from Room 100 to Room 120 depending on whether I am interested in equipment or rooms in any particular instance. – AdamRedwine Dec 9 '11 at 21:01
Part of my difficulty is that I am associating numbers to specific locations and I want to be able to do things like ask how many jugs of milk that are weighed on Scale A end up in Room 160. – AdamRedwine Dec 9 '11 at 21:02
This is more of a relational database thing than a graph theory thing. You have rooms, items, and other types of relationships (was weighed at.) You are definitely talking about paths for your movable items, rather than graphs, because a graph of the transitions of an item from room to room doesn't include the order of the transitions. – Thomas Andrews Dec 9 '11 at 21:46
up vote 1 down vote accepted

I think you should look at

1) Finite state machines:

2) Petri nets:

For programming puposes I recommended you to consider this libraries

1) For C++

2) For C#

3) For Java

share|cite|improve this answer
Thanks. So far I've been working with networkx and Python(x,y) but I'll check out those sources. – AdamRedwine Dec 9 '11 at 19:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.