Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 2
    Holy *@!!, these are FRACTALS! If this holds up, it puts an upper bound on the number of 1's, and it's less than O(n). Commented Oct 15, 2009 at 18:38
  • fractals, that's a much better term to describe them. Thanks Commented Oct 15, 2009 at 18:51
  • Interesting, these patterns closely resembles Cantor's ternary set (en.wikipedia.org/wiki/Cantor_set). If this is so, then the proportion of ones has to tend to zero... Commented Oct 15, 2009 at 20:25
  • Is it obvious that the sequences with the maximum number of 1s without triples are directly relevant to the worst-case running time of the algorithm? It is conceivable that you could have strings with lots of 1s but in which you only find the triples very late, as those 1s are in the positions that are examined late by your algorithm. Commented Oct 16, 2009 at 12:28
  • 3
    My analysis of the number of ones in the strings compared to their overall size seems to indicate that there is a linear relationship between number of ones and size of string, leading me to believe that there is no happy upper bound that lets us say that the number of ones in a string will be at most log(n) for a given string. So the solutions dealing only with the positions of the ones and not the entire string itself are going to be O(n^2), too. Or, more accurately, O(n+m^2), where m is the number of ones in the string, and n is the size of the string, and m is big-theta(n). Commented Oct 16, 2009 at 14:52