Re: Math question [polynomial division]
From: Gregory G Rose (ggr_at_qualcomm.com)
Date: 12/30/03
- Next message: Gregory G Rose: "Re: Q: Fast computation of parity"
- Previous message: Mok-Kong Shen: "Q: Fast computation of parity"
- In reply to: Tom St Denis: "Re: Math question [polynomial division]"
- Next in thread: Marcel Martin: "Re: Math question [polynomial division]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 30 Dec 2003 09:01:27 -0800
In article <L7iIb.169640$2We1.59640@news04.bloor.is.net.cable.rogers.com>,
Tom St Denis <tomstdenis@iahu.ca> wrote:
>
>"Gregory G Rose" <ggr@qualcomm.com> wrote in message
>news:bssa7b$37d@qualcomm.com...
>> In article <zM8Ib.2272$INs.322@twister01.bloor.is.net.cable.rogers.com>,
>> Tom St Denis <tomstdenis@iahu.ca> wrote:
>> <At the end of the algorithm I've multiplied P by G to form the quotient.
>> <Does this mean that the quotient is G times too big? Let's try this with
>> <
>> <p(x) = 3x^2 + 4x + 1
>> <and
>> <q(x) = 7x + 9
>> <
>> <So the LCM of 3,7 is 21 so multiply p by 7 to get
>> <
>> <21x^2 + 28x + 7
>> <
>> <now subtract 3x*q(x) to get p(x) - 3x*q(x) = 1x + 7, G = 7
>> <
>> <now LCM of 1,7 is 7 again, so multiply p(x) by 7 to get
>>
>> I think that here, you're overlooking the original
>> p(x)... which also has to be multiplied by 7
>> (again).
>
>But p(x) = 1x + 7 is the remainder of 7*p(x) - 3x*q(x) [for the original
>p(x)]
>
>> <p(x) = 7x + 49
>> <
>> <now subtract q(x) to get p(x) - q(x) = 42, G = 49
>>
>> That should be 40, not 42; after all, it isn't the
>> answer to life, the universe, and everything.
>
>Hehehe, oops yeah.
>
>> <Now I'm a bit lost... seems the quotient is what, 3x + 1 and the
>remainder
>> <is 42. But clearly (7x + 9)(3x + 1) = 21x^2 + 34x + 9 + 42 = 21x^2 + 34x
>+
>> <51 is not equal to the original dividend.
>>
>> The equation should now be:
>> 49*p(x) = (21x + 1)q(x) + 40
>
>Where did 21x + 1 come from? Does 21x from the fact that you multiply p(x)
>by 7 and the quotient coefficient is 3, 3*7=21? But you multiply the p(x)
>by 7 to get the last digit too, so why isn't it 21x + 7 ?
Ah, you needed to multiply the 3x by seven to
adjust the leading coefficients, but that happens
*before* you subtract (one times) q(x).
>
>> 147x^2 + 196x + 49 = (21x + 1)(7x + 9) + 40
>> 147x^2 + 7x + 189x + 9 + 40
>> 147x^2 + 196x + 49
>>
>> N'est-ce pas?
>
>Whoosh.... I'll sort it out eventually.
>
>Thanks!
>
>Tom
>
>
Greg.
-- Greg Rose 232B EC8F 44C6 C853 D68F E107 E6BF CD2F 1081 A37C Qualcomm Australia: http://www.qualcomm.com.au
- Next message: Gregory G Rose: "Re: Q: Fast computation of parity"
- Previous message: Mok-Kong Shen: "Q: Fast computation of parity"
- In reply to: Tom St Denis: "Re: Math question [polynomial division]"
- Next in thread: Marcel Martin: "Re: Math question [polynomial division]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]