Talk:Addition-chain exponentiation: Difference between revisions

Line 72:
::Computing optimal addition chains for a sequence of multiplications is harder than for a single multiplication. I believe I have an implementation for the simple case asked for here. --[[User:Rdm|Rdm]] 16:39, 27 August 2011 (UTC)
::That said, the requested matrix multiplications look to be producing ridiculously large results. When I tried using floating point, I got a result full of negative and positive infinities. So computing the result will require extended precision numbers and I expect the result will be quite verbose. --[[User:Rdm|Rdm]] 16:44, 27 August 2011 (UTC)
:::Oh well, turns out that my approach is non-optimal in some cases. When I compare the first 100 exponents (1..100) with the A003313 values listed in the task description, I am using one multiplication too many for these cases: 23 31 33 43 46 47 49 59 61 62 65 66 69 77 79 83 86 92 93 94 98 99. Here are two of my cases where I should be doing better: <lang j> addch 31
A*B*C*D*D*D=:C*C=:B*B=:A*A
addch 33
D*D*D =:A*B*C*C=:B*B=:A*A</lang> --[[User:Rdm|Rdm]] 17:06, 27 August 2011 (UTC)
6,962

edits