Opened 4 years ago

Closed 4 years ago

#22281 closed defect (duplicate)

Error is is_prime for graphs

Reported by: kcrisman Owned by:
Priority: minor Milestone: sage-duplicate/invalid/wontfix
Component: graph theory Keywords:
Cc: Merged in:
Authors: Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by jhpalmieri)

This report on sage-devel purports to have a bug in this method. I haven't checked this myself because it depends on an optional package.

g1=Graph({0:[1,4],1:[0,2,4],2: [1,3,4],3:[2],4:[0,1,2]});g2=Graph({0:[1],1:[0,2,4],2:[1,3,4 ],3:[2,4],4:[1,2,3]});; 
#[1,4] is a module of g1 so g1 is not prime 
#[2,4] is a module of g2 so g2 is not prime 
g2.is_isomorphic(g1), g1.is_prime(),g2.is_prime() 

This is a counter-example with two isomorphic graphs g1 and g2 on
5 vertices giving two different results with the function "is prime". 

Change History (3)

comment:1 Changed 4 years ago by jhpalmieri

  • Description modified (diff)

comment:2 Changed 4 years ago by dcoudert

sage: g1.is_prime()
RuntimeError                              Traceback (most recent call last)
RuntimeError: In order to use this method you must install the modular_decomposition package

The modular_decomposition optional package is known to have a bug. See #13744.

comment:3 Changed 4 years ago by jdemeyer

  • Milestone changed from sage-7.6 to sage-duplicate/invalid/wontfix
  • Resolution set to duplicate
  • Reviewers set to Jeroen Demeyer
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.