2020-12-25 18:09:46 +0200 | received badge | ● Popular Question (source) |

2020-12-25 18:09:46 +0200 | received badge | ● Notable Question (source) |

2020-11-19 03:46:59 +0200 | received badge | ● Famous Question (source) |

2018-03-25 01:11:11 +0200 | received badge | ● Notable Question (source) |

2017-12-10 01:21:15 +0200 | received badge | ● Popular Question (source) |

2017-04-02 03:14:44 +0200 | received badge | ● Popular Question (source) |

2014-07-09 23:43:02 +0200 | 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 23:36:24 +0200 | 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: This "should" only add one when n is divisible by 3, but seems to do this all the time. Any ideas? |

2013-11-23 22:09:48 +0200 | 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 14:34:09 +0200 | 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 18:42:48 +0200 | 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 20:36:52 +0200 | asked a question | pair group Is there a way to implement the "pair group" in sage like there is in mathematica? |

2013-11-18 12:27:01 +0200 | 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 11:01:27 +0200 | 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-x 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 19:31:51 +0200 | 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 19:43:06 +0200 | 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? |

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.