Ticket #6000 (closed enhancement: fixed)

Opened 16 months ago

Last modified 15 months ago

[with patch, positive review] Sets enumerated by exploring a search space with a (lazy) tree or graph structure

Reported by: nthiery Owned by: nthiery
Priority: major Milestone: sage-4.0.1
Component: combinatorics Keywords: enumerate sets, depth first search, ideal of a relation
Cc: sage-combinat Author(s): Nicolas Thiery
Report Upstream: Reviewer(s): Rob Beezer
Merged in: 4.0.1.alpha0 Work issues:

Description (last modified by nthiery) (diff)

This patches extend the sage.combinat.backtrack library with other generic tools for constructing large sets whose elements can be enumerated by exploring a search space with a (lazy) tree or graph structure.

  • SearchForest?: Depth first search through a tree descrived by a child function
  • GenericBacktracker?: (was readilly there) Depth first search through a tree descrived by a child function, with branch pruning, ...
  • TransitiveIdeal?: Depth first search through a graph described by a neighbours relation
  • TransitiveIdealGraded?: Breath first search through a graph described by a neighbours relation

Todo: the names are crappy and inconsistent, because they come from different point of views. We need to find a good naming scheme!!!

Do we want to emphasize the underlying graph/tree structure? The branch&bound aspect? The transitive closure of a relation point of view?

Todo: which interface do we want:

The code needs to be standardized once the choice is done.

Attachments

transitive_ideal-6000-submitted.patch Download (14.5 KB) - added by nthiery 16 months ago.
trac_6000_reviewer.patch Download (6.9 KB) - added by rbeezer 16 months ago.
Apply on top of main patch

Change History

Changed 16 months ago by nthiery

Changed 16 months ago by nthiery

  • description modified (diff)
  • summary changed from Sets enumerated by exploring a search space with a (lazy) tree or graph structure to [with patch, needs review] Sets enumerated by exploring a search space with a (lazy) tree or graph structure

Changed 16 months ago by nthiery

  • status changed from new to assigned

Changed 16 months ago by rbeezer

Apply on top of main patch

Changed 16 months ago by rbeezer

  • summary changed from [with patch, needs review] Sets enumerated by exploring a search space with a (lazy) tree or graph structure to [with patch, positive review] Sets enumerated by exploring a search space with a (lazy) tree or graph structure

Passes tests: ./sage -t devel/sage-backtrack/sage/combinat/

Reviewer patch adds two doctests, and some general cleanup, so apply on top of the main patch.

In the case of a search tree (not a graph), options for "leaves only" would be useful. Then the generators could be checked for a first element when using a search tree for existence questions.

Building a single function to call these routines as variants might ease the question of names and interfaces.

Positive review.

Changed 15 months ago by mhansen

  • status changed from assigned to closed
  • resolution set to fixed

Merged in 4.0.1.alpha0.

Changed 15 months ago by mhansen

  • reviewer set to Rob Beezer
  • merged set to 4.0.1.alpha0
  • author set to Nicolas Thiery
Note: See TracTickets for help on using tickets.