Take the 2-minute tour ×
Theoretical Computer Science Stack Exchange is a question and answer site for theoretical computer scientists and researchers in related fields. It's 100% free, no registration required.

In the introduction and explanation P and NP complexity classes often given through Turing machine. One of the model of computation is the lambda-calculus. I understand, that all of models of computation are equivalent (and if we can introduce anything in terms Turing machine, we can introduce this in terms any model of computation), but I never seen explanation idea P and NP complexity classes through lambda-calculus. Can anybody explain notions P and NP complexity classes without Turing machine and only with lambda calculus as model of computation.

share|improve this question
4  
Their computational power is equivalent only for functions over natural numbers, not higher types or other settings. –  Kaveh Jun 6 at 9:17
    
Turing completeness is sometimes a more theoretical concept to show a connection but more applied "conversions" between TM complete systems are not always actually carried out in practice ie its sometimes more about existence proofs... –  vzn Jun 6 at 23:19

3 Answers 3

Turing-machines and $\lambda$-calculus are equivalent only w.r.t. the functions $\mathbb{N} \rightarrow \mathbb{N}$ they can define.

From the point of view of computational complexity they seem to behave differently. The main reason people use Turing machines and not $\lambda$-calculus to reason about complexity is that using $\lambda$-calculus naively leads to unrealistic complexity measures, because you can copy terms (of arbitrary size) freely in single $\beta$-reduction steps, e.g. $(\lambda x.xxx)M \rightarrow MMM.$ In other words, single reduction steps in $\lambda$-calculus are a lousy cost model. In contrast, single Turing-machine reduction steps work great (in the sense of being good predictors of real-world program run-time).

It is not known how fully to recover conventional Turing-machine based complexity theory in $\lambda$-calculus. In a recent (2014) breakthrough Accattoli and Dal Lago managed to show that large classes of time-complexity such as $P$, $NP$ and $EXP$ can be given a natural $\lambda$-calculs formulation. But smaller classes like $O(n^2)$ or $O(n \, log\, n)$ cannot be presented using the Accattoli / Dal Lago techniques.

How to recover conventional space complexity using $\lambda$-calculus is unknown.

share|improve this answer
1  
I feel the need to clarify here: there is no special "technique" Accattoli and Dal Lago use to "present" time classes. The presentation is the "naive" one: define $\lambda TIME(f(n))$ as the class of languages decidable by a $\lambda$-term in $f(n)$ $\beta$-reduction steps, under any standard reduction strategy (e.g. leftmost-outermost). Accattoli and Dal Lago showed, using techniques coming from linear logic, that there is a polynomial $p$ such that $\lambda TIME(f(n))=TIME(p(f(n))$. –  Damiano Mazza Jun 9 at 9:26
    
@DamianoMazza Yes that's right, what I meant is that I don't think the techniques used to show this result can be used to show e.g. $\lambda TIME(n^2) = TIME(n^2)$. –  Martin Berger Jun 9 at 10:36
1  
Ok, I see. Actually, my guess is that $\lambda TIME(n^2)\neq TIME(n^2)$: complexity classes such as $TIME(n^2)$ or $TIME(n\log n)$ are not robust, one cannot expect them to be stable under changes in the computational model (this is notoriously the case even if we stick to Turing machines, e.g. single-tape vs. multi-tape). –  Damiano Mazza Jun 9 at 21:01
1  
@DamianoMazza I agree, likewise for the size of the chosen alphabet. But an algorithm running in $f(n)$ on an $n$-tape machine can be simulated in $5kf^2(n)$ on a 1-tape machine, a modest quadratic blowup. What's the blowup of the current translation of Accattoli and Dal Lago's? I don't remember if they explicitly state it. –  Martin Berger Jun 9 at 21:41
    
The cost of copying IS fast on a graph reduction machine. All nodes referencing X point to X. X is then made to be M. So I think the example given is rather bad. –  Jake Jun 10 at 19:02

I paste part of an answer I wrote for another question:

Implicit Computational Complexity aims at characterizing complexity classes by means of dedicated languages. The first results such as Bellantoni-Cook's Theorem were stated in terms of $\mu$-recursive functions, but more recent results use the vocabulary and techniques of $\lambda$-calculus. See this Short introduction to Implicit Computational Complexity for more and pointers, or the proceedings of the DICE workshops.

There exist characterizations of (at least) $\mathsf{FP}$ by means of $\lambda$-calculus.

share|improve this answer

i dont know if this answers (part of) your question but there are indeed alternative characterizations of the complexity classes (esp. $\mathbb{P}$ and $\mathbb{NP}$) in terms of logics (1st order logic, 2nd order logic, etc..).

For example the work of R. Fagin (et al.) in this area is notable (and imo might provide insight related to the $\mathbb{P}$ vs $\mathbb{NP}$ issue and relations with descriptive and algorithmic complexity)

UPDATE:

Some further characterizations of computational complexity classes in terms of algorithmic (Kolmogorov-Solomonov) complexity can be found (for example) here and here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.