ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 08 Oct 2015 02:26:48 -0500hasse diagram of a subset of a posethttp://ask.sagemath.org/question/29791/hasse-diagram-of-a-subset-of-a-poset/E = {1,2,3}
P = SetPartitions(E)
This gives the set of all partitions of E,.
I have a subset Q of P and I want to construct the directed graph whose vertex set is this set Q and we draw an arrow from p to q in this graph if q covers p. How to construct this graph for a given P and Q?
The definition of covering relation can be found here : https://en.wikipedia.org/wiki/Covering_relation
Thanks for your valuable timing.Tue, 06 Oct 2015 08:39:38 -0500http://ask.sagemath.org/question/29791/hasse-diagram-of-a-subset-of-a-poset/Answer by fidbc for <p>E = {1,2,3}
P = SetPartitions(E)
This gives the set of all partitions of E,.
I have a subset Q of P and I want to construct the directed graph whose vertex set is this set Q and we draw an arrow from p to q in this graph if q covers p. How to construct this graph for a given P and Q?</p>
<p>The definition of covering relation can be found here : <a href="https://en.wikipedia.org/wiki/Covering_relation">https://en.wikipedia.org/wiki/Coverin...</a></p>
<p>Thanks for your valuable timing.</p>
http://ask.sagemath.org/question/29791/hasse-diagram-of-a-subset-of-a-poset/?answer=29795#post-id-29795 If you use your favorite search engine, you may come accross [this](https://sheaves.github.io/Partitions-and-Posets/) site.
There you can see that
P = SetPartitions(3)
f = lambda q,p: q in p.refinements()
Po = Poset((P,f))
constructs the associated poset `Po`. Then you can simply use the `subposet` method together to get the desired subposet Q. Getting the Hasse diagram for Q is just a matter of using `Q.show()`Tue, 06 Oct 2015 11:00:49 -0500http://ask.sagemath.org/question/29791/hasse-diagram-of-a-subset-of-a-poset/?answer=29795#post-id-29795Comment by GA316 for <p>If you use your favorite search engine, you may come accross <a href="https://sheaves.github.io/Partitions-and-Posets/">this</a> site.</p>
<p>There you can see that</p>
<pre><code>P = SetPartitions(3)
f = lambda q,p: q in p.refinements()
Po = Poset((P,f))
</code></pre>
<p>constructs the associated poset <code>Po</code>. Then you can simply use the <code>subposet</code> method together to get the desired subposet Q. Getting the Hasse diagram for Q is just a matter of using <code>Q.show()</code></p>
http://ask.sagemath.org/question/29791/hasse-diagram-of-a-subset-of-a-poset/?comment=29821#post-id-29821it works nicely.thanks.Thu, 08 Oct 2015 02:26:48 -0500http://ask.sagemath.org/question/29791/hasse-diagram-of-a-subset-of-a-poset/?comment=29821#post-id-29821