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: 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 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-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 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. = PolynomialRing(CC) factor(x^2-2,x) Sage returns (x - 1.41421356237310) * (x + 1.41421356237310) Any ideas?
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://ask.sagemath.org/users/2101/clemfanjc07/?sort=recent", "fetch_time": 1620742661000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2021-21/segments/1620243989614.9/warc/CC-MAIN-20210511122905-20210511152905-00208.warc.gz", "warc_record_offset": 133196989, "warc_record_length": 7268, "token_count": 1160, "char_count": 3857, "score": 3.515625, "int_score": 4, "crawl": "CC-MAIN-2021-21", "snapshot_type": "latest", "language": "en", "language_score": 0.8822118639945984, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00038-of-00064.parquet"}