25 Reputation

One Badge

0 years, 290 days

MaplePrimes Activity

These are replies submitted by RohanKarthik

@vv Thanks for the answer. But, I wanted an output of 45x when the polynomial 100x2y2+35yx + 45x was given as an input, and not 0.

Following the suggestion by @acer, I'm reposting my new question as a reply on this original question.

Now, we want the (1, 1)th entry of the mth power of the matrix G_(0, n). When I executed the procedure given by @Carl Love, I observe that the program keeps running even for moderately small vales of m and n, say m=6 and n=9 without any response.

One more thing that concerns me, is that I observe that G_(0, n) is quite sparse, and I feel that @Carl Love's procedure calculates the mth power of G_(0, n) and then only takes the (1, 1)th entry. Please correct me if I'm wrong.

I was thinking that suppose we computed the (m-1)th power of G_(0, n) and denoted it by M. Then take the first column of M and the first row of G_(0, n) and multiply them, we would get only the (1, 1)th entry of the mth power of G_(0, n).

But, I'm unsure whether this is more efficient than the usual method. If yes, I'm stuck on how to code this. Any help would be appreciated.

@acer Thanks a lot for the help sir.

@Carl Love Thank you sir for your enlightening advice on both the Maple and the English parts!

@Carl Love OK, so I executed the code in the Startup Code window and it worked.

I have one more doubt. Sir, is there any way I can extract only those terms in the polynomial expression where the difference in the powers of x and y is atmost 1?

@Carl Love Thanks for your answer sir. I have just one small doubt.

Using Ctrl+M, I typed the complete code of yours in Maple. But, I am at a loss as to how to execute it.

I would be grateful if you could just enlighten me on this manner. Thank you once again. 

@Carl Love Thanks a lot. Your code is much better than mine. 

Because @tomleslie's answer was also illuminating, I didn't want to select any one as the best answer. Hope you don't mind, sir.

@tomleslie Thanks a lot! Your code is much better than mine.

Page 1 of 1