Re: [sage-combinat-devel] Re: King Tableaux

2020-03-13 Thread Soheli Das
Hello all, I wanted to thank everyone who helped me with the King Tableau functions. I've everything figured out now. I debugged all the functions and all are working properly. I'm getting my desired output, the functions are outputting the correct king tableaux. Once again, thank you for all yo

Re: [sage-combinat-devel] Re: King Tableaux

2020-03-12 Thread Soheli Das
You were right. I debugged is_king_tableau and found a minor fault in it. I fixed it like this: def is_king_tableau(t): """A function which tests if a semistandard tableau is a King tableau.""" if SemistandardTableau(t): if t[0][0] < 1: return False """checks tabl

Re: [sage-combinat-devel] Re: King Tableaux

2020-03-11 Thread Nicolas M. Thiery
Right I forgot about it. Take a semi standard tableau that is in the resulting list and should not be there (or the converse). Apply is_king_tableau. If the result is not as expected, then it's time to debug is_king_tableau. If the result is as expected, then something went wrong with how you us

Re: [sage-combinat-devel] Re: King Tableaux

2020-03-11 Thread Soheli Das
But now I'm using the tidied function given by Bruce: 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 T

Re: [sage-combinat-devel] Re: King Tableaux

2020-03-11 Thread Nicolas M. Thiery
> I have checked out the iterators thematic tutorial and I must say, it's > really helpful. Thank you for recommending that. Glad to hear :-) > Seems like the is_king_tableau throws away the tableaux that have 2 > in the 2nd-row 1st column. After that, it displays all other > tableaux. I trie

Re: [sage-combinat-devel] Re: King Tableaux

2020-03-11 Thread Soheli Das
I have checked out the iterators thematic tutorial and I must say, it's really helpful. Thank you for recommending that. Seems like the is_king_tableau throws away the tableaux that have 2 in the 2nd-row 1st column. After that, it displays all other tableaux. I tried implementing a condition tha

Re: [sage-combinat-devel] Re: King Tableaux

2020-03-09 Thread Nicolas M. Thiery
On Mon, Mar 09, 2020 at 05:20:02PM -0700, Soheli Das wrote: > I was trying to list the King tableaux of a particular shape. Here's the > function: > > def list_of_king_tableaux(t_shape, t_max_entry): > """A function which finds the list of King tableaux of given shape.""" > return list(

[sage-combinat-devel] Re: King Tableaux

2020-03-09 Thread Soheli Das
I was trying to list the King tableaux of a particular shape. Here's the function: def list_of_king_tableaux(t_shape, t_max_entry): """A function which finds the list of King tableaux of given shape.""" return list([t for t in SemistandardTableaux(t_shape, max_entry=t_max_entry) if is_ki

[sage-combinat-devel] Re: King Tableaux

2020-03-09 Thread Soheli Das
Alright, now I get it. Thanks for your help! On Monday, March 9, 2020 at 4:54:48 AM UTC-4, Bruce wrote: > > The king_tableaux is an iterator not a function. > it is used in the last three lines. > > if you want a list look inside no_of_king_tableaux > > On Sunday, 8 March 2020 21:41:34 UTC, Soheli

[sage-combinat-devel] Re: King Tableaux

2020-03-09 Thread Bruce
The king_tableaux is an iterator not a function. it is used in the last three lines. if you want a list look inside no_of_king_tableaux On Sunday, 8 March 2020 21:41:34 UTC, Soheli Das wrote: > > Thank you Bruce!! Indeed the function looks tidier. > The third function gives me this message: " at

[sage-combinat-devel] Re: King Tableaux

2020-03-08 Thread Soheli Das
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 hel

[sage-combinat-devel] Re: King Tableaux

2020-03-08 Thread Bruce
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

Re: [sage-combinat-devel] Re: King Tableaux

2020-03-07 Thread Nicolas M. Thiery
> Thank you for helping me. I created the function ... > > What do you think? Were you suggesting something like this? Yes indeed something like this (I did not check the exact conditions you used, but that's your expertise :-)). Now you should just have to come back to the template I sent you for

Re: [sage-combinat-devel] Re: King Tableaux

2020-03-07 Thread Soheli Das
Dear Nicolas, 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: :

Re: [sage-combinat-devel] Re: King Tableaux

2020-03-06 Thread Nicolas M. Thiery
Dear Soheli, Thanks for the extra info. As a first step I suggest that you write a little function that takes a semi standard tableau and test whether it's a king tableau. def is_king_tableau(t): ... Cheers, Nicolas On Fri, Mar 06, 2020 at 08:

[sage-combinat-devel] Re: King Tableaux

2020-03-06 Thread Soheli Das
Hi Bruce, I'm working on King Tableaux along with my Professor. We came up with this algorithm to generate king tableaux from semistandard tableaux. If you could suggest a better algorithm, that would be great. Either way, I need help with writing the code. I'm new to Sage and Python as well. I

[sage-combinat-devel] Re: King Tableaux

2020-03-06 Thread Bruce
Dear Soheli, Your post does not have a question so I am not sure if you are asking for help on getting started with writing code or whether you are asking for a better algorithm. I am really following up on Nicolas' post and discussing the algorithm. The history is that crystal operators on Ki