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
-2
votes
1 answer

Complexity and logic question - natural numbers $c$ and $d$ such that $f(n) ≤ c · g(n) + d$ from $f ∈ O(g)$

I was working through some problems and got stuck on this question, was hoping for some help. Show that whenever $f\in O(g)$, there are natural numbers $c$ and $d$ such that $f(n)\leq c\cdot g(n) + d$ for all natural numbers $n$.
-2
votes
1 answer

Can we prove that to prove P != NP is NP-Complete.

P!=NP seems to be a very hard question. But I didn't know whether anyone has quantified its hardness. So I ask the following question. Given a suitable formal system F, is finding a proof with less than n symbols for P != NP an NP-complete problem?…
-2
votes
1 answer

Complexity in Mathematics

How does one decide whether a theorem is qualitatively complex rather than hard? Namely, how does one know when the proof of the theorem is irreducibly complex up to the least amount of computational steps required for a theorem's proof to Q.E.D.
-2
votes
1 answer

What is the asymptotically fastest known exponentation algorithm?

What is the fastest known algorithm for computing an exponential in binary? It seems that the most straightforward one computes exponentiation in cubic time. I'm wondering what the asymptotically fastest know one is. It is good enough for me to find…
Timothy
  • 793
-2
votes
1 answer

how to solve this recursive function T(n) = T(n/2) + O(n)

T(n) = O(1) + O(1) + T(n/2) + T(n/2) + O(n) = T(n/2) + O(n) = (T(n/4) + O(n/2))+ O(n) = ((T(n/8)+ O(n/4)) + O(n/2))+ O(n) = T(n/2k ) + O(n) = O(n) Base condition: T(1) = 1. Can someone please help me where i am going wrong
-2
votes
1 answer

A quicker algorithm.

Consider an algorithm which essentially counts to a certain number then halts. Counting Algorithm C Given any $n \in \Bbb N$ Step 1 $x_0=0$ Step 2 $\text{if} (x_n =n)\ \text{then}(\text{halt}) $ Step 3 $x_n=x_{n-1}+1$ Step 4 $\text{go to Step…
-4
votes
2 answers

How long would it take to test all possible states of a 64x64x64 cube of bits?

Imagining a solid cube of $64 \times 64 \times 64$ bits (each of which can have exactly two states), how long would it take to test all possible states of one of these? Let's also assume we're using the world's current most powerful supercomputer,…
Ky -
  • 1,300
1 2 3
22
23