Tell me more ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Why do I find the following interaction counter-intuitive?

Graph[{L[1] \[DirectedEdge] R[1], L[2] \[DirectedEdge] R[2], R[1] \[DirectedEdge] L[2]}]
AcyclicGraphQ[%]

In the above L and R are undefined. (My actual code is in a module, and binds local L and R symbols, just to have a way of distinguishing the vertex classes in bipartite graphs.)

The answer I get is

False

At least usually. Is the function not defined for directed graphs? Is there a special DAGQ function that I haven't noticed?

share|improve this question
Is anything listed by ?*GraphQ? – cormullion Jan 27 at 16:27
Nothing that looks like a test for a DAG. Here is the output (from MMA8): AcyclicGraphQ DirectedGraphQ HamiltonianGraphQ SimpleGraphQ BipartiteGraphQ EmptyGraphQ IsomorphicGraphQ TreeGraphQ CompleteGraphQ EulerianGraphQ LoopFreeGraphQ UndirectedGraphQ ConnectedGraphQ GraphQ PathGraphQ WeightedGraphQ – Louis Jan 27 at 16:30
If none of those work, perhaps the answer is 'no'. – cormullion Jan 27 at 16:33
1  
What version of MM8 are you using? It's fixed in 8.0.1 and later. – halmir Jan 27 at 17:47
2  
I can't reproduce this in 8.0.1, 8.0.4 or 9.0.1. Did upgrading fix this problem for you? If yes, we should "close" this question. – Szabolcs Feb 11 at 21:30
show 1 more comment

closed as too localized by Szabolcs, Sjoerd C. de Vries, m_goldberg, Oleksandr R., Yves Klett Feb 14 at 7:19

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.