Ask Your Question

Shariff's profile - activity

2023-07-31 03:17:14 +0100 received badge  Famous Question (source)
2023-07-15 04:33:56 +0100 received badge  Notable Question (source)
2022-01-13 11:36:37 +0100 received badge  Popular Question (source)
2021-02-23 21:46:05 +0100 received badge  Notable Question (source)
2020-09-06 10:39:03 +0100 received badge  Popular Question (source)
2020-04-29 19:55:30 +0100 received badge  Popular Question (source)
2017-07-31 22:23:46 +0100 received badge  Popular Question (source)
2016-12-09 19:57:46 +0100 received badge  Student (source)
2013-11-11 15:15:03 +0100 commented question png scale of Posets and order from left ro right

I am very new with Sage, some insight for this question will be nice. It is important for me...

2013-11-11 15:13:50 +0100 commented answer How to plot O(P) of a Poset P in sage?

Hello again, can you please check if you can answer my question about the png scale? This one: http://ask.sagemath.org/question/3194/png-scale-of-posets-and-order-from-left-ro-right It is important for me. Thanks @tmonteil

2013-11-09 10:33:41 +0100 asked a question png scale of Posets and order from left ro right

Hi to all,

I am doing a project with Posets in Sage. What I want is to create Posets and O(P) to view a pattern based on the created (png) Posets, so that I can generalize the behavior of O(P). I have created the Posets, but it changes the order of the numbers in the Poset, which makes difficult to see the pattern. ( I cant upload images because of my Karma... :/)

For example, the labeling of the posets go, from left to right (when there are more nodes):

level           Poset (connected)                   
  2                 4

  1             3       2

  0                 1

1- How I can force to draw the picture (the png) to go in the ascending order, from left to right?

Also, when the posets have 12 or more elements, they are not readable, the labels are inserted inside the others...

2- How I can change the scale of the nodes and the scale of the arrows to be more readable??

Thak you!

Note: I am using

   x = P2.plot() # P2 is a Poset
   x.save("myfile.png") # save the Poset
2013-10-01 16:55:26 +0100 asked a question Posets O(P) Algorithm, how to?

Hi!

I an new here :). I am doing some work with Posets, and I want to create O(P) given a Poset P. The idea is to give a graphic representation. I want to use sage for this (it has the functions for it). But, The graphical representation is bad (It does not show the elements of the poset, just a number, it represents the structure though).

We (we are a team) implemented something in php (to have it online). Now we want to implement O(P) (We have how to construct P) so that we can see in each node the corresponding element. Can anyone tell me how to do this? or where I can find an algorithm or the source code in sage? What I want is (in sage):

P = Poset((divisors(12), attrcall("divides")), facade=True)
A = P.directed_subsets('up')
L = sorted(list(A))
PP = Poset(([Set(s) for s in L], attrcall("issubset")))
PP._hasse_diagram.plot()

(If there is a way to see the elements with PP._hasse_diagram.plot() will be appreciated.)

Where I can find the source code or (better I think) an algorithm to create O(P) in an efficient way? For example, how to calculate the antichains (if this helps) to create each element (each down-set) of O(P) and then how to create O(P)?

2013-09-29 23:33:04 +0100 commented answer How to plot O(P) of a Poset P in sage?

Woow thanks! But now I have another question. For the sake of clarity, Ill paste my code: P = Poset((divisors(12), attrcall("divides")), facade=True) A = P.directed_subsets('up') L = sorted(list(A)) PP = Poset(([Set(s) for s in L], attrcall("issubset"))) PP._hasse_diagram_.plot() Is There a way to see the elements of the Poset PP in the hasse diagram?? I mean each element in the Poset as a node in the png created by the call PP._hasse_diagram_.plot() @tmonteil

2013-09-29 23:31:12 +0100 received badge  Supporter (source)
2013-09-27 22:03:42 +0100 asked a question How to plot O(P) of a Poset P in sage?

Hello,

I just installed sage. I want to use it to do some things with Posets for my Modern ALgebra Class. For example, I want to use it to compute and plot the O(P) of a poset P. (The Poset of the order ideals of P).

1- Where I can find examples of how to construct Posets? I know that in the references they are some examples, but is there some type of tutorial with Posets or pdf with examples?

2- How I can plot O(P)? I know that there is a method called P.directed_subsets('down') to compute the down sets of P. The problem is that this method returns a List... So I can't plot a hasse diagram of it... For example:

 P = Poset((divisors(12), attrcall("divides")), facade=True)
 A = P.directed_subsets('up')
 sorted(list(A))
 [[], [1, 2, 4, 3, 6, 12], [2, 4, 3, 6, 12], [2, 4, 6, 12], [3, 6, 12], [4, 3, 6, 12], [4, 6, 12], [4, 12], [6, 12], [12]]

3- I dont understand the order_ideals method. What are the parameters of this function??

Thanks!!

Note: As you see, I am very new here, some insight of how to work with sage is appreciated!

2013-08-30 17:01:58 +0100 asked a question error in Posets examples (order ideal function)

Hi!

I am very new here! :) I am trying to use sage to work with posets and lower sets (order ideal I think it is the same). My sage version is 5.4.1. I want all the lower sets of a Poset P, for example. I found in an example this:

 P = Poset((divisors(12), attrcall("divides")), facade=True)
 A = P.directed_subsets('up')
 sorted(list(A))
 [[], [1, 2, 4, 3, 6, 12], [2, 4, 3, 6, 12], [2, 4, 6, 12], [3, 6, 12], [4, 3, 6, 12], [4, 6, 12], [4, 12], [6, 12], [12]]

That looks like what I want! BUT, when I run the example in my sage it gives me an error!:

sage: P = Poset((divisors(12), attrcall("divides")), facade=True)
sage: A = P.directed_subsets('up')
AttributeError                            Traceback (most recent call last)

/Users/edwardo/<ipython console> in <module>()

/Applications/sage/local/lib/python2.7/site-packages/sage/structure/parent.so in sage.structure.parent.Parent.__getattr__ (sage/structure/parent.c:5969)()

/Applications/sage/local/lib/python2.7/site-packages/sage/structure/misc.so in sage.structure.misc.getattr_from_other_class (sage/structure/misc.c:1427)()

AttributeError: 'FinitePoset_with_category' object has no attribute 'directed_subsets'

It looks like 'directedsubsets' does not work... Why it does not work?? How I can fix this? I have to download a library or something?? Here is the link to the example:

  http://www.sagemath.org/doc/reference/categories/sage/categories/finite_posets.html

Help! Thanks!