Discussion:
pointMult
(too old to reply)
n p
2005-05-01 02:23:58 UTC
Permalink
Can anyone verify what the function pointMult does, and perhaps provide
some trivial example? ie pointMult [1,2,3] 4 7 = ?? Thanks.

nate
David Zhao
2005-05-01 04:11:15 UTC
Permalink
The function pointMult used in the example code for ift is point-wise
multiplication modulo m. That is, given polynomials

[a_0, a_1, ..., a_{n-1}]
and
[b_0, b_1, ..., b_{n-1}]

and a modulus m, it produces the polynomial

[a_0*b_0, a_1*b_1,, ..., a_{n-1}*b_{n-1}] modulo m.

So (pointMult [1,2,3] [1,2,3] 17) = [1,4,9] and (pointMult [1,2,3] [1,2,3] 5) =
[1,4,4].

Hope that helps,
David
Can anyone verify what the function pointMult does, and perhaps provide some
trivial example? ie pointMult [1,2,3] 4 7 = ?? Thanks.
nate
n p
2005-05-01 14:53:32 UTC
Permalink
Could you provide a similar example for modM and powers? Thanks.

nate
Post by David Zhao
The function pointMult used in the example code for ift is point-wise
multiplication modulo m. That is, given polynomials
[a_0, a_1, ..., a_{n-1}]
and
[b_0, b_1, ..., b_{n-1}]
and a modulus m, it produces the polynomial
[a_0*b_0, a_1*b_1,, ..., a_{n-1}*b_{n-1}] modulo m.
So (pointMult [1,2,3] [1,2,3] 17) = [1,4,9] and (pointMult [1,2,3] [1,2,3]
5) = [1,4,4].
Hope that helps,
David
Post by n p
Can anyone verify what the function pointMult does, and perhaps provide
some trivial example? ie pointMult [1,2,3] 4 7 = ?? Thanks.
nate
David Zhao
2005-05-01 19:07:09 UTC
Permalink
Sure:

(modM 5 9) means (9 mod 5) = 4.

(powers [1,2,3,4] 5 2) = [1,2,4,3].

David
Post by n p
Could you provide a similar example for modM and powers? Thanks.
nate
bushk
2005-05-01 19:20:37 UTC
Permalink
Post by David Zhao
(modM 5 9) means (9 mod 5) = 4.
(powers [1,2,3,4] 5 2) = [1,2,4,3].
don't you mean: (powers [1,2,3,4] 5 2) = [1,4,4,1] ?
1^2m5 = 1
2^2m5 = 4
3^2m5 = 4
4^2m5 = 1

...?
Post by David Zhao
David
Post by n p
Could you provide a similar example for modM and powers? Thanks.
nate
n p
2005-05-01 21:10:02 UTC
Permalink
so powers [a0, a1, ... , an] p x = [a0^x mod p, a1^x mod p , ... an^x
mod p] ?

nate
Post by David Zhao
(modM 5 9) means (9 mod 5) = 4.
(powers [1,2,3,4] 5 2) = [1,2,4,3].
David
Post by n p
Could you provide a similar example for modM and powers? Thanks.
nate
David Zhao
2005-05-02 02:05:52 UTC
Permalink
No, reread the definition of powers on page 194 of the course packet.

David
so powers [a0, a1, ... , an] p x = [a0^x mod p, a1^x mod p , ... an^x mod p]
?
nate
Beau Osborne
2005-05-02 17:11:03 UTC
Permalink
Can someone verify that my powers function outputs are correct?

----------------------------------------
Polynomial> powers [1,2,3,4] 5 2
[1,2,4,3]

Polynomial> powers [1,2,1,2] 3 2
[1,2,1,2]

Polynomial> powers [1,4,2,3] 5 2
[1,2,4,3]
----------------------------------------
Josh
2005-05-02 20:58:06 UTC
Permalink
confirmed.

i did powers by
powers = (w^0, w^1, w^2.... w^N-1)
powers relies only on the length of the list that is sent to it. therefore
[1,2,3,4] will have the same powers return as [3,5,2,1] given the same w and
m
Post by Beau Osborne
Can someone verify that my powers function outputs are correct?
----------------------------------------
Polynomial> powers [1,2,3,4] 5 2
[1,2,4,3]
Polynomial> powers [1,2,1,2] 3 2
[1,2,1,2]
Polynomial> powers [1,4,2,3] 5 2
[1,2,4,3]
----------------------------------------
Loading...