ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 16 Jul 2017 12:32:13 +0200Way to solve max_split enumerationhttps://ask.sagemath.org/question/38283/way-to-solve-max_split-enumeration/Hello everyone,
I try to solve a problem on graphs. The graphs contain two types of nodes, a first type linked together containing max_cliques that I seek to determine. A second one connected only to the first.
For the moment I enumerate the biggest cliques of the first type, then determines for each the number of nodes of the second type related to this one. Finally I list the one with the largest number of nodes of the second type.
So I'm looking to find the biggest split graph.
Do you have an idea to improve my current way?AlexJSun, 16 Jul 2017 12:32:13 +0200https://ask.sagemath.org/question/38283/Generate Maximal subsets based on mutual/subset propertyhttps://ask.sagemath.org/question/10316/generate-maximal-subsets-based-on-mutualsubset-property/Sorry for the imprecise language - I'm not a mathematician.
Given a list/set/dict/etc., is there a function/method available that will generate subsets, with the possibility of non-null intersections, based on some user defined mutual/subset property?
E.g., given a list [0,1,2,3,4,5], generate the maximal lists such that the maximum difference within each list is 3. For the given list, the function would produce [[0,1,2,3],[1,2,3,4],[2,3,4,5]]. For the list [0,3,9,10,17,30,33], this function would produce [[0,3],[9,10],[17],[30,33]].
This is different than the usual filtering operation in that the defining property is about the returned lists/sets/etc., not just about the individual elements.
Function should work with members of ZZ, QQ, RR, RDF, CC, CDF, and others if possible.rickhg12hsThu, 04 Jul 2013 04:54:17 +0200https://ask.sagemath.org/question/10316/