MaplePrimes - Questions and Posts tagged with integer
http://www.mapleprimes.com/tags/integer
en-us2014 Maplesoft, A Division of Waterloo Maple Inc.Maplesoft Document SystemThu, 18 Dec 2014 12:28:23 GMTThu, 18 Dec 2014 12:28:23 GMTThe most recent questions and posts on MaplePrimes tagged with integerhttp://www.mapleprimes.com/images/mapleprimeswhite.jpgMaplePrimes - Questions and Posts tagged with integer
http://www.mapleprimes.com/tags/integer
Prime sum question
http://www.mapleprimes.com/questions/202342-Prime-Sum-Question-?ref=Feed:MaplePrimes:Tagged With integer
<p>According to this site,"It is known that every even number can be written as a sum of at most six primes". </p>
<p>http://www.theage.com.au/national/education/christians-goldbachs-magic-sum-20140903-3es2t.html</p>
<p>i wanted to test this using maple.</p>
<p>restart:<br>> PF := proc (a::integer)</p>
<p>> local cst,obj,res; <br>> cst := add(x[i], i = 1 .. numtheory:-pi(prevprime(a))) <= 6; <br>> obj := add(x[i]*ithprime(i), i = 1 .. numtheory:-pi(prevprime(a)))-a; <br>> res := Optimization:-LPSolve(obj, {cst ,obj>=0}, assume={nonnegative,integer}); end proc:<br>> PF(30);<br>[0, [x[1] = 0, x[2] = 0, x[3] = 6, x[4] = 0, x[5] = 0, x[6] = 0,x[7] = 0, x[8] = 0, x[9] = 0, x[10] = 0]]</p>
<p>the third prime is 5 and 6 of them make 30. as an aside, it would be nice to know how to get maple to output "30 = 6x5".</p>
<p>this is obviously pretty limited, because 30 can be written as the sum of two primes (7+23 and 11+19) [GOLDBACH], but using DS's GlobalSearch for all solutions takes a long time to compute. also I have to nominate the highest prime.</p>
<p>any suggestions?</p><p>According to this site,"It is known that every even number can be written as a sum of at most six primes". </p>
<p>http://www.theage.com.au/national/education/christians-goldbachs-magic-sum-20140903-3es2t.html</p>
<p>i wanted to test this using maple.</p>
<p>restart:<br>> PF := proc (a::integer)</p>
<p>> local cst,obj,res; <br>> cst := add(x[i], i = 1 .. numtheory:-pi(prevprime(a))) <= 6; <br>> obj := add(x[i]*ithprime(i), i = 1 .. numtheory:-pi(prevprime(a)))-a; <br>> res := Optimization:-LPSolve(obj, {cst ,obj>=0}, assume={nonnegative,integer}); end proc:<br>> PF(30);<br>[0, [x[1] = 0, x[2] = 0, x[3] = 6, x[4] = 0, x[5] = 0, x[6] = 0,x[7] = 0, x[8] = 0, x[9] = 0, x[10] = 0]]</p>
<p>the third prime is 5 and 6 of them make 30. as an aside, it would be nice to know how to get maple to output "30 = 6x5".</p>
<p>this is obviously pretty limited, because 30 can be written as the sum of two primes (7+23 and 11+19) [GOLDBACH], but using DS's GlobalSearch for all solutions takes a long time to compute. also I have to nominate the highest prime.</p>
<p>any suggestions?</p>202342Thu, 11 Sep 2014 14:44:03 Zbrian bovrilbrian bovrilWhich versions of Maple 18 (Personal, Academic, Commercial, etc) do Integer Relations(PSLQ)?
http://www.mapleprimes.com/questions/201900-Which-Versions-Of-Maple-18-Personal-Academic-Commercial-Etc?ref=Feed:MaplePrimes:Tagged With integer
<p>I'm interested in doing some experimental mathematics using the PSLQ integer relation algorithm. The only third-party program for doing PSLQ problems I've been able to find is a GNU C++ program with a less-than-user-friendly command-line interface. I've heard that Maple implements PSLQ and I like the symbolic input and presentation it offers as a CAS, but I can't find any information on which alternative types of Maple 18 make the PSLQ algorithm available.</p><p>I'm interested in doing some experimental mathematics using the PSLQ integer relation algorithm. The only third-party program for doing PSLQ problems I've been able to find is a GNU C++ program with a less-than-user-friendly command-line interface. I've heard that Maple implements PSLQ and I like the symbolic input and presentation it offers as a CAS, but I can't find any information on which alternative types of Maple 18 make the PSLQ algorithm available.</p>201900Tue, 01 Jul 2014 16:07:51 Zjhatc2jhatc2Write a function that takes an integer and a boolean function and returns a list containing all [i,j] such that F(i,j).
http://www.mapleprimes.com/questions/201088-Write-A-Function-That-Takes-An-Integer?ref=Feed:MaplePrimes:Tagged With integer
<p> </p>
<p> </p>
<p>so we have to Write a maple function with -> that takes an integer N and a boolean function</p>
<p>F: {(i,j) l 0<= i,j<= N} -> {true,false} </p>
<p><br>and returns a list containing all [i,j] such that F(i,j). A procedure that does this<br>would be</p>
<p><br>proc(N,F) local i, j, RV;<br>RV:=NULL;<br>for i from 1 to N do for j from 1 to N do<br>if F(i,j) then RV:=RV,[i,j] ; end if ;<br>end do ; end do ;<br>return RV ;<br>end proc ;</p>
<p><br>The problem is to do this inline, i.e. you have to write<br>(i,j)-> ...</p>
<p> </p>
<p>please help...</p><p> </p>
<p> </p>
<p>so we have to Write a maple function with -> that takes an integer N and a boolean function</p>
<p>F: {(i,j) l 0<= i,j<= N} -> {true,false} </p>
<p><br />and returns a list containing all [i,j] such that F(i,j). A procedure that does this<br />would be</p>
<p><br />proc(N,F) local i, j, RV;<br />RV:=NULL;<br />for i from 1 to N do for j from 1 to N do<br />if F(i,j) then RV:=RV,[i,j] ; end if ;<br />end do ; end do ;<br />return RV ;<br />end proc ;</p>
<p><br />The problem is to do this inline, i.e. you have to write<br />(i,j)-> ...</p>
<p> </p>
<p>please help...</p>201088Sat, 08 Mar 2014 22:50:47 Zlove mathslove maths"round" to 2 decimal places
http://www.mapleprimes.com/questions/200732-round-To-2-Decimal-Places?ref=Feed:MaplePrimes:Tagged With integer
<p>Hi</p>
<p>I have been trying to find a way to present results from engineering calcs to 2 decimal places (i.e.: 350.50) but the round function rounds to the nearest integer. Is there a specific statement for specifying the number of decimal places you want to present some results?</p>
<p>thanks</p><p>Hi</p>
<p>I have been trying to find a way to present results from engineering calcs to 2 decimal places (i.e.: 350.50) but the round function rounds to the nearest integer. Is there a specific statement for specifying the number of decimal places you want to present some results?</p>
<p>thanks</p>200732Fri, 10 Jan 2014 14:05:39 Zcesar torrescesar torresHow to find 2013th term in this sequence?
http://www.mapleprimes.com/questions/200600-How-To-Find-2013th-Term-In-This-Sequence?ref=Feed:MaplePrimes:Tagged With integer
<p>How to find 2013th term in the sequence </p>
<p><strong>1, 2, 2, 3, 3, 3, 4, 4, 4, 4, ...</strong>?</p>
<p>in which the n-th positive integer appears <em><strong>n</strong></em> times. </p>
<p>I don't know how to start.</p><p>How to find 2013th term in the sequence </p>
<p><strong>1, 2, 2, 3, 3, 3, 4, 4, 4, 4, ...</strong>?</p>
<p>in which the n-th positive integer appears <em><strong>n</strong></em> times. </p>
<p>I don't know how to start.</p>200600Sun, 22 Dec 2013 10:17:14 ZtoandhsptoandhspPerimeter and area of a triangle are integer numbers
http://www.mapleprimes.com/questions/200319-Perimeter-And-Area-Of-A-Triangle-Are?ref=Feed:MaplePrimes:Tagged With integer
<p>In geom3d. I want to find the vertices A(x1,y1,z1), B(x2,y2,z2), where x1, y1, z1, x2, y2, z2 are integer numbers so that the triangle OAB (O is origin) and perimeter and area are integer numbers. I tried</p>
<p>> <strong>resrart:</strong></p>
<p><strong>N:=5:</strong></p>
<p><strong>L:=[]:</strong></p>
<p><strong>for x1 from -N to N do</strong></p>
<p><strong>for y1 from x1 to N do</strong></p>
<p><strong>for z1 from y1 to N do</strong></p>
<p><strong>for x2 from -N to N do</strong></p>
<p><strong>for y2 from -N to N do</strong></p>
<p><strong>for z2 from -N to N do</strong></p>
<p><strong>a:=sqrt(x1^2+y1^2+z1^2):b:=sqrt(x2^2+y2^2+z2^2):c:=sqrt((x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2):</strong></p>
<p><strong>p:=(a+b+c)/2:</strong></p>
<p><strong>S:=sqrt(p*(p-a)*(p-b)*(p-c)):</strong></p>
<p><strong>if type(2*p, integer) and type(S, posint)</strong></p>
<p><strong>then L:=[op(L), [[0, 0, 0], [x1, y1, z1], [x2, y2, z2]]]: fi:</strong></p>
<p><strong>od: od: od: od: od: od:</strong></p>
<p><strong>nops(L);</strong></p>
<p>But my computer runs too long. I can not receive the result. How to get the answer?</p>
<p>If I the length of the side are 6, 25, 29. I tried </p>
<p><strong>DirectSearch:-SolveEquations([(x2-x1)^2+(y2-y1)^2+(z2-z1)^2 = 6^2, (x3-x2)^2+(y3-y2)^2+(z3-z2)^2 = 25^2, (x3-x1)^2+(y3-y1)^2+(z3-z1)^2 = 29^2], {abs(x1) <= 30, abs(x2) <= 20, abs(x3) <= 20, abs(y1) <= 20, abs(y2) <= 20, abs(y3) <= 20, abs(z1) <= 20,abs(z2) <= 20, abs(z3) <= 20}, assume = integer, AllSolutions, solutions = 1);</strong></p>
<p><strong> </strong></p>
<p> </p><p>In geom3d. I want to find the vertices A(x1,y1,z1), B(x2,y2,z2), where x1, y1, z1, x2, y2, z2 are integer numbers so that the triangle OAB (O is origin) and perimeter and area are integer numbers. I tried</p>
<p>> <strong>resrart:</strong></p>
<p><strong>N:=5:</strong></p>
<p><strong>L:=[]:</strong></p>
<p><strong>for x1 from -N to N do</strong></p>
<p><strong>for y1 from x1 to N do</strong></p>
<p><strong>for z1 from y1 to N do</strong></p>
<p><strong>for x2 from -N to N do</strong></p>
<p><strong>for y2 from -N to N do</strong></p>
<p><strong>for z2 from -N to N do</strong></p>
<p><strong>a:=sqrt(x1^2+y1^2+z1^2):b:=sqrt(x2^2+y2^2+z2^2):c:=sqrt((x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2):</strong></p>
<p><strong>p:=(a+b+c)/2:</strong></p>
<p><strong>S:=sqrt(p*(p-a)*(p-b)*(p-c)):</strong></p>
<p><strong>if type(2*p, integer) and type(S, posint)</strong></p>
<p><strong>then L:=[op(L), [[0, 0, 0], [x1, y1, z1], [x2, y2, z2]]]: fi:</strong></p>
<p><strong>od: od: od: od: od: od:</strong></p>
<p><strong>nops(L);</strong></p>
<p>But my computer runs too long. I can not receive the result. How to get the answer?</p>
<p>If I the length of the side are 6, 25, 29. I tried </p>
<p><strong>DirectSearch:-SolveEquations([(x2-x1)^2+(y2-y1)^2+(z2-z1)^2 = 6^2, (x3-x2)^2+(y3-y2)^2+(z3-z2)^2 = 25^2, (x3-x1)^2+(y3-y1)^2+(z3-z1)^2 = 29^2], {abs(x1) <= 30, abs(x2) <= 20, abs(x3) <= 20, abs(y1) <= 20, abs(y2) <= 20, abs(y3) <= 20, abs(z1) <= 20,abs(z2) <= 20, abs(z3) <= 20}, assume = integer, AllSolutions, solutions = 1);</strong></p>
<p><strong> </strong></p>
<p> </p>200319Tue, 26 Nov 2013 08:38:53 ZtoandhsptoandhspInputting summation of prime numbers in maple
http://www.mapleprimes.com/questions/200273-Inputting-Summation-Of-Prime-Numbers-In-Maple?ref=Feed:MaplePrimes:Tagged With integer
<p>I've been given a question:</p>
<p>Let pn denote the nth prime number. Then p1 = 2, p2 = 3, p3 = 5, p4 = 7, p5 = 11, . . . .</p>
<p>It is known that the infinite sum 1/p1 + 1/p2 + 1/p3 + · · · + 1/pn + · · · = infinity.</p>
<p>Find the smallest positive integer N so that 1/p1 + 1/p2 +1/p3 + · · · + 1/pN−1 + 1/pN > e. [Hint : ithprime(n) generates the nth prime number.]</p>
<p>How do I start off?</p>
<p>Many thanks!</p><p>I've been given a question:</p>
<p>Let pn denote the nth prime number. Then p1 = 2, p2 = 3, p3 = 5, p4 = 7, p5 = 11, . . . .</p>
<p>It is known that the infinite sum 1/p1 + 1/p2 + 1/p3 + · · · + 1/pn + · · · = infinity.</p>
<p>Find the smallest positive integer N so that 1/p1 + 1/p2 +1/p3 + · · · + 1/pN−1 + 1/pN > e. [Hint : ithprime(n) generates the nth prime number.]</p>
<p>How do I start off?</p>
<p>Many thanks!</p>200273Wed, 20 Nov 2013 03:33:42 Zxx50xxxx50xxHow do I force simplification of products of square roots of positive integers
http://www.mapleprimes.com/questions/147098-How-Do-I-Force-Simplification-Of-Products?ref=Feed:MaplePrimes:Tagged With integer
<p>In an atomic physics calculation involving the quantum theory of angular momentum, there appear polynomials whose coefficients involve square roots of positive integers, for example</p>
<p>sqrt(6)-sqrt(2)*sqrt(3) </p>
<p>Maple does not cancel such an expression to zero because the code allows for the possibility that a square root can be positive or negative. In the physics context all these square roots are positive. Is there some simple way to induce Maple...<p>In an atomic physics calculation involving the quantum theory of angular momentum, there appear polynomials whose coefficients involve square roots of positive integers, for example</p>
<p>sqrt(6)-sqrt(2)*sqrt(3) </p>
<p>Maple does not cancel such an expression to zero because the code allows for the possibility that a square root can be positive or negative. In the physics context all these square roots are positive. Is there some simple way to induce Maple to cancel such expressions by enforcing an assumption that the square roots of all integers are positive?</p>
<p>More generally, again making the assumption that all square roots of integers are positive, is there a simple way to to standarize products of square roots of positive integers, like</p>
<p>sqrt(2)*sqrt(3)*sqrt(5)*sqrt(7), or sqrt(6)*sqrt(35), or sqrt(10)*sqrt(21)</p>
<p>to a standard sqrt(210)?</p>147098Sat, 11 May 2013 03:25:49 Zcharlestmungerjrcharlestmungerjr"Is this matrix primitive?": just an idea
http://www.mapleprimes.com/posts/145555-Is-This-Matrix-Primitive-Just-An-Idea?ref=Feed:MaplePrimes:Tagged With integer
<p>Since it is not possible for me to reply directly in that new Maple Primes: <br>I branched. Feel free to re-join for a reasonable structure. What a mess.</p>
<p><a href="http://www.mapleprimes.com/questions/145527-Is-This-Matrix-Primitive">http://www.mapleprimes.com/questions/145527-Is-This-Matrix-Primitive</a></p>
<p> </p>
<p>I am rusty on such (may be it is 'obvious' via Lie theory). Your group is just the<br>group of invertible matrices over the integers (this follows from algebra). And as<p>Since it is not possible for me to reply directly in that new Maple Primes: <br>I branched. Feel free to re-join for a reasonable structure. What a mess.</p>
<p><a href="http://www.mapleprimes.com/questions/145527-Is-This-Matrix-Primitive">http://www.mapleprimes.com/questions/145527-Is-This-Matrix-Primitive</a></p>
<p> </p>
<p>I am rusty on such (may be it is 'obvious' via Lie theory). Your group is just the<br>group of invertible matrices over the integers (this follows from algebra). And as<br>det = -1 the possible 'root' K must be one for n=odd.<br><br>Looking at Eigenvalues of K they must be conjugated or purely real and different (dim=2)<br><br>conjugate(a)^n+a^n = 29, conjugate(a)^n*a^n = -1 should hold for the Eigenvalues of K.<br>which should follow from looking at the characteristic polynomials of products.<br><br>The last is abs(a)^(2*n) = - 1. So I would say: no, not possible.</p>145555Sat, 06 Apr 2013 00:34:37 ZAxel VogtAxel VogtIs this matrix primitive?
http://www.mapleprimes.com/questions/145527-Is-This-Matrix-Primitive?ref=Feed:MaplePrimes:Tagged With integer
<p> Let GL(2,Z) be the group of all the matrices of dimension 2 over the integers with the determinant equal to +/-1. <br> A matrix M in GL(2,Z) is called <em>primitive</em> if M is not equal to K^n for any K in GL(2,Z) and any positive integer n >= 2. <br> Is the matrix M:= Matrix([[27,5],[11,2]]) primitive? How to determine it in Maple?</p>
<p>Edit. GL(2,Z) instead of UL(2,Z).</p><p> Let GL(2,Z) be the group of all the matrices of dimension 2 over the integers with the determinant equal to +/-1. <br> A matrix M in GL(2,Z) is called <em>primitive</em> if M is not equal to K^n for any K in GL(2,Z) and any positive integer n >= 2. <br> Is the matrix M:= Matrix([[27,5],[11,2]]) primitive? How to determine it in Maple?</p>
<p>Edit. GL(2,Z) instead of UL(2,Z).</p>145527Fri, 05 Apr 2013 13:02:47 ZMarkiyan HirnykMarkiyan Hirnykbeta function vs. sine
http://www.mapleprimes.com/posts/144855-Beta-Function-Vs-Sine?ref=Feed:MaplePrimes:Tagged With integer
<p>Dear friends,</p>
<p>I am reporting with a brief comment concerning the integral int(1/(1+x^a), x=0..infinity) with a>=2 a real number. This was evaluated <a href="http://math.stackexchange.com/questions/335583/contour-integration-residue-theorem"> here.</a></p>
<p>Now Maple 15 (X86 64 LINUX) will quite happily compute this in its most simple form involving the sine when a is not a positive integer or a rational number. If it is, however, a beta function term results,...<p>Dear friends,</p>
<p>I am reporting with a brief comment concerning the integral int(1/(1+x^a), x=0..infinity) with a>=2 a real number. This was evaluated <a href="http://math.stackexchange.com/questions/335583/contour-integration-residue-theorem"> here.</a></p>
<p>Now Maple 15 (X86 64 LINUX) will quite happily compute this in its most simple form involving the sine when a is not a positive integer or a rational number. If it is, however, a beta function term results, which the simplifier does not know how to turn into a sine term even though the two arguments add up to one.</p>
<p>This is just to bring this to your attention. One might say that a beta function term is as good as a sine term, I would argue, though, that the sine term should be preferred. Maple will output the correct result when a is left unspecified (symbol), which I think is very nice.</p>
<p>Happy computing.</p>
<p>Marko Riedel</p>144855Thu, 21 Mar 2013 06:56:37 ZmriedelmriedelThe enumeration of non-isomorphic graphs.
http://www.mapleprimes.com/posts/144151-The-Enumeration-Of-Nonisomorphic-Graphs?ref=Feed:MaplePrimes:Tagged With integer
<p>Dear friends,</p>
<p>this is to share with you what a joy it was to work with Maple on the problem of enumerating non-isomorphic graphs. This problem goes back to Polya and Harary and it is a beautiful example of Polya counting, while also being of notable simplicity, so that a high school student or an undergraduate can follow it easily.</p>
<p>I have worked on this problem over the years, adapting my solutions in Cocoa and Lisp as I gained insights. My first attempt used...<p>Dear friends,</p>
<p>this is to share with you what a joy it was to work with Maple on the problem of enumerating non-isomorphic graphs. This problem goes back to Polya and Harary and it is a beautiful example of Polya counting, while also being of notable simplicity, so that a high school student or an undergraduate can follow it easily.</p>
<p>I have worked on this problem over the years, adapting my solutions in Cocoa and Lisp as I gained insights. My first attempt used GMP for large integers and can be found <a href="http://www.roard.com/docs/cookbook/cbsu5.html">here.</a> It was quite involved and while it computed results for very large values, there was a crucial oversight in that it did not use Lovasz' formula for the cycle index of the symmetric group. Thereafter I wrote another implementation in Lisp, taking advantage of the large integers provided by that language, but still not using said formula.</p>
<p>Most recently I was prompted by a post at math.stackexchange.com to revisit this problem and decided to implement the best algorithm, which is the one that uses Lovasz' formula. To my suprise it only needed a few lines of code to solve the problem even for large numbers of nodes. Imagine my amazement at the power of Maple especially taking into account the effort I had needed to program the solution with Objective C and GMP (which is not to say that this combination does not have its advantages under certain circumstances). I also enjoy working with a computer algebra system that keeps syntactic complexity to a minimum, enabling users to get started quickly.</p>
<p>I hope that with this motivational story I may give back some of the pleasure of my experience with Maple, and perhaps convince you that expanding the group theory package to include common cycle indices and routines to substitute at specific values of the variables would be a good thing to have, so that one day, counting non-isomorphic graphs will be as easy as saying give me the cycle index of the edge permutation group of the complete graph on n nodes and substitute the values of the edges into that index. Of course if you have such a package already do post the link.</p>
<p>Best regards,</p>
<p>Marko Riedel</p>
<p>PS: The Maple code for the enumeration can be found<a href="http://math.stackexchange.com/questions/314103/how-many-2-edge-colourings-of-k-n-are-there">here.</a></p>144151Mon, 04 Mar 2013 00:32:02 ZmriedelmriedelHow to find vertices of an equilateral triangle knowing coordinates of centroid?
http://www.mapleprimes.com/questions/142591-How-To-Find-Vertices-Of-An-Equilateral?ref=Feed:MaplePrimes:Tagged With integer
<p>I want to find a triangle with the vertices A(x1, y1, z1), B(x2, y2, z2), C(x3, y3, z3) knowing that the point G(1,1,1) is centroid of the triagle ABC and x1, y1, z1, x2, y2, z2, x3, y3, z3 are integer numbers, but I can not find. How do I tell <em>Maple</em> to do that? </p><p>I want to find a triangle with the vertices A(x1, y1, z1), B(x2, y2, z2), C(x3, y3, z3) knowing that the point G(1,1,1) is centroid of the triagle ABC and x1, y1, z1, x2, y2, z2, x3, y3, z3 are integer numbers, but I can not find. How do I tell <em>Maple</em> to do that? </p>142591Thu, 24 Jan 2013 20:57:10 ZtoandhsptoandhspFine $a_{n}$ of sequence (Could you do more clearly?)
http://www.mapleprimes.com/questions/140980-Fine-an-Of-Sequence-Could-You-Do-More-Clearly?ref=Feed:MaplePrimes:Tagged With integer
<p>Fine <a class="latex" href="http://www.artofproblemsolving.com/Forum/code.php?hash=c9979da0d951090a329ee14630266d334eb1eb0c&sid=1d988bb3b9c4d11ea030a09f0486013f"><img class="latex" style="vertical-align: -2px;" src="http://data.artofproblemsolving.com/images/latex/c/9/9/c9979da0d951090a329ee14630266d334eb1eb0c.gif" alt="a_{n}"></a> of <span class="posthilit">sequence</span> <p>Fine <a class="latex" href="http://www.artofproblemsolving.com/Forum/code.php?hash=c9979da0d951090a329ee14630266d334eb1eb0c&sid=1d988bb3b9c4d11ea030a09f0486013f"><img class="latex" style="vertical-align: -2px;" src="http://data.artofproblemsolving.com/images/latex/c/9/9/c9979da0d951090a329ee14630266d334eb1eb0c.gif" alt="a_{n}"></a> of <span class="posthilit">sequence</span> <a class="latex" href="http://www.artofproblemsolving.com/Forum/code.php?hash=ebf4184c8bc624ae2bfe80609a6999c84bb11475&sid=1d988bb3b9c4d11ea030a09f0486013f"><img class="latex" style="vertical-align: -3px;" src="http://data.artofproblemsolving.com/images/latex/e/b/f/ebf4184c8bc624ae2bfe80609a6999c84bb11475.gif" alt="1 , 3 , 6 , 12 , 33 , 51 ,\cdots"></a></p>140980Fri, 30 Nov 2012 22:07:57 ZyangthearyyangthearySolving equation system over the integers (mod m)
http://www.mapleprimes.com/questions/140341-Solving-Equation-System-Over-The-Integers-mod-M?ref=Feed:MaplePrimes:Tagged With integer
<p>Hello, I have a set of equations, and I want to solve it over the integers (mod 13). But msolve command fails. Here is my code:<br><br>eq:={a4*a1-11, a4*a2-12, a4*a3-6, a5*a1-3, a5*a2-8, a5*a3-4, a6*a1-2, a6*a2-1, a6*a3-7};<br>msolve(eq,13);<br><br>It fails, but I can solve it manually. Here is a solution:<br><br>a4*a1 = 11 => a4:=1 and a1:=11<br><br>a4*a2 = 12 => a2:=12<br><br>a4*a3 = 6 => a3:=6<br><br>a5*a1 = 3 => a5:=3/11 mod 13 = 5<br><br>a5*a2 = 8 => a2:=8/5 mod 13 = 12<p>Hello, I have a set of equations, and I want to solve it over the integers (mod 13). But msolve command fails. Here is my code:<br><br>eq:={a4*a1-11, a4*a2-12, a4*a3-6, a5*a1-3, a5*a2-8, a5*a3-4, a6*a1-2, a6*a2-1, a6*a3-7};<br>msolve(eq,13);<br><br>It fails, but I can solve it manually. Here is a solution:<br><br>a4*a1 = 11 => a4:=1 and a1:=11<br><br>a4*a2 = 12 => a2:=12<br><br>a4*a3 = 6 => a3:=6<br><br>a5*a1 = 3 => a5:=3/11 mod 13 = 5<br><br>a5*a2 = 8 => a2:=8/5 mod 13 = 12<br><br>a5*a3 = 4 => a3:=4/5 mod 13 = 6<br><br>a6*a1 = 2 => a6:=2/11 mod 13 = 12<br><br>a6*a2 = 1 => 12*12 mod 13 = 1<br><br>a6*a3 = 7 => 12*6 mod 13 = 7<br><br>So, how can I solve this using maple?<br><br>Thanks in advance.</p>140341Wed, 14 Nov 2012 22:04:22 Zozkanozkan