[sage-combinat-devel] Re: King Tableaux
Thank you Bruce!! Indeed the function looks tidier. The third function gives me this message: "". The 'p' is supposed to mean the partition right? Once again thank you for your help. I really appreciate it! -Soheli On Sunday, March 8, 2020 at 5:26:41 AM UTC-4, Bruce wrote: > > Thank you for helping me. I created the function: > > sage: def is_king_tableau(t,no_of_rows): > : for i in range(no_of_rows): > : if t[0][0] != 1: > : return False > : elif t[i][0] <= 2*i: > : return False > : else: > : i=i+1 > : return True > > > I have tidied up your function and written some simple functions to show > how it is used. > I hope this will encourage you to learn more about Python, make further > improvements and write your own functions. > > The last three lines are not a function but use the iterator to show the > motivation for the definition of a King tableau. > > def is_king_tableau(t): > """A function which tests if a semistandard tableau is a King > tableau.""" > if t[0][0] != 1: > return False > for i, row in enumerate(t): > if row[0] <= 2*i: > return False > return True > > def no_of_king_tableaux(p): > """A function which finds the number of King tableaux of given > shape.""" > return len([t for t in SemistandardTableaux(p) if is_king_tableau(t)]) > > def king_tableaux(p): > """An iterator for the set of King tableaux of given shape.""" > for t in SemistandardTableaux(p): > if is_king_tableau(t): > yield t > > for t in king_tableaux([2,2]): > t.to_Gelfand_Tsetlin_pattern().pp() > print "\n" > -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-combinat-devel/b8bcad0c-2683-4378-b93c-83be180877dd%40googlegroups.com.
Re: [sage-combinat-devel] Re: Image of a permutation
> Oops. Certainly 2 is fixed, so, doesn't belong to the support. > Deserves a ticket, IMHO. Ouch. Indeed! Nicolas -- Nicolas M. Thiéry "Isil" http://Nicolas.Thiery.name/ -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-combinat-devel/20200308172221.GG3535%40mistral.
[sage-combinat-devel] Re: Image of a permutation
On 2020-03-08, David Joyner wrote: > On a tangential matter, I'd like to add that > according to Dan Bump's notes "Group Representation > Theory" (http://sporadic.stanford.edu/bump/group/gr1_4.html), > this set of elements that the permutations does not > fix is called the support. Exactly. > If that is true then the SageMath > support does not seem to be implemented correctly: > > sage: G = SymmetricGroup(10) > sage: g = G.random_element(); g > (1,3,6,7,4)(5,8,9) > sage: g.support() > {1, 2, 3, 4, 5, 6, 7, 8} Oops. Certainly 2 is fixed, so, doesn't belong to the support. Deserves a ticket, IMHO. Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-combinat-devel/r42jc7%24387h%242%40ciao.gmane.io.
[sage-combinat-devel] Re: Image of a permutation
On 2020-03-08, David Joyner wrote: > I agree with Michael O, a permutation is a bijection, > so the image is the domain is the codomain. +1 > For a patch to "define the image of a permutation > to be the set of elements that it does not fix" is a > mistake, IMHO. Maybe the set computed could be > called "moved_points" or something like that? Isn't that called the "support" of the permutation? Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-combinat-devel/r42j8j%24387h%241%40ciao.gmane.io.
[sage-combinat-devel] Re: King Tableaux
Thank you for helping me. I created the function: sage: def is_king_tableau(t,no_of_rows): : for i in range(no_of_rows): : if t[0][0] != 1: : return False : elif t[i][0] <= 2*i: : return False : else: : i=i+1 : return True I have tidied up your function and written some simple functions to show how it is used. I hope this will encourage you to learn more about Python, make further improvements and write your own functions. The last three lines are not a function but use the iterator to show the motivation for the definition of a King tableau. def is_king_tableau(t): """A function which tests if a semistandard tableau is a King tableau.""" if t[0][0] != 1: return False for i, row in enumerate(t): if row[0] <= 2*i: return False return True def no_of_king_tableaux(p): """A function which finds the number of King tableaux of given shape.""" return len([t for t in SemistandardTableaux(p) if is_king_tableau(t)]) def king_tableaux(p): """An iterator for the set of King tableaux of given shape.""" for t in SemistandardTableaux(p): if is_king_tableau(t): yield t for t in king_tableaux([2,2]): t.to_Gelfand_Tsetlin_pattern().pp() print "\n" -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-combinat-devel/9bda4593-6717-4b51-a5a4-1aa2bfc00e0c%40googlegroups.com.
Re: [sage-combinat-devel] Image of a permutation
On Sun, Mar 8, 2020 at 5:13 AM David Joyner wrote: > > > On Sun, Mar 8, 2020 at 4:58 AM Samuel Lelièvre > wrote: > >> Dear sage-combinat-devel, >> >> Please share any insight on this question >> about the image of a permutation: >> >> https://groups.google.com/d/msg/sage-devel/kk1C8LrSOTU/8W1r7LIPAgAJ >> >> > I agree with Michael O, a permutation is a bijection, > so the image is the domain is the codomain. > For a patch to "define the image of a permutation > to be the set of elements that it does not fix" is a > mistake, IMHO. Maybe the set computed could be > called "moved_points" or something like that? > > On a tangential matter, I'd like to add that according to Dan Bump's notes "Group Representation Theory" (http://sporadic.stanford.edu/bump/group/gr1_4.html), this set of elements that the permutations does not fix is called the support. If that is true then the SageMath support does not seem to be implemented correctly: sage: G = SymmetricGroup(10) sage: g = G.random_element(); g (1,3,6,7,4)(5,8,9) sage: g.support() {1, 2, 3, 4, 5, 6, 7, 8} sage: g = G.random_element(); g (1,6)(2,8)(3,9,10)(5,7) sage: g.support() {1, 2, 3, 4, 5, 6, 7, 8, 9} This is in sage 9.0b3. > >> Kind regards, >> Samuel Lelièvre >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sage-combinat-devel" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to sage-combinat-devel+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/sage-combinat-devel/CAEcArF1rkKgNxh5AfZJzLcQj0FeYSS7j6tHSVHvjJtRMvzgYDg%40mail.gmail.com >> . >> > -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-combinat-devel/CAEQuuAVjoKsvdZrqoFdbCXZ%2BtknsgeDjiEkSKE5BZG8SMBqhwA%40mail.gmail.com.
Re: [sage-combinat-devel] Image of a permutation
On Sun, Mar 8, 2020 at 4:58 AM Samuel Lelièvre wrote: > Dear sage-combinat-devel, > > Please share any insight on this question > about the image of a permutation: > > https://groups.google.com/d/msg/sage-devel/kk1C8LrSOTU/8W1r7LIPAgAJ > > I agree with Michael O, a permutation is a bijection, so the image is the domain is the codomain. For a patch to "define the image of a permutation to be the set of elements that it does not fix" is a mistake, IMHO. Maybe the set computed could be called "moved_points" or something like that? > Kind regards, > Samuel Lelièvre > > -- > You received this message because you are subscribed to the Google Groups > "sage-combinat-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-combinat-devel+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-combinat-devel/CAEcArF1rkKgNxh5AfZJzLcQj0FeYSS7j6tHSVHvjJtRMvzgYDg%40mail.gmail.com > . > -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-combinat-devel/CAEQuuAU8R70Z6D_%2B0PjF43opdo6YiEh%2BvK7yXoTEmkUdbS1GQQ%40mail.gmail.com.
[sage-combinat-devel] Image of a permutation
Dear sage-combinat-devel, Please share any insight on this question about the image of a permutation: https://groups.google.com/d/msg/sage-devel/kk1C8LrSOTU/8W1r7LIPAgAJ Kind regards, Samuel Lelièvre -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-combinat-devel/CAEcArF1rkKgNxh5AfZJzLcQj0FeYSS7j6tHSVHvjJtRMvzgYDg%40mail.gmail.com.