DescriptionFarmerJohnhasreceivedanoisecomplaintfromhisneighbor,FarmerBob,statingthathiscowsaremakingtoomuchnoise.FJ'sNcows(1<=N<=10,000)allgrazeatvariouslocationsonalongone-dimensionalpasture.Thecowsareverychattyanimals.Everypairofcowssimultaneouslycarriesonaconversation(soeverycowissimultaneouslyMOOingatalloftheN-1othercows).WhencowiMOOsatcowj,thevolumeofthisMOOmustbee...
QuiterecentlyacreativestudentLeshahadalectureontrees.AfterthelectureLeshawasinspiredandcameupwiththetreeofhisownwhichhecalleda k-tree.A k-treeisaninfiniterootedtreewhere:eachvertexhasexactly k children;eachedgehassomeweight;ifwelookattheedgesthatgoesfromsomevertextoitschildren(exactly k edges),thentheirweightswillequal 1, 2, 3, ..., k.Thepicturebelowshowsapartofa3-tree.  ...
近期评论