Questions tagged [computational-complexity]

Use for questions about the efficiency of a specific algorithm (the amount of resources, such as running time or memory, that it requires) or for questions about the efficiency of any algorithm solving a given problem.

Computational complexity is a part of theoretical computer science that answers questions about how efficient an algorithm is:

  • How much time (as a function of the size of the input) does the algorithm take to produce its output?
  • How much space (such as computer memory) does it require?
  • How much of some other resource does it consume? (For example, this can be the size of a logic circuit solving the problem, or the number of bits of randomness used by a probabilistic algorithm.)

We can similarly ask about the computational complexity of any algorithm that solves a given problem.

Often, very specific details of these answers (such as constant factors or additive terms) depend on specific details such as the computer you're using. To help deal with this, we often stick to determining the asymptotic complexity of an algorithm: see for more details.

A major problem in computational complexity is the P versus NP problem, which asks if a certain class of problems can be solved by an algorithm that runs in a number of steps that's a polynomial function of the input size.

3433 questions
16
votes
2 answers

If an unary language exists in NPC then P=NP

I've a question regarding a theorem in Complexity Theory. It is said that if there exists an unary language in NPC then P=NP e.g if {1}* in NPC then the above is correct. It means that there exists a Karp reduction from SAT to L, the reduction is as…
12
votes
2 answers

Could someone prove they had a halting oracle?

Suppose someone comes to you and claims to have a halting oracle. Is there any way for you to verify the truth or falsity of their claim in finite time? If so, what constraints on the proof process are there? Does the verification have to be…
Craig
  • 3,536
8
votes
4 answers

In general, in a string of multiplication is it better to multiply the big numbers or the small numbers first?

Let's say we had to evaluate the following string of multiplications $5 \times 6 \times 7 \times 8$ , we could, for instance, order it by doing the biggest multiplications first: $$ 5 \times \left( 6 \times \left( 7 \times 8 \right) \right)$$ Or,…
7
votes
1 answer

Why is NP not equal to P^NP?

If something can be decided in polynomial time with an NP oracle, why isn't it in NP? You would think that if you ran a polynomial-time nondeterministic Turing machine polynomially many times, that would only increase its effort by a polynomial…
Jessica
  • 449
7
votes
1 answer

What is so wrong with polynomial hierarchy collapsing

Many computational complexity researchers believe that finite-level collapse of polynomial hierarchy is unlikely. Why do they believe like this?
Zat Mack
  • 575
6
votes
3 answers

Are all undecidable problems NP-Hard?

So, I need the answer to the question in the title: Are all undecidable problems NP-hard? If I have some undecidable problem (for example, Post correspondence problem), can I say it's NP-hard, and how to prove it?
Meow
  • 1,910
6
votes
0 answers

Computational complexity and commuting functions

We have two functions: $$ f: \{0,1\}^* \to \{0,1\}^* $$ $$ g: \{0,1\}^* \to \{0,1\}^* $$ that commute: $$ f[g(x)] = g[f(x)] $$ These two functions can be calculated in polynomial time (in the length of the input). Moreover, the outputs have the…
6
votes
2 answers

Understanding the Pumping Lemma

I have been having an extremely hard time proving a language is irregular using the pumping lemma. I looked and dozens of examples and spent hours on this one topic, and I am still not able to wrap my head around it. Below is my first example that I…
6
votes
2 answers

Time complexity - Why does doubling the speed given this improvement?

Hi I've been studying time complexity recently and I'm really confused about something I've come across. The problem Suppose we can solve a size n problem instance in 1 hour. If we double the machine speed, how big a problem instance can we now…
5
votes
2 answers

Is drawing the Voronoi diagram NP-hard?

Suppose we have a set of points in the plane. Is computational complexity defined to draw the Voronoi diagrams of these points? Since the plan is continuous I don't see how complexity can be defined. Please explain. On the other hand if we…
seek
  • 391
5
votes
1 answer

Fooling set method

In the book Computational Complexity (By Sanjeev Arora and Boaz Barak) a method called "The fooling set" is mentioned, when trying to bound the communication complexity of a function from below. A google search brough up the relevant chapter online.…
real
  • 188
4
votes
1 answer

How to show that the complexity of a function is $O(\text{polynomial})$

Let $A=\{1,2,4,8,16,32,...,2^k,...\}$, and let $f:A\to \mathbb{N}$ be defined by : $$f(n)=\binom{n}{\log n}=\frac{n!}{(\log n)!*(n-\log n)!}$$ I would like to find out if there exist a polynomial $P(n)$ such that $f(n)=O(P(n))$. This can help me in…
Belgi
  • 23,150
4
votes
1 answer

Is there any decidable problem that is NOT NP-HARD?

Is there a proof that there exists a decidable problem that is NOT NP-HARD??
rakesh
  • 123
4
votes
2 answers

Method of Modeling Problem Complexity

Is there a standard way to model the complexity of a mathematical problem? If so, what are the best online resources to learn more about it? Honestly don't have an even a basic way to model the complexity of a problem other than "depth" of concepts…
blunders
  • 263
4
votes
1 answer

Is SAT in P^{SAT}?

I'm trying to wrap my head around relativization in non-Turing machine settings (for example, what is the "natural" relativized version of Graph Isomorphism to an oracle A?). So I went to Wikipedia to look up relativization, and it gave me the…
Craig
  • 3,536
1
2 3
22 23