Menu Close

sequence-of-string-said-to-be-orderly-if-element-index-i-different-to-i-1-for-example-aba-has-orderly-value-2-abab-has-orderly-value-3-abaabb-has-orderly-value-3-if-there-are-7-a-and-13-b-exa




Question Number 195666 by uchihayahia last updated on 07/Aug/23
   sequence of string said to be orderly   if element index i different to i+1   for example   aba has orderly value 2   abab has orderly value 3   abaabb has orderly value 3   if there are 7 a and 13 b   example   aaaaaaabbbbbbbbbbbbb has orderly value 1   what is the mean of its orderly value   for all possible sequences?
sequenceofstringsaidtobeorderlyifelementindexidifferenttoi+1forexampleabahasorderlyvalue2ababhasorderlyvalue3abaabbhasorderlyvalue3ifthereare7aand13bexampleaaaaaaabbbbbbbbbbbbbhasorderlyvalue1whatisthemeanofitsorderlyvalueforallpossiblesequences?
Commented by mr W last updated on 09/Aug/23
i got 9.1 in a tough way, see below.  do you also have a solution?
igot9.1inatoughway,seebelow.doyoualsohaveasolution?
Commented by uchihayahia last updated on 09/Aug/23
i don′t, i tried solving it using python   too much time needed
idont,itriedsolvingitusingpythontoomuchtimeneeded
Answered by mr W last updated on 09/Aug/23
7 “a” and 13 “b”  n=orderly value  n_(min) =1  n_(max) =14  in following  A means a box containing one or   more letters “a”  B means a box containing one or   more letters “b”    n=1:  A∣B ⇒1 way  B∣A ⇒1 way                 −−−  2  n=2:  A∣B∣A ⇒ 6×1=6 ways  B∣A∣B ⇒ 1×12=12 ways                                      −−− 18  n=3:  A∣B∣A ∣B⇒ 6×12=72 ways  B∣A∣B ∣A⇒ 6×12=72 ways                                         −−− 144  n=4:  A∣B∣A ∣B∣A⇒ 15×12=180 ways  B∣A∣B ∣A∣B⇒ 6×66= 396 ways                                                −−− 576  n=5:  A∣B ∣A∣B∣A∣B⇒ 15×66=990 ways  B∣A∣B ∣A∣B∣A⇒ 15×66=990 ways                                                      −−− 1980  n=6:  A∣B ∣A∣B∣A∣B∣A⇒ 20×66=1320 ways  B∣A∣B ∣A∣B∣A∣B⇒ 15×220=3300 ways                                                   −−− 4620  n=7:  A∣B ∣A∣B∣A∣B∣A∣B⇒ 20×220=4400 ways  B∣A∣B ∣A∣B∣A∣B∣A⇒ 20×220=4400 ways                                                          −−− 8800  n=8:  A∣B ∣A∣B∣A∣B∣A∣B∣A⇒ 15×220=3300 ways  B∣A∣B ∣A∣B∣A∣B∣A∣B⇒ 20×495=9900 ways                                                        −−− 13200  n=9:  A∣B ∣A∣B∣A∣B∣A∣B∣A∣B⇒ 15×495=7425 ways  B ∣A∣B∣A∣B∣A∣B∣A∣B∣A⇒ 15×495=7425 ways                                                        −−− 14850  n=10:  A∣B ∣A∣B∣A∣B∣A∣B∣A∣B∣A⇒ 6×495=2970 ways  B ∣A∣B∣A∣B∣A∣B∣A∣B∣A∣B⇒ 15×792=11880 ways                                                        −−− 14850  n=11:  A∣B ∣A∣B∣A∣B∣A∣B∣A∣B∣A∣B⇒ 6×792=4752 ways  B ∣A∣B∣A∣B∣A∣B∣A∣B∣A∣B∣A⇒ 6×792=4752 ways                                                        −−− 9504  n=12:  A∣B ∣A∣B∣A∣B∣A∣B∣A∣B∣A∣B∣A⇒ 1×792=792 ways  B ∣A∣B∣A∣B∣A∣B∣A∣B∣A∣B∣A∣B⇒ 6×924=5544 ways                                                        −−− 6336  n=13:  A∣B ∣A∣B∣A∣B∣A∣B∣A∣B∣A∣B∣A∣B⇒ 1×924=924 ways  B ∣A∣B∣A∣B∣A∣B∣A∣B∣A∣B∣A∣B∣A⇒ 1×924=924 ways                                                        −−− 1848  n=14:  B ∣A∣B∣A∣B∣A∣B∣A∣B∣A∣B∣A∣B∣A∣B⇒ 1×792=792 ways                                                        −−− 792    mean=((2×1+18×2+144×3+576×4+1980×5+4620×6+8800×7+13200×8+14850×9+14850×10+9504×11+6336×12+1848×13+792×14)/(2+18+144+576+1980+4620+8800+13200+14850+14850+9504+6336+1848+792))              =((705 432)/(77 520))=9.1 ✓    check:  number of total possibilities   =((20!)/(7!×13!))=77 520 ✓
7aand13bn=orderlyvaluenmin=1nmax=14infollowingAmeansaboxcontainingoneormorelettersaBmeansaboxcontainingoneormorelettersbn=1:AB1wayBA1way2n=2:ABA6×1=6waysBAB1×12=12ways18n=3:ABAB6×12=72waysBABA6×12=72ways144n=4:ABABA15×12=180waysBABAB6×66=396ways576n=5:ABABAB15×66=990waysBABABA15×66=990ways1980n=6:ABABABA20×66=1320waysBABABAB15×220=3300ways4620n=7:ABABABAB20×220=4400waysBABABABA20×220=4400ways8800n=8:ABABABABA15×220=3300waysBABABABAB20×495=9900ways13200n=9:ABABABABAB15×495=7425waysBABABABABA15×495=7425ways14850n=10:ABABABABABA6×495=2970waysBABABABABAB15×792=11880ways14850n=11:ABABABABABAB6×792=4752waysBABABABABABA6×792=4752ways9504n=12:ABABABABABABA1×792=792waysBABABABABABAB6×924=5544ways6336n=13:ABABABABABABAB1×924=924waysBABABABABABABA1×924=924ways1848n=14:BABABABABABABAB1×792=792ways792mean=2×1+18×2+144×3+576×4+1980×5+4620×6+8800×7+13200×8+14850×9+14850×10+9504×11+6336×12+1848×13+792×142+18+144+576+1980+4620+8800+13200+14850+14850+9504+6336+1848+792=70543277520=9.1check:numberoftotalpossibilities=20!7!×13!=77520
Commented by uchihayahia last updated on 09/Aug/23
 thanks you, i′ll do my best to understand your   answer. still studying basic combinatrics
