ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 31 Aug 2018 16:46:41 +0200Describe in words what happens when you compute A5, A10;A20; and A30 forhttps://ask.sagemath.org/question/34929/describe-in-words-what-happens-when-you-compute-a5-a10a20-and-a30-for/
[1/6 1/2 1/3]
A = [1/2 1/4 1/4]
[1/3 1/4 5/12]Sun, 25 Sep 2016 03:49:53 +0200https://ask.sagemath.org/question/34929/describe-in-words-what-happens-when-you-compute-a5-a10a20-and-a30-for/Comment by kcrisman for <pre><code> [1/6 1/2 1/3]
</code></pre>
<p>A = [1/2 1/4 1/4]
[1/3 1/4 5/12]</p>
https://ask.sagemath.org/question/34929/describe-in-words-what-happens-when-you-compute-a5-a10a20-and-a30-for/?comment=34931#post-id-34931This looks like homework, especially given how you pasted it in. We can help with legitimate questions, if you understand enough to be able to ask one, but please do edit your question to make it clear what your *Sage* question is, not just your homework question using Sage.Sun, 25 Sep 2016 03:54:29 +0200https://ask.sagemath.org/question/34929/describe-in-words-what-happens-when-you-compute-a5-a10a20-and-a30-for/?comment=34931#post-id-34931Comment by Help9542 for <pre><code> [1/6 1/2 1/3]
</code></pre>
<p>A = [1/2 1/4 1/4]
[1/3 1/4 5/12]</p>
https://ask.sagemath.org/question/34929/describe-in-words-what-happens-when-you-compute-a5-a10a20-and-a30-for/?comment=34942#post-id-34942Come on and be nice. What is wrong with the homework? Have you ever get help from anyone under any circumstances? There are tutors in the University to help students do the homework all over the country. If you do not want to help, that`s fine. You don`t need to make any comment like this. Here is the answer:
A = matrix ( RR ,[[1/6 ,1/2 ,1/3] ,[1/2 ,1/4 ,1/4] ,[1/3 ,1/4 ,5/12]])
B = A * A
print B
Then Change A*A to A^5, A^10,A^20 and A^30 to find out the results corresponding to each of them. Then replace RR to QQ (rational) to compare the difference between them. You can easily see the entries run with RR(integer) that approach to 0.33333333333333 when it comes to A^30. You can copy and paste it to your homework.
I hope this website is not a website of humiliating people.Mon, 26 Sep 2016 04:00:29 +0200https://ask.sagemath.org/question/34929/describe-in-words-what-happens-when-you-compute-a5-a10a20-and-a30-for/?comment=34942#post-id-34942Comment by kcrisman for <pre><code> [1/6 1/2 1/3]
</code></pre>
<p>A = [1/2 1/4 1/4]
[1/3 1/4 5/12]</p>
https://ask.sagemath.org/question/34929/describe-in-words-what-happens-when-you-compute-a5-a10a20-and-a30-for/?comment=34949#post-id-34949Not at all! We help many beginners with all kinds of things. But this is a website about Sage, and the way your question was posted was so unclear that it would be pretty hard to figure out.Mon, 26 Sep 2016 16:17:30 +0200https://ask.sagemath.org/question/34929/describe-in-words-what-happens-when-you-compute-a5-a10a20-and-a30-for/?comment=34949#post-id-34949Comment by kcrisman for <pre><code> [1/6 1/2 1/3]
</code></pre>
<p>A = [1/2 1/4 1/4]
[1/3 1/4 5/12]</p>
https://ask.sagemath.org/question/34929/describe-in-words-what-happens-when-you-compute-a5-a10a20-and-a30-for/?comment=34950#post-id-34950Also, more seriously, your question as stated has nothing about real, rational, or integer in it. Again, we are very happy to help legitimate questions (even homework) but do ask for folks to take a little bit of time and care to respect the time of those answering. There is definitely no intent to humiliate, and you can see that in the careful answers many of us have taken great pains to explain in full detail. But it's hard to answer a question like this one, as stated, so the original comment was a suggestion to make it one that is easy for the experts to answer. Good luck!Mon, 26 Sep 2016 16:21:36 +0200https://ask.sagemath.org/question/34929/describe-in-words-what-happens-when-you-compute-a5-a10a20-and-a30-for/?comment=34950#post-id-34950Comment by tmonteil for <pre><code> [1/6 1/2 1/3]
</code></pre>
<p>A = [1/2 1/4 1/4]
[1/3 1/4 5/12]</p>
https://ask.sagemath.org/question/34929/describe-in-words-what-happens-when-you-compute-a5-a10a20-and-a30-for/?comment=34989#post-id-34989@Help9542 please look at you own question and try to understand it honestly. How nice ? For example, how could we know that A20 in the title was the power of some matrix ? Now could we guess that the question was about the choice of a convenient ring ? How humiliating is it to identify the help of tutors who try to let you understand some concepts with getting an answer to be copy-pasted ? If the goal is not to get any help but to publish yourself an answer to a question that could only be understood by your schoolmate who got the exact same homework, an appropriate tool would be a pastebin website, not ask.sagemath.org.Thu, 29 Sep 2016 18:10:37 +0200https://ask.sagemath.org/question/34929/describe-in-words-what-happens-when-you-compute-a5-a10a20-and-a30-for/?comment=34989#post-id-34989Comment by pizza for <pre><code> [1/6 1/2 1/3]
</code></pre>
<p>A = [1/2 1/4 1/4]
[1/3 1/4 5/12]</p>
https://ask.sagemath.org/question/34929/describe-in-words-what-happens-when-you-compute-a5-a10a20-and-a30-for/?comment=43535#post-id-43535Well, this is a request instead of a question. Could you say clearly for what you want Sage to do?Fri, 31 Aug 2018 16:46:41 +0200https://ask.sagemath.org/question/34929/describe-in-words-what-happens-when-you-compute-a5-a10a20-and-a30-for/?comment=43535#post-id-43535Answer by dan_fulea for <pre><code> [1/6 1/2 1/3]
</code></pre>
<p>A = [1/2 1/4 1/4]
[1/3 1/4 5/12]</p>
https://ask.sagemath.org/question/34929/describe-in-words-what-happens-when-you-compute-a5-a10a20-and-a30-for/?answer=37199#post-id-37199Here is some code that investigates the powers of the "given" matrix.
sage: A = matrix( QQ, 3,3, [ 1/6, 1/2, 1/3, 1/2, 1/4, 1/4, 1/3, 1/4, 5/12 ] )
sage: A
[ 1/6 1/2 1/3]
[ 1/2 1/4 1/4]
[ 1/3 1/4 5/12]
sage: A.is_bistochastic()
True
sage: A.charpoly().factor()
(x - 1) * (x^2 + 1/6*x - 1/24)
sage: solve(x^2 + 1/6*x - 1/24 == 0, x )
[x == -1/12*sqrt(7) - 1/12, x == 1/12*sqrt(7) - 1/12]
sage: K.<u> = QuadraticField( 7 )
sage: A = matrix( K, 3,3, [ 1/6, 1/2, 1/3, 1/2, 1/4, 1/4, 1/3, 1/4, 5/12 ] )
sage: A.eigenvalues()
[1, 1/12*u - 1/12, -1/12*u - 1/12]
sage: [ CC( ev ) for ev in A.eigenvalues() ]
[1.00000000000000, 0.137145942588716, -0.303812609255383]
sage: J, S = A.jordan_form( transformation=True )
sage: J, S
(
[ 1| 0| 0]
[--------------+--------------+--------------]
[ 0| 1/12*u - 1/12| 0]
[--------------+--------------+--------------]
[ 0| 0|-1/12*u - 1/12],
[ 1 1 1]
[ 1 1/2*u + 1/2 -1/2*u + 1/2]
[ 1 -1/2*u - 3/2 1/2*u - 3/2]
)
Let us check the decomposition:
sage: S * J * S.inverse() == A
True
$J$ is the diagonal matrix with entries:
$$
1\ ,\
\frac 1{12}(-1+\sqrt 7)\ ,\
\frac 1{12}(-1-\sqrt 7)\ .
$$
(In the code $u$ is a short hand for $\sqrt{7}$. In my choice.)
So in the limit, $J^n$ converges to the diagonal matrix with entries $1,0,0$. So $A^n$ converges to:
sage: S * matrix( K, 3,3, [ 1,0,0, 0,0,0, 0,0,0 ] ) * S.inverse()
[1/3 1/3 1/3]
[1/3 1/3 1/3]
[1/3 1/3 1/3]
Almost all computations are done exactly.
(But it is hard to describe in words what we have done so far...)Thu, 06 Apr 2017 20:20:54 +0200https://ask.sagemath.org/question/34929/describe-in-words-what-happens-when-you-compute-a5-a10a20-and-a30-for/?answer=37199#post-id-37199