Ticket #9727 (closed enhancement: wontfix)

Opened 3 years ago

Last modified 3 years ago

RepresentationGraph method that generalizes IntervalGraph

Reported by: edward.scheinerman Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: graph theory Keywords:
Cc: ncohen Work issues:
Report Upstream: N/A Reviewers:
Authors: Ed Scheinerman Merged in:
Dependencies: Stopgaps:

Description

This patch creates a new graph constructor called RepresentationGraph?. This method generalizes IntervalGraph?.

Attachments

trac_9727.patch Download (10.3 KB) - added by edward.scheinerman 3 years ago.

Change History

comment:1 Changed 3 years ago by edward.scheinerman

The old IntervalGraph? method did not permit the same interval to be used twice for different vertices (and gave an erroneous result in some cases). The new IntervalGraph? method in this patch fixes those issues.

comment:2 Changed 3 years ago by ncohen

  • Cc ncohen added

comment:3 Changed 3 years ago by ncohen

  • Status changed from new to needs_work

Changed 3 years ago by edward.scheinerman

comment:4 Changed 3 years ago by edward.scheinerman

  • Status changed from needs_work to needs_review

Hello. This latest version of the patch now passes all tests!

comment:5 Changed 3 years ago by ncohen

  • Status changed from needs_review to needs_info

Hmmm.. I know that I would never had noticed it had I not been working on Sage's graphs for a long time, but it looks like what RepresentationGraph? does is already a feature of the Graph constructor : it is illustrated as the third example of Graph?. What do you think we should do in this case ? Clearly, this information is not very easy to get, and my method IntervalGraph? should just call this constructor instead of doing the same job again (though we can slightly optimise if we know it is an interval graph)... Well, what do you think ? :-/

Nathann

comment:6 Changed 3 years ago by edward.scheinerman

Interesting, but the Graph constructor works differently and does not provide all the functionality that GraphRepresentation? does. For example, it will not solve the problem of repeated intervals being recognized as separate vertices (but with the same closed neighborhoods). It will also not accept a dictionary instead of a list as we have set up in RepresentationGraph?.

One solution might be to rework the Graph() constructor to accept a [dictionary,function] pair. In that case, the vertices would be the keys of the dictionary. Two vertices would be adjacent if the function, applied to the values associated with two keys, returns True. How difficult would that be? If easy, then that may be a preferable route. If difficult, then I prefer this route.

It is true that if one sorts the intervals before iterating over pairs, some speed up can be realized (especially for a sparse interval graph); but this efficiency comes at a cost of some generality. Also, for a random interval graph, the speedup will not be so dramatic as these random graphs are dense.

Ed

comment:7 Changed 3 years ago by edward.scheinerman

  • Status changed from needs_info to needs_review

comment:8 Changed 3 years ago by edward.scheinerman

  • Owner jason, ncohen, rlm deleted

I withdraw this ticket. A new version of IntervalGraph? is posted as tickect #9862. RepresentationGraph? is probably not needed as its functionality is (mostly) available in the Graph() constructor. Modifications to Graph() to accept [dictionary,function] may be forthcoming at a later date.

comment:9 Changed 3 years ago by edward.scheinerman

  • Owner set to edward.scheinerman

comment:10 Changed 3 years ago by edward.scheinerman

  • Owner edward.scheinerman deleted

comment:11 Changed 3 years ago by ddrake

  • Status changed from needs_review to closed
  • Resolution set to wontfix

Ed has request that this ticket be closed. He sent an email that said:

Dear Sage Manager:

A few weeks ago I posted Trac ticket #9727 entitled "RepresentationGraph method
that generalizes IntervalGraph". Since that time, working with Nathann Cohen, I
posted an alternative, more focused solution to minor glitches in the
IntervalGraph method. Further, the RepresentationGraph method functionality is
partially already present in the Graph() constructor and I am considering a
direct enhancement of Graph() at some future time to add a bit more
functionality.

So, to make a long story short, I would like to cancel my posting of 9727, but I
don't see how to do that in Trac. Can you please do this for me?

Thanks,

Ed Scheinerman

I'm setting this as "wontfix" since it seems like they, well, won't use this enhancement and work on things later.

comment:12 Changed 3 years ago by mvngu

  • Milestone set to sage-duplicate/invalid/wontfix
Note: See TracTickets for help on using tickets.