thanksyou,illdomybesttounderstandyouranswer.stillstudyingbasiccombinatrics
Commented by mr W last updated on 09/Aug/23
i′ll give some explanation for my  solution.  example:  the orderly value is n=4.   that means there are 4  places where a “a” and a “b” are  next to each other. such a place is  marked as “∣”. we have two cases:  case 1: A∣B∣A ∣B∣A  to distribute 7 “a” in 3 boxes there are  C_(7−1) ^(3−1) =15 ways  to distribute 13 “b” in 2 boxes there are  C_(13−1) ^(2−1) =12 ways  ⇒ totally 15×12=180 ways  case 2: B∣A∣B ∣A∣B  to distribute 7 “a” in 2 boxes there are  C_(7−1) ^(2−1) =6 ways  to distribute 13 “b” in 3 boxes there are  C_(13−1) ^(3−1) =66 ways  ⇒totally  6×66= 396 ways  therefore there are 180+396=576   possibilities for the orderly value 4.
illgivesomeexplanationformysolution.example:theorderlyvalueisn=4.thatmeansthereare4placeswhereaaandabarenexttoeachother.suchaplaceismarkedas.wehavetwocases:case1:ABABAtodistribute7ain3boxesthereareC7131=15waystodistribute13bin2boxesthereareC13121=12waystotally15×12=180wayscase2:BABABtodistribute7ain2boxesthereareC7121=6waystodistribute13bin3boxesthereareC13131=66waystotally6×66=396waysthereforethereare180+396=576possibilitiesfortheorderlyvalue4.
Commented by uchihayahia last updated on 11/Aug/23
 thanks, still lot of work i guess. i asked   my friend and told me 9.1 is the correct   answer
thanks,stilllotofworkiguess.iaskedmyfriendandtoldme9.1isthecorrectanswer
Commented by mr W last updated on 11/Aug/23
anyway my answer 9.1 is correct.  can your friend tell us how he solved?
anywaymyanswer9.1iscorrect.canyourfriendtellushowhesolved?
Commented by uchihayahia last updated on 12/Aug/23
 he didn′t tell me, he said the answer   is long and laborous. but the idea is the same
hedidnttellme,hesaidtheanswerislongandlaborous.buttheideaisthesame
Commented by mr W last updated on 12/Aug/23
i also think there is no more simple  way than that of mine.
ialsothinkthereisnomoresimplewaythanthatofmine.

Leave a Reply

Your email address will not be published. Required fields are marked *