Message Boards Message Boards

4 Replies
2 Total Likes
View groups...
Share this post:

Partially ordered graphs like Dynkin diagrams ?

Posted 9 years ago

Hello everyone,

I'm looking for a way to draw partially ordered graphs with multiple edges in Mathematica : typically, I would like to draw Dynkin diagrams.

More precisely, this is the property of the graph I'm trying to construct :

  • The graph can have simple and/or multiple edges
  • If an edge is simple, then it is undirected
  • If an edge is multiple, then it is directed

Typical exemples of such diagrams can be seen on this page.

I tried with Graph, AdgencyGraph and GraphPlot, but I did'nt work out a solution. Does anyone have an idea ? Thanks.

POSTED BY: Sylvain Lacroix
4 Replies

Can you show the code that you have tried? The Graph supports mixed directed / undirected and multi-edges, so it is not impossible.

Graph[RandomChoice[{Style[#1 -> #2, Red], #1 <-> #2}] & @@@ RandomInteger[{1, 5}, {30, 2}]]

enter image description here

POSTED BY: Sam Carrettie

First of all, thank you for your answer.

I simply tried Graph[{1 -> 2, 2 <-> 3}] and I have this error message : Graph::supp: Mixed graphs and multigraphs are not supported. I tried copying exactly you code and I have the same error.

Could it be some problem of version : I have Mathematica 9.0 student edition. I'll try to install the last version, but I only have a student licence (I've read that there was a few things that weren't included in the student version, maybe this is one of them).

POSTED BY: Sylvain Lacroix

Yes, indeed, mixed graphs and multigraphs appeared only in the (currently latest) version 10.

POSTED BY: Sam Carrettie
Posted 9 years ago

I installed the version 10 : now it works. Thank you for your help.

POSTED BY: Updating Name
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract