Computational complexity, a part of theoretical computer science that deals with understanding how efficiently a problem can be solved.

learn more… | top users | synonyms (1)

1
vote
1answer
27 views

What's the complexity of expanding a general polynomial?

Suppose I have a polynomial in the form $(a_1 x_1+ a_2 x_2+...+ a_m x_m)^n$, where $x_1,...,x_m$ are the independent variables. I want to expand it to the form of sum of products. What is the ...
0
votes
0answers
48 views

Recursive Set and Complement Problem

if we have $$A=\{x:|W_x\ne\phi\}$$ can we say always my tight listed below is true? $A$ is recursive , $A$ is r.e, complement of $A$ is r.e, complement of $A$ is not recursive?
0
votes
1answer
55 views

Double sigma summation is in complexity calculation

Basically i was reading skiena and doing exercise of 2nd chapter.The result of my calculation got differed from the actual solution given on Solution site and there is one thing i don't understand how ...
1
vote
3answers
52 views

Confused with the definition of NP

In the blog post at: Concrete Nonsense I read: NP is the set of problems that can be solved by polynomial-time non-deterministic algorithms. An equivalent definition of NP is the set of ...
0
votes
0answers
31 views

Using the pumping lemma to prove that a certain language is not regular

I've been trying to understand the pumping lemma since forever, I just don't know what it does, I have no clue what any of it does. My college professor sucks, he thinks writing a bunch of stuff on a ...
0
votes
1answer
46 views

What is the time complexity of an $O((\ln n)^{\ln n})$ algorithm?

How can the time complexity of an $O((\ln n)^{\ln n})$ algorithm be simplified and compared to some other time complexities?
0
votes
1answer
28 views

Reduction between languages in P

I have a simple question about the class P: Is there exist a polynomial time reduction between every two languages A, B in P?
2
votes
1answer
63 views

Simple question on complexity

I just started to learn the complexity theory, and I have a simple question: Let's say that there's a language B in NP, such that there's no polynomial reduction from B to a given language A (which ...
1
vote
1answer
23 views

Trying to prove something in complexity

I just started to learn about complexity-theory, and I'm trying to prove this: If P=NP, then every (non-trivial) language in P is NP-complete. Can someone give me a solution please?
0
votes
0answers
26 views

Complexity of and an algorithm for finding ideals of a ring?

One of the problems that has been a roadblock in my understanding of ideals has been how one would find them. One way of finding an I of some ring R would be to say $ \forall x \in I, \forall r \in R ...
0
votes
1answer
44 views

Prove in complexity theory

Given a language A, which is in NP and also not NP-complete, I have to prove that P != NP. [Note: A is not trivial] Any suggestions?
0
votes
2answers
75 views

$O(n^{\log(n)}) $ time algorithms

Is $O(n^{\log(n)}) $ time algorithm considered of exponential time ? Is it applicable ?
1
vote
1answer
41 views

Generalization of Jacobi symbol for higher powers?

Let $n$ be an odd positive integer of unknown factorization, and let $x$ be relatively prime to $n$. The Jacobi symbol $\left(\frac{x}{n}\right)$ gives me partial information on whether $x$ is a ...
1
vote
0answers
65 views

Find a simple Theta bound for a geometric series

I'm working on a question like: find a simple g(n) (big theta) for $ f(n) = \sum _{i=1}^n 5^i $ My working starts with this $\frac{5-5^n}{1-5}$ which is not equivalent to the correct answer from ...
0
votes
1answer
25 views

Complexity class notation

In my CS courses we often use Big-O notation to denote the complexity of a certain calculation. However, we often also write stuff like: $$mO(1) = O(m),$$ or: $$O(m) + O(n) = O(m+n) = ...
0
votes
1answer
36 views

Computational complexity of numerical integration of gaussian function

$ \int^{b}_{a} \exp(-x^2)\,dx$. I have the following two questions regarding the above integral expression of the Gaussian function: Is there a numerical method we can use to solve the above ...
0
votes
0answers
327 views

Calculating time complexity of algorithms written in pseudocode.

Nowadays we are interested to find some algorithms with a prescribed running time. For example if for certain decisional problem $X$ there is an algorithm with running time $O(n^3)$ we try to break ...
2
votes
2answers
48 views

Problem on time complexity

If $a = O(m)$ and $b = O(n)$, is it true that $a+b = O(m+n)$? I would try to break it down to $a \le cm$ for some $c$ and $b \le dn$ for some $d$, so if I were to add the right hand side, it would be ...
0
votes
0answers
35 views

Is there a fast algorithm for computing the $(2^n)+1$ th last digit of $3^{2^n}$ in base $2$?

Is there an algorithm such that for some polynomial p, it always computes the $(2^n)+1$ th last digit of $3^{2^n}$ in base $2$ in at most p(n) steps for all nonnegative integers n? I'm only asking if ...
1
vote
1answer
99 views

Mixed Q horn SAT

I am familiar with Horn formula: Formula whose clauses have atmost one positive literal. I am also familiar with Mixed Horn formula: Formula whose clauses are either 2 CNF or Horn. Question 1: But, ...
0
votes
2answers
26 views

Multiplying Big-Os

I've seen the following in a text: $\mathcal{O}(\sqrt{n})\cdot \mathcal{O}(n\log n)$ How is that even defined? Ok, I guess one can replace it with: $\mathcal{O}(\sqrt{n} \, n\log n)$ Is that ...
0
votes
1answer
23 views

Find subset sum problem verifier and its complexity

As homework we need to find a P-verifier for the subset sum problem. Given: natural numbers $a_1, \cdots, a_n$ and $b$ Output: YES if there is a subset $S \subseteq \{a_1,\cdots,a_n\}$ where ...
0
votes
0answers
55 views

Master Theorem and Logarithms

I am really struggling to understand the Master Theorem when in a formula: T(n) = aT(n/2) + f(n) f(n) takes the form of log(n), nlog(n) or nlog^k(k) For ...
1
vote
1answer
95 views

Questions about a computer science field

I would like to have some information about the computer science field, " Algorithmic and Systems Analysis ". Is this a field of theoretical computer science? What subjects are related with this ...
1
vote
0answers
27 views

Directed Hamiltonian Reduction

The reduction function given by Richard Karp in 'Reducibility among combinatorial problems' for Directed Hamiltonian Cycle $\leq_{p}$ Undirected Hamiltonian Cycle goes as follows : for input $G = ...
-2
votes
1answer
57 views

Prove that $\log n = O(\log^2 n)$

Trying to solve this, but I can't seem to figure it out. Its fairly straight forward.
-2
votes
1answer
42 views

Blum's axioms and the space complexity measure

I'm asked to prove that the measure $\Gamma_e(x) = s ~ ~ \iff ~ ~ \varphi_e(x)$ uses exactly $s$ work tape cells (i.e. once it halts, the number of tape cells used by a Turing machine to compute it is ...
1
vote
1answer
28 views

Polynomial Reduction for restriction

I ran across a polynomial reduction that used the fact that one language was a restriction of the other. Is that statement really true? $$ L_1 \subseteq L_2 \rightarrow L_2 \leq_{p} L_1 $$ Thanks!
0
votes
1answer
31 views

Why $T(n) = 2T(n-1) + O(1)$ is $\Omega(2^n)$?

I was told that the complexity of $T(n) = 2T(n-1) + O(1)$ is $\Omega(2^n)$; however, since I was not convinced, I searched in the Internet and all I found is that problem or very similar ones with ...
4
votes
0answers
73 views

How to efficiently calculate $ax+b$ once I know $a$ and $b$?

What's the cheapest way to calculate $ax+b$ several times once I know the values for $a$ and $b$? For instance, the cheapest way to calculate $a+b+x$ several times once I know the values for $a$ and ...
2
votes
1answer
31 views

Checking if a graph is bipartite is $O(n)$

It seems to me that checking if a graph is bipartite (or biclique) has deterministic time complexity $O(n)$, where $n=|V|^2$, since we clearly have to iterate over all the elements of the incidence ...
0
votes
0answers
30 views

Algorithmic Complexity of Linear Independence

Given n m-dimensional vectors. You can determine linear independence by Gaussian elimination. http://en.wikipedia.org/wiki/Gaussian_elimination#Computational_efficiency Checking linear independence ...
0
votes
0answers
43 views

complexity of feasibility checking for a convex optimization problem

I just want to check with you all whether I understand it correctly or not. If I have a convex optimization problem like \begin{align} &\min \quad f(x) \\ & s.t. \quad h(x)≤0, \end{align} and ...
1
vote
1answer
107 views

Is NP countable?

Is NP countable? I am confused with this problem. I think it is not countable but I am not sure. Can someone prove whether it is countable? Please show your proof. Thank you for your time!
0
votes
2answers
55 views

key generation in RSA cryptosystem: why it can be performed in polynomial time?

Suppose that I want to generate the keys of the RSA cryptosystem: the public key will be the couple $(n,e)$ where $n$ is the product of two primes $p$ and $q$ and gcd$(\phi(n),e)=1$.The private key ...
1
vote
1answer
109 views

Solving recurrence relation: f(n) = 3f(n/2) - 2f(n/4) | f(2) = 5, f(1) = 3

f(n) = 3f(n/2) - 2f(n/4) | f(2) = 5, f(1) = 3 I have attempted to solve it by letting n = 2k f(2k) = 3f(2k-1) - 2f(2k-2) Then set S(k) = f(2k) S(k) = 3*S(k-1) - 2*S(k-2) ...
0
votes
0answers
11 views

Explanation of the complexity of sum of sum of sum …

What is the time complexity of the following equation? assuming each variable is K-ary? I think it is $K^2 + K^3 + K^3 + K^3 + K^4 + K^3 + K^2 = O(K^4) $ because the inner most sum has two ...
2
votes
0answers
42 views

Prove that (x+1)! is not O(x!)

Discrete math question which is as follows: Prove that (x+1)! is not O(x!) using only the definition of Big-Oh notation. (Hint!: log(a * b) = (log a + log b)) I used a proof by contradiction saying ...
0
votes
1answer
31 views

Why does $T(n) \leq 2 T(\lceil \frac{n}{2} \rceil)+\mathcal{O}(n)$ imply $T(n)=\mathcal{O} (n\log(n))$

I am learning about sort algorithms and their complexities. For merge sort, I'm confronted with $T(n) \leq 2 T(\lceil \frac{n}{2} \rceil)+\mathcal{O}(n)$. The author makes the claim with no ...
1
vote
0answers
66 views

Proving context free language membership is $P$ complete with respect to log-space reductions

This is exercise from Introduction to Automata theory, Languages and Computation, by Hopcrof, Ullman (first edition). I found example of polynomial reduction to some problems in logic, or graph ...
0
votes
1answer
30 views

Efficiency LL and LR parsing

My question is, is an LL parser or an LR parser more efficient (in big-O terms) ? I don't mean in terms of coding the parser, but rather in the context of the runtime of the parser. Is there a ...
0
votes
2answers
31 views

How can I identify that an instance of Boolean SAT problem remains hard or not?

While I was studying SAT problem and its different instances, in Algorithms for the Satisfiability (SAT) Problem: A Survey by J. Gu et. al PDF, I came up with this instance, not mentioned there, but I ...
1
vote
4answers
48 views

Help understanding Recursive algorithm question

We have a function that is defined recursively by $f(0)=f_0$, $f(1)=f_1$ and $f(n+2) = f(n)+f(n+1)$ for $n\geq0$ For $n\geq0$, let $c(n)$ be the total number of additions for calculating $f(n)$ ...
1
vote
1answer
56 views

Relation of encryption to P, NP, and NP-Complete

After watching a Harvard Lecture regarding the understanding of P, NP, and NP-Complete,they also talk about our encryption algorithms being cracked or useless once we solve the mathematics side of it? ...
0
votes
0answers
29 views

Show L1 is in P, given that L2 is in P and L1 <=p L2

Given L1 and L2 are languages over alphabet Z. Also given that L1 <=p (polynomial time computable) L2 and L2 in P. What is the best way to show that L1 is in P (through definitions of class P and ...
1
vote
0answers
25 views

Basic questions about descriptive complexity

I'm trying to learn descriptive complexity, and I'm having trouble on a basic level wrapping my head around what it means for a logical formula to define a computational language. I've tried and ...
0
votes
0answers
29 views

How to prove this polynomial expression.

Let the polynomial be in $f$ be a map from $\Bbb{Z}_2^k \to \Bbb{Z}_2$, defined by $f = 1 + \sum_{i=1}^k x_i + \sum_{i\neq j; i,j = 1}^k x_i x_j + \dots + x_1 x_2 \cdots x_k$ Then I want to show ...
0
votes
1answer
42 views

Properties of smallest expressions for polynomials, and potential proof.

See here for an intro. Smallest expressions for polynomials is analogous to smallest grammars for strings. Let $R = \Bbb{Z}_p[x_1, \dots, x_k]$. My goal is to prove that for any $\ \ h(k,p) = \max ...
0
votes
2answers
52 views

Linear search average-case complexity?

I am trying to find the average case complexity of the linear search. I know the answer is O(n), but is this correct: The first element has probability $1/n$ and requires 1 comparison; the second ...
2
votes
0answers
38 views

Is there any oracle A s.t. NP$^A$ $\neq$ EXP$^A$

I think the answer is yes because we do not know whether NP = EXP. But i couldn't find one.