Discussion:
regarding Algorithm C
(too old to reply)
Clara
2011-05-28 19:17:17 UTC
Permalink
I'm a little bit confused with Algorithm C.
Do we need to implement the matrix multiplication?
or is there (import...) that we can use?

Also, in which way does the recursive definition explained in the
assignment help?
For example,
if we were to do x^4,
doing matrix multiplication of x*x*x*x* seems to take the same number
of multiplication steps as x^2 * x^2.

Thank you very much.
CS234
2011-05-29 20:12:13 UTC
Permalink
You'll need to implement the matrix multiplication yourself. It's not that
hard since you only need to deal with 2x2 matrices.

x^2 * x^2 takes less multiplications if you only calculate x^2 once.

Francis
Post by Clara
I'm a little bit confused with Algorithm C.
Do we need to implement the matrix multiplication?
or is there (import...) that we can use?
Also, in which way does the recursive definition explained in the
assignment help?
For example,
if we were to do x^4,
doing matrix multiplication of x*x*x*x* seems to take the same number
of multiplication steps as x^2 * x^2.
Thank you very much.
ynasser
2011-05-30 00:28:43 UTC
Permalink
I used the numpy library because it was included on the
linux.student.cs server. Is that alright?
T. Francis Chen
2011-05-30 20:40:20 UTC
Permalink
Yep. That's fine.

Francis
Post by ynasser
I used the numpy library because it was included on the
linux.student.cs server. Is that alright?
Loading...