Ticket #1652 (closed defect: fixed)
[with patch, with positive review] length of DAGs with loops calculation runs infinite
| Reported by: | schilly | Owned by: | mhansen |
|---|---|---|---|
| Priority: | major | Milestone: | sage-2.10.1 |
| Component: | graph theory | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
G4 has a loop: 2->4 and 4->2
G4 = DiGraph({1:[2,2,3,5], 2:[3,4], 3:[4], 4:[2,5,7], 5:[6]}, multiedges=True)
G4_path.count()
RuntimeError: maximum recursion depth exceeded
There are related issues calulating incoming_paths and possibly more in sage.combinat.graph_path!
Attachments
Change History
comment:2 Changed 5 years ago by rlm
Could you be more specific? I have no idea what G4_path is. Also, could you post a full traceback?
comment:3 Changed 5 years ago by mhansen
- Owner changed from rlm to mhansen
- Status changed from new to assigned
comment:4 Changed 5 years ago by mhansen
- Summary changed from length of DAGs with loops calculation runs infinite to [with patch, needs review] length of DAGs with loops calculation runs infinite
Note: See
TracTickets for help on using
tickets.


ah, solution is very simple: just check if G4.is_directed_acyclic() is true ;)