Hacker News new | past | comments | ask | show | jobs | submit login

And with 7 substrings of length 3, it's provably minimal, since making every 3-substring a permutation of 123 forces every element after the first 2. Assuming without loss of generality that it starts with 1 2, it is forced to start with

  1 2 3 1 2 3
but there already repeats the same permutation. So one substring must be wasted (in the article this is phrased as having to traverse one higher cost edge in the corresponding graph).



Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: