▁cost ▁of ▁concaten ating ▁two ▁strings ▁of ▁length ▁m ▁and ▁n ▁using ▁str cat ▁is ▁O ( m   +   n ), ▁since ▁we ▁need ▁O ( m ) ▁time ▁to ▁find ▁the ▁end ▁of ▁the ▁first ▁string ▁and ▁O ( n ) ▁time ▁to ▁copy ▁the ▁second ▁string ▁onto ▁the ▁end ▁of ▁it . ▁Using ▁this ▁cost ▁function , ▁we ▁can ▁write ▁a ▁dynamic ▁programming ▁algorithm ▁to ▁find ▁the ▁fast est ▁way ▁to ▁concaten ate ▁a ▁sequence ▁of ▁strings . ▁However , ▁this ▁optimization ▁is ▁rather ▁useless ▁because ▁we ▁can ▁straightforward ly ▁concaten ate ▁the ▁strings ▁in ▁time ▁proportional ▁to ▁the ▁sum ▁of ▁their ▁lengths . ▁A ▁similar ▁problem ▁exists ▁for ▁sing ly ▁linked ▁lists . ▁ ▁Another ▁general ization ▁is ▁to ▁solve ▁the ▁problem ▁when ▁parallel ▁process ors ▁are ▁available . ▁In ▁this ▁case , ▁instead ▁of ▁adding ▁the ▁costs ▁of ▁computing ▁each ▁factor ▁of ▁a ▁matrix ▁product , ▁we ▁take ▁the ▁maximum ▁because ▁we ▁can ▁do ▁them ▁simultaneously . ▁This ▁can ▁dr ast ically ▁affect ▁both ▁the ▁minimum ▁cost ▁and ▁the ▁final ▁optimal ▁grouping ; ▁more ▁" bal anced " ▁group ings ▁that ▁keep ▁all ▁the ▁process ors ▁busy ▁are ▁fav ored . ▁There ▁are ▁even ▁more ▁s oph istic ated ▁approaches . ▁ ▁See ▁also ▁ ▁Ass ocia hed ron ▁Tam ari ▁lattice ▁ ▁References ▁▁ ▁Category : Opt im ization ▁algorithms ▁and ▁methods ▁Category : M atr ices ▁Category : Dynamic ▁programming <0x0A> </s> ▁Est her ▁H unt ▁( Se ptember ▁ 4 , ▁ 1 7