Ask Your Question

ClemFanJC07's profile - activity

2018-03-24 19:11:11 -0500 received badge  Notable Question (source)
2017-12-09 18:21:15 -0500 received badge  Popular Question (source)
2017-04-01 20:14:44 -0500 received badge  Popular Question (source)
2014-07-09 16:43:02 -0500 commented question How to do an "if" block in Sage?

Specifically, I am trying to sum up al multinomial coefficients that have two equal parts. I am using the code: for n in range(21): t=0; for i in range(n+1): t = t + Combinations(n,i).cardinality()*Combinations(n-i,i).cardinality(); t=3*t; if gcd(n,3)==3: t = t-2*Combinations(n, n/3).cardinality()*Combinations(2*n/3, n/3).cardinality(); print t However, for n=3 the answer should be 18 not 15. Ideas?

2014-07-09 16:36:24 -0500 asked a question How to do an "if" block in Sage?

I am trying to do an if block in sage. For example, I have code:

for n in range(7):
    if gcd(n,3)==3:
        n=n/3;
        n=n+1;
    print(n)

This "should" only add one when n is divisible by 3, but seems to do this all the time. Any ideas?

2013-11-23 15:09:48 -0500 commented question pair group

The pair group normally comes up in Polya enumeration of non-isomorphic graphs. So if we are looking at graphs with p vertices, then the group acting on the vertices is S_p. This induces a group on the edges of G, namely the pair group, S_p^{(2)}. I believe that Harary defined the pair group in "Graph Theory" and "Graphical Enumeration." I'm just curious if it is implemented in Sage the way it is in Mathematica.

2013-11-23 07:34:09 -0500 commented question pair group

In this case, G=S_p. In any case, if G is finite, then it is (isomorphic to) a subgroup of S_p for some suitably chosen p (Cayley's Theorem). The pair group only depends on G. However, the interesting and important case is when we use the full symmetric group for G.

2013-11-22 11:42:48 -0500 commented question pair group

In this case, p is the number of letters in the symmetric group. So, S_p is the pth symmetric group.

2013-11-21 13:36:52 -0500 asked a question pair group

Is there a way to implement the "pair group" in sage like there is in mathematica?

sf. http://mathworld.wolfram.com/PairGrou...

2013-11-18 05:27:01 -0500 asked a question polya enumeration of non-isomorphic graphs

I am trying to get Sage to give me the group acting on the potential edges of graph with n vertices for the purposes of Polya enumeration.

I know sage will give me the nth sysmmetric group, S_n. What I want is the group acting on the pairs, usually referred to as S_n^{(2)} in the literature. Any ideas?

2013-10-28 05:01:27 -0500 asked a question multivariable taylor series

I know how to generate a multivairiable Taylor series and extract its coefficients. What I want to do is to extract all the terms where the exponents of the individual variables satisfy certain requirements.

So for instance, my function is f(x,y)=(1/(1-xy))(1/(1-xy^2))(1/(1-xy^3))(1-x*y^4))

What I want is all terms in the Taylor series such that the exponent on x is at most 10 and the exponent on y is at most 20. Ideas?

2013-10-26 12:31:51 -0500 asked a question cycle index

I know that S4 = SymmetricGroup(4) P = S4.cycle_index()

will return the cycle index polynomial for S_4. What I want to do is substitute variables into this polynomial for Polya Enumeration problems. So for instance, how do I substitute x+y into the cycles of length 1, x^2+y^2 into the cycles of length 2, etc.

2013-10-20 12:43:06 -0500 asked a question exact factorting

How do you get sage to factor into exact values. For instance, I want it to factor x^2-2 and return (x-sqrt(2))*(x+sqrt(2))

However, when I input

realpoly.<x> = PolynomialRing(CC) factor(x^2-2,x)

Sage returns

(x - 1.41421356237310) * (x + 1.41421356237310)

Any ideas?