thedesalizes's blog

By thedesalizes, history, 3 years ago, In English

1671E

Why the answer is 16 but not 8 in Example 1? I can only figure out the 8 strings below

  1. B AAAAAAA ABBABAB
  2. B AAAAAAA ABBABBA
  3. B AAAAAAA ABABBAB
  4. B AAAAAAA ABABBBA
  5. B ABBABAB AAAAAAA
  6. B ABBABBA AAAAAAA
  7. B ABABBAB AAAAAAA
  8. B ABABBBA AAAAAAA
  • Vote: I like it
  • 0
  • Vote: I do not like it

»
3 years ago, # |
Rev. 4   Vote: I like it +9 Vote: I do not like it

I think you misinterpreted $$$s_i$$$ and the input. I recommend reading the definition of $$$s_i$$$ and the input again. "B ABBABAB AAAAAAA" is not a valid constellation. The children of $$$s_1$$$ are $$$s_2$$$ and $$$s_3$$$, not $$$s_2$$$ and $$$s_9$$$.

What could've lead to this confusion: The preorder string of input "BAAAAAAAABBABAB" is not "BAAAAAAAABBABAB".

  • »
    »
    3 years ago, # ^ |
      Vote: I like it +9 Vote: I do not like it

    oh, thank you for explaining it to me, i've been confused about this for hours..