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.Sat, 05 Sep 2020 13:25:44 +0200Computing maximal acyclic matchingshttps://ask.sagemath.org/question/53313/computing-maximal-acyclic-matchings/Hi, Is there a function to compute the maximal acyclic (Morse) matching (defined below) of a given finite poset?
A matching M in a poset X is a subset M of X x X such that:
1) if (x, y) is in M, then x is an immediate predecessor of y (x<y and there is no element z such that x<z<y)
2) each element x of X belongs to at most one element in M.
In order to represent the matching on the associated Hasse Diagram of the poset, we just reverse the arrows which are not in the matching. The matching is acyclic (Morse) if the matching represented on its Hasse Diagram is acyclic.
By maximal matching I mean one with the maximal number of elements.
Any help would be appreciated.daltopSat, 05 Sep 2020 13:25:44 +0200https://ask.sagemath.org/question/53313/Maximal matching of a posethttps://ask.sagemath.org/question/53301/maximal-matching-of-a-poset/ Hi,
I would like to know how to find a maximal matching (defined below) of a given finite poset.
A matching M in a poset X is a subset M of X x X such that:
1) if (x, y) is in M, then x is an immediate predecessor of y (x<y and there is no element z such that x<z<y)
2) each element x of X belongs to at most one element in M.
A matching of a poset is the same as a matching of its Hasse Diagram. I thought about using the matching() function for graphs, however, it seems that the Hasse diagram of a poset is a Digraph for Sage and so the matching function does not work.
By maximal matching I mean one with the maximal number of elements.
Any help would be appreciated.
daltopFri, 04 Sep 2020 13:55:52 +0200https://ask.sagemath.org/question/53301/Find the induced matchinghttps://ask.sagemath.org/question/50719/find-the-induced-matching/An induced matching in a graph G is a set of edges, no two of which meet a common node or are joined by an edge of G; that is, an induced matching is a matching which forms an induced subgraph.
Would you please tell me how I can find the max induced matching in a graph?salamMon, 13 Apr 2020 14:28:34 +0200https://ask.sagemath.org/question/50719/find all matchings in a graphhttps://ask.sagemath.org/question/46964/find-all-matchings-in-a-graph/ Given a graph $G$, is it possible to ask Sage to generate all possible matchings of $G$? I know that G.matching() gives a maximum matching of $G$ and I also know that Sage has an iterator which finds all perfect matchings of $G$.
If no command exists which asks Sage to give me all possible matchings of $G$, does anyone have an idea of how to write a program to ask Sage to do this?merluzaSat, 22 Jun 2019 00:05:51 +0200https://ask.sagemath.org/question/46964/Pattern matching in differential equationshttps://ask.sagemath.org/question/10452/pattern-matching-in-differential-equations/We have the following functional equation:
f(x*y)+f(x*(1-y))+f((1-x)*y)+f((1-x)*(1-y)) == f(x)+f(1-x)+f(y)+f(1-y)
Differentiating by x then y we get a second order differential equation which contains the pattern g(t)=f'(t)+tf''(t) three times with different expressions for t.
How can I change the occurences of the patterns to the appropriate g(.)?
czsanSun, 18 Aug 2013 11:04:58 +0200https://ask.sagemath.org/question/10452/