Ask Your Question

ruidongshuai@gmail.com's profile - activity

2020-07-18 23:26:41 +0100 received badge  Famous Question (source)
2017-10-17 21:28:04 +0100 received badge  Nice Question (source)
2016-09-04 15:33:35 +0100 received badge  Notable Question (source)
2016-02-08 23:28:14 +0100 received badge  Popular Question (source)
2014-07-17 13:44:24 +0100 asked a question How to use SymmetricGroup() to input an element in Sn

I want to input an element of Sn with SymmetricGroup(),for example, I know SymmetricGroup(5)((1,2,3))is the element (1,2,3)in S5,however, I do not know how to input something like (1,2)(3,4) using SymmetricGroup()

2014-07-17 13:27:32 +0100 received badge  Editor (source)
2014-07-13 16:50:46 +0100 asked a question Question about arguments of a polynomial

I want to define a polynomial ring R with 5 variables, and a function f belonging to R with 2 variables, for example, f=x1+x2,however, the arguments of f are just x1 and x2, how can I let the arguments of f be x0,x1,x2,x3,x4?

R=PolynomialRing(QQ,5,"x",order='lex')
vx=[var("x"+str(i))for i in range(5)]
vx=R.gens()
f=x1+x2;f
f.args()
g=R.random_element();g
g.args()
2014-07-13 15:39:58 +0100 commented answer the permutation of subscripts of a multivariate polynomial

Thanks for your answer very much! However, there is still a small problem, when I type in a polynomial f=x1+x2, and n=5, sigma=(1,2,3),it shows an error says that the number of arguments must be less than or equal to 2. How can I make the arguments of f be x1,x2,x3 instead of just x1 and x2?

2014-07-12 19:11:20 +0100 received badge  Student (source)
2014-07-12 16:32:22 +0100 asked a question the permutation of subscripts of a multivariate polynomial

I want to define a function, the input are a permutation sigma belonging to Sn, and a multivariate polynomial f=f(x1,x2,...,xn) over Q, and the output is a multivariate polynomial f=f(x(sigma(1)),x(sigma(2)),...,x(sigma(n))), for example, if sigma=(3,1,2),f=x1+x2x3, then the output should be f=x3+x1x2. It is worth mentioning that this should work for any n not just when n=3. How should I do that?