Introducton Rnk One Updte And the Google Mtrx y Al Bernsten Sgnl Scence, LLC www.sgnlscence.net here re two dfferent wys to perform mtrx multplctons. he frst uses dot product formulton nd the second uses n outer product formulton. Both methods use the sme numer of opertons - O(n 3 ); however, the outer product formulton s very prllelzle. It lso gves huge performnce dvntge for equtons of the form M A A - requrng only the memory to store the result M.If A s 1000000 x 3 mtrx, then M s 3 x 3 mtrx. he dot product formulton requres storng A, A - 2 1000000 x 3 mtrces, nd the result M - 3 x 3 mtrx. he outer product formulton requres storng only the result M - 3 x 3 mtrx. A rnk one updte s n operton where mtrx cn e updted usng n outer product. hs updte provdes the sme effcency dvntges s the outer product mtrx multplcton formulton nd wll e dscussed lter n ths pper. Mth Dervtons nd Dscusson Equton (1) shows the dot product formulton for of the, j th element of the mtrx multplcton -A B. B j A, kk, j k, (1) he sum s over the dummy vrle k ( k 1,, ). ote tht the ndces nd j re ndependent vrles nput y the user of the equton. he ndex k cts s n ndexer on the rght hnd sde of the equton only nd s not conveyed outsde the equton. hs ndex s clled dummy vrle ecuse f we chnge ndex k to l there s no dfference n the results of the equton. However, chngng the ndces or j chnges the clculton. hs s the stndrd mtrx multplcton Equton (2) shows the computton of B wth =1 nd j=1 s A, j
(2) A B 1, 1,, 1 he full mtrx multplcton s shown n equton (3) A B,1 (3) otce tht n equton (1) the ndces nd j re fxed vrles - we specfy these on the left sde of the equton y pckng the th, nd j th elements. here s nother wy to look t ths equton - keep the ndces nd j free vrles s shown n equton (). A B, k, () 1 k k j where k. In ths cse the multplcton for ech k s mtrx. hs mtrx multplcton formul s the clled the outer product formulton nd s shown elow: A B,1 (5) ote tht equton (3) grees wth equton (5) An outer product operton s defned s follows: j 0 0 0 0 (6)
Rememer: s column vector nd s row vector Equton (5), expressed n outer product notton s shown n equton (7) A B (7) 1 ote tht n ths formulton, the vectors nd do not hve to e the sme length. If s of length M nd s of length, the resultng mtrx A B wll n M y mtrx see exmple III.) elow. he mtrces need to hve the correct dmensons for the product A B to e true. Also, Equton (7) s redly prllelzle ecuse ech outer product could e done n prllel nd then dded together. umercl Exmples Whle the ove dscusson provdes lot of nsght, smple exmple wll clrfy I.) Stndrd Mtrx Multplcton 1 A 7 2 5 8 3 6 9 10 B 13 16 11 1 17 12 15 18 8 90 96 A B 201 216 231 (8) 318 32 366 II.) Outer Product Mtrx Multplcton 1 2 3 A B 18 7 8 9 10 11 12 5 13 1 15 6 16 17 10 0 70 11 77 12 26 8 65 8 10 28 70 112 30 8 75 96 120 1 51 102 153 5 8 108 201 162 318 90 216 32 96 231 366 (9) Sums mke outer product formulton redly prllelzle.
III.) Cse where A nd B hve dfferent dmensons 1.) Stndrd Multplcton A 1 2 3 5 6 10 B 13 16 11 1 17 12 15 18 8 90 96 AB 201 216 231 (10) Outer Product Multplcton A 1 2 3 10 11 12 B 10 11 12 13 1 15 16 17 18 5 6 0 8 26 28 30 8 51 5 8 90 96 65 70 75 96 102 108 201 216 231 (11) Rnk One Updte A Rnk One updte s defned s n operton where mtrx cn e updted usng n outer product s shown n equton (12) A (12) ote: Equton (12) llows the mtrx A to e updted wthout needed ddtonl memory to perform the clculton. For exmple, consder equton (13) A A (13) where s row vector wth the sme row length s A hs equton dds mesurements to the system wthout needng ddtonl memory. For exmple, let A e 10000 x 5 mtrx nd let ech row n ths mtrx represent mesurement of 5 prmeters. If we cll the th row n A, (row vector) then n A, s the row vector trnsposed column vector. hen, A A, usng the outer product method, wll e 5 x 5 mtrx no mtter how mny mesurements re tken. he Rnk One updte s huge performnce svngs.
IV.) Rnk One Updte n Acton Frst, Clculte AA for 3 rows (mesurements) 1 A 7 2 5 8 3 6 9 (1) 66 78 90 AA 78 93 108 90 108 126 (15) ow strt wth A 1 2 3 5 6 (16) 17 22 27 AA 22 29 36 27 36 5 (17) 7 8 9 (18) Equton (18) s vector representng the 3 rd row n the orgnl mtrx A. he Rnk One Updte shows how to use the outer product - - to updte equton (17) nd recover equton (15). 17 22 27 7 17 22 27 9 56 63 66 78 90 A A 22 29 36 8 7 8 9 22 29 36 56 6 72 78 93 108 27 36 5 9 27 36 5 63 72 81 90 108 126 whch gves the sme results s equton (15) he Google Mtrx he Google mtrx, G, s defned n equton (19) G where ( 1) n S e e (19) 2
sclr numer etween 0 nd 1 n numer of pges n serch spce, e s row vector where ll the elements hve the vlue (1/n), ote: he Rnk One Updte looks lke t s trnsposed compred wth equton (12). hs s ecuse e s defned s column vector - e s defned s row vector n equton (19). S - defned y equton (20) s S n H e (20) where s column vector of dnglng lnks; 0 f the lnk on the th node s dnglng ( node tht s does not nvgte to nother pge on the we such s fle) - nd s 1 otherwse. H s the hyperlnk mtrx whch represents grph of how we pges re connected through lnks. hs wrte up s not ntended to go nto detl out the Google pge rnk lgorthm. he mn pont here s tht equtons (19) nd (20) oth use the Rnk One Updte (13) whch hs performnce dvntges. References 1 Gerld Bermn, Ftorzng Methods for Dscrete Sequentl Estmton, Acdemc Press, 1977, pge 25 2 Lngvlle nd Meyer, Google s Pge Rnk nd Beyond, Prnceton Unversty Press, 2006, pp 37-38