3

Is there a decision problem with a time complexity of Ө(n²)?

In other words, I'm looking for a decision problem for which the best known solution has been proven to have a lower bound of N².

I thought about searching for the biggest number in matrix but the problem is that matrix is an input of O(n²) so the solution is linear.

It doesn't need to be known problem, a hypothetical one would suffice as well.

EDIT I looking for a regular programing problem - not a Turing Machine.

It's could be an arrays, strings, graph etc.

  • 1
    You may want to specify a computation model, e.g. Turing Machines, Random Access Machines, ... What is quadratic in one model is not necessarily so on others. – chi Sep 26 '16 at 08:01
  • Your'e right..Done! – Jon Hameratesh Sep 26 '16 at 08:10
  • 6
    "Regular programming problem" is not a model of computation. But it sounds like a random access machine. – David Richerby Sep 26 '16 at 08:54
  • 1
    What are you willing to assume? For example, there are such lower bounds assuming the Strong Exponential Time Hypothesis (SETH), but not everyone believes it is true. – Juho Sep 26 '16 at 11:07
  • @chi So most of the algorithm analysis we do as undergrads in universities in USA using array based languages are most likely RAM based computational complexity analysis? Is it completely different in other models? – Honinbo Shusaku Sep 26 '16 at 12:14
  • 1
    @Abdul Yes. In most "practical" cases, you are assuming a RAM model. In Turing Machines, for instance, complexity may differ. E.g. consider the task: given $(i,x_1,\ldots,x_n)$ return $x_i$. In RAM this can be solved in $O(1)$ since array access is constant-time. Using TMs, we need to scan the whole input, so it's $O(n)$. All "reasonable" computational models have complexity which differ by a polynomial factor, at most, so e.g. solving "P vs NP" in a model suffices for all other models. – chi Sep 26 '16 at 12:37
  • 2
    @Abdul Further, to make things worse, some subfields have different conventions. When dealing with matrices, we usually write $O(n^2)$ even if it is actually linear on the size of the matrix, since we prefer to call $n$ the length of the side. The trivial factorization algorithm for a natural $n$ is $O(n)$ but we regard it as exponential on the number of the digits of $n$, and don't call it "linear-time". One needs to adapt to these conventions and understand their actual meaning -- at the beginning it can be quite confusing. – chi Sep 26 '16 at 12:42
  • @chi Something fuzzy in my understanding is in regards to functional languages; They're designed and influenced greatly by the lambda calculus computational model (I think), but they're used on RAM machines i.e. modern computers. So, if I hypothetically were to do complexity analysis on algorithms implemented in a purely functional language, would this analysis be considered done on a lambda calculus model as opposed to RAM? I preface the question by saying I haven't had an opportunity to look at "purely functional data structures" – Honinbo Shusaku Sep 26 '16 at 12:45
  • @Abdul Great comment. You should turn that into a question :-P I'd like to know a proper answer to that, but probably it's too broad. It is tricky, since it's not completely clear how to precisely define "costs" in FP. The naive approach is to count the number of beta reductions, but this would allow to produce a term of size $2^n$ in only $O(n)$ reductions, which is silly. One could weigh the betas more carefully, but then beta is not the optimal way to run lambda-calculus (!) -- so what should a cost model be? – chi Sep 26 '16 at 12:54
  • @chi Thanks for the link and the suggestion. I've posted a question. – Honinbo Shusaku Sep 26 '16 at 13:13
  • @chi Just FYI, there seems to be a question, that garnered more in depth answers than mine, in regards to the topic in these comments – Honinbo Shusaku Apr 25 '17 at 19:59

1 Answers1

6

Yes: Checking that a string is a palindrome takes $\Omega(n^2)$ on a single tape Turing machine.

In general the time hierachy theorem implies that there are such problems for most reasonable functions.

For RAM, edit distance can't be solved in $O(n^{2-\epsilon})$ for $\epsilon > 0$ unless the strong exponential time hypothesis is false.

adrianN
  • 5,951
  • 18
  • 27