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 your help!
Regards, Soheli On Wednesday, March 11, 2020 at 7:02:04 PM UTC-4, Nicolas M. Thiery wrote: > > > 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 used it. > > In both cases, if you need further help, report precise sequences of > commands you typed in so that it can be reproduced and analyzed. > > Cheers, > Nicolas > > > On Wed, Mar 11, 2020 at 03:44:35PM -0700, Soheli Das wrote: > > 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 True > > > > > > On Wednesday, March 11, 2020 at 5:59:43 PM UTC-4, Nicolas M. Thiery > wrote: > > > > > > > > > > > > > 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 tried implementing a condition that goes over the list > > > > and throws away the undesired tableaux but haven't been successful > > > > yet. > > > > > > If something is fishy, it's in the is_king_tableau. Make sure that > > > function does what you want. > > > > > > 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 > > > > > > The i=i+1 is suspicious. If you really want to consider rows of even > > > index, it's more explicit to use range(0, no_of_rows, 2). > > > > > > Also the t[0][0] might as well be outside of the loop since it does > > > not depend on i. > > > > > > Cheers, > > > Nicolas > > > -- > > > Nicolas M. Thiéry "Isil" <nth...@users.sf.net <javascript:>> > > > 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 <javascript:>. > > > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-combinat-devel/a09b94cb-4b98-4e23-982e-6cdee5fa8557%40googlegroups.com. > > > > Nicolas > -- > Nicolas M. Thiéry "Isil" <nth...@users.sf.net <javascript:>> > 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/44e19ce8-dcac-422d-bdb6-4803851d3460%40googlegroups.com.