Opened 3 years ago

Closed 3 years ago

#27966 closed defect (fixed)

Set chromatic polynomial of looped graph to zero

Reported by: Samuel Lelièvre Owned by:
Priority: major Milestone: sage-8.9
Component: graph theory Keywords: beginner
Cc: Samuel Lelièvre, David Coudert Merged in:
Authors: Matt Torrence Reviewers: Samuel Lelièvre
Report Upstream: N/A Work issues:
Branch: e7e5e8a (Commits, GitHub, GitLab) Commit: e7e5e8aba566951b4244399e31b4f81a8c187658
Dependencies: Stopgaps:

Status badges

Description (last modified by Samuel Lelièvre)

The chromatic polynomial of a looped graph should be zero.

Initially reported by Ask Sage user "luis":

Change History (8)

comment:1 Changed 3 years ago by Samuel Lelièvre

Keywords: beginner added

For anyone looking for a beginner ticket, this should be fairly easy.

comment:2 Changed 3 years ago by Erik Bray

Milestone: sage-8.8

As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).

comment:3 Changed 3 years ago by Dima Pasechnik

Cc: David Coudert added
Milestone: sage-8.9

OK, we can indeed check for presence of a loop, and set the chromatic number to 0.

comment:4 Changed 3 years ago by Matt Torrence

Branch: u/gh-Torrencem/27966_graph_loop_chrom
Commit: e7e5e8aba566951b4244399e31b4f81a8c187658
Status: newneeds_review

This change updates G.chromatic_polynomial() to give 0 (in ZZ['x']). chromatic_number() already raises a ValueError when G has loops=True, so it isn't strictly necessary to change that.


New commits:

e7e5e8a27966: Chromatic Polynomial for graphs with loops is 0

comment:5 Changed 3 years ago by Samuel Lelièvre

Description: modified (diff)
Summary: set chromatic number of looped graph to zeroSet chromatic polynomial of looped graph to zero

Please fill in author name.

comment:6 Changed 3 years ago by Matt Torrence

Authors: Matt Torrence

comment:7 Changed 3 years ago by Samuel Lelièvre

Description: modified (diff)
Reviewers: Samuel Lelièvre
Status: needs_reviewpositive_review

Thanks.

comment:8 Changed 3 years ago by Volker Braun

Branch: u/gh-Torrencem/27966_graph_loop_chrome7e5e8aba566951b4244399e31b4f81a8c187658
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.