R i, . :
, R 1 → R 3, R 1/R 3= P3 * P4/P1
, R | 2.
, , , . , MST ( , log(log(log(...log(n)...)))); , . http://www.akira.ruc.dk/~keld/teaching/algoritmedesign_f04/Artikler/07/Karger95.pdf , | R | 2.
, , "" , , . , :
R1 = {P2, P3, P4, P5}
R2 = {P1, P3, P4, P5}
R3 = {P1, P2, P4, P5}
R4 = {P1, P2, P3, P5}
R5 = {P1, P2, P3, P4}
P1*P2*P3*P4*P5, P i, 9 . - R1 = P2 * P3 * P4 * P5, , R1 → R2, R2 → R3, R3 → R4, R4 → R5, 11 . ( , 9 : b = P1 * P2 c = b * P3 r5 = c * P4 r4 = c * P5, d = P4 * P5, r3 = b * d, e = P3 * d, r1 = e * P2, r2 = e * P1. , , , , , , , .)
" ". ( ), , , ( ).
:
Theorem:
You should have at least one intermediate expression of each
length up to the maximum size of any R.
Proof (induction):
To build up a product of size N, you will need to do
have a product of size N-1.
, , . P1*P2*P3 P1*P2*P3*P4 P1*P2*P3*P4*P5. R5 ( R4 , , , ), 9 8. , http://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm .
, ? node, MST. , E , P p (, p = 2 , , P1 * P4^2 / P3, - P2^3), . ( .) , , . , MST, , , (| R | + #newedges) 2= (| R | ^ | P |) 2 , , .
, NP-hard, ; , - , . . , "" R " Ps", -, Ps. "/ Ps", R, MST, , . , .
(sidenote: , , .)