# 计算机代写|计算复杂度理论代写Computational complexity theory代考|FIT2014

## 计算机代写|计算复杂度理论代写Computational complexity theory代考|Undecidability of the Halting Problem

The Halting Problem asks whether it is possible to construct a Turing Machine $H$ that, given a representation $\llcorner M\lrcorner$ of a Turing machine $M$, and an input $x$, accepts if $M(x)$ halts and rejects if $M(x)$ runs forever. Turing’s argument involves constructing a machine that provably does the opposite of what $H$ predicts [Tur37].

This is the equivalent of demonstrating that your local fortune-teller can’t really predict the future because they can’t tell whether the next thing you say is going to be “yes” or “no.” In both cases, the trick only works if you can wait for the prediction before choosing what to do. But if $H$ exists, we can do this.

The bad machine $M$ we are going to construct takes as input a description $\left\llcorner M^{\prime}\right\lrcorner$ of some machine $M^{\prime}$, runs $H\left(\left\llcorner M^{\prime}\right\lrcorner,\left\llcorner M^{\prime}\right\lrcorner\right)$, then halts if and only if it observes that $H\left(\left\llcorner M^{\prime}\right\lrcorner,\left\llcorner M^{\prime}\right\lrcorner\right)$ rejects. It’s not hard to see that we can implement $M$ given $H$, since the extra work is just a matter of copying the input twice, and instead of halting when $H$ does, using the halting state of $H$ to decide whether to really halt (if $H$ rejects) or not to halt at all (if $H$ accepts), say by moving to a state that just moves one of the tape heads off to the right forever.

So what happens if we $\operatorname{run} H(\llcorner M\lrcorner,\llcorner M\lrcorner)$ ? This should accept only if and only if $M(\llcorner M\lrcorner)$ halts. But $M(\llcorner M\lrcorner)$ halts if and only if $H(\llcorner M\lrcorner,\llcorner M\lrcorner)$ rejects. This means that $w$ we’ve managed to construct a specific machine $M$ and input $\llcorner M\lrcorner$ where $H$ gives the wrong answer, and we can do this for any $H$ that allegedly solves the halting problem. This gives:

Theorem 6.1.1 (Halting Problem). There does not exist a Turing machine $H$ that always halts, such that $H(\llcorner M\lrcorner, x)$ accepts if and only if $M(x)$ halts.
In other words, the Halting Problem is undecidable there is no Turing machine that decides it.

This turns out to have consequences that go beyond just testing if a machine halts or not. Just as polynomial-time reductions from know NPhard problems can show that other problems are NP-hard, computable reductions from the Halting Problem can show that other problems are also undecidable.

## 计算机代写|计算复杂度理论代写Computational complexity theory代考|The Time Hierarchy Theorem

The Time Hierarchy Theorem is similar to the Space Hierarchy Theorem, but the gap is wider:

Theorem 6.2.2. If $g(n)$ is a time-constructible function, and $f(n)=o(g(n))$, then $\mathbf{T I M E}(f(n)) \subsetneq \mathbf{T I M E}(g(n) \log g(n))$.

By analogy to the proof of the Space Hierarchy Theorem, a first try at a language for this one would be
$L={\langle\llcorner M\lrcorner, x\rangle \mid M$ rejects $\langle\llcorner M\lrcorner, x\rangle$ using at most $g(n)$ time and a tape alphabet of size
This will give us something to start with, but getting the full-blown theorem will require some more tinkering. The main issue is that building a time-efficient universal Turing machine is harder than building a spaceefficient one (this also explains the extra $\log g(n)$ factor). We’ve learned from the SHT proof that the diagonalization side of the argument is pretty robust to small changes in $L$, so it will be helpful to adjust the definition of $L$ a bit after we see the hard parts of the upper bound argument in order to make that argument easier.

First, though, the diagonalization part. Suppose $M$ decides $L$, and $M$ runs in $o(g(n))$ time, then running $M(\langle\llcorner M\lrcorner, x\rangle)$ gives a contradiction when $x$ is large enough that $R^{\prime} s$ running time drops below $g(n)$ exactly. If $M(\langle\llcorner M\lrcorner, x\rangle)$ rejects in such a case, then $\langle\llcorner M\lrcorner, x\rangle$ is in $L$ (by the definition of $L$ ), meaning that $M$ just gave the wrong answer on this input. But the same thing happens if it rejects. So we get a contradiction either way, and $M$ either does not decide $L$ or it doesn’t run in $o(g(n))$ time.

But now we need to show that there is a machine that does decide $L$ that also runs in a reasonable amount of time. We’ll start with a simple, direct simulation of the input machine $M$, and then worry about improving the running time later. ${ }^2$

# 计算复杂度理论代考

## 计算机代写|计算复杂度理论代写Computational complexity theory代考|The Time Hierarchy Theorem

myassignments-help数学代考价格说明

1、客户需提供物理代考的网址，相关账户，以及课程名称，Textbook等相关资料~客服会根据作业数量和持续时间给您定价~使收费透明，让您清楚的知道您的钱花在什么地方。

2、数学代写一般每篇报价约为600—1000rmb，费用根据持续时间、周作业量、成绩要求有所浮动(持续时间越长约便宜、周作业量越多约贵、成绩要求越高越贵)，报价后价格觉得合适，可以先付一周的款，我们帮你试做，满意后再继续，遇到Fail全额退款。

3、myassignments-help公司所有MATH作业代写服务支持付半款，全款，周付款，周付款一方面方便大家查阅自己的分数，一方面也方便大家资金周转，注意:每周固定周一时先预付下周的定金，不付定金不予继续做。物理代写一次性付清打9.5折。

Math作业代写、数学代写常见问题

myassignments-help擅长领域包含但不是全部:

myassignments-help服务请添加我们官网的客服或者微信/QQ，我们的服务覆盖：Assignment代写、Business商科代写、CS代考、Economics经济学代写、Essay代写、Finance金融代写、Math数学代写、report代写、R语言代考、Statistics统计学代写、物理代考、作业代写、加拿大代考、加拿大统计代写、北美代写、北美作业代写、北美统计代考、商科Essay代写、商科代考、数学代考、数学代写、数学作业代写、physics作业代写、物理代写、数据分析代写、新西兰代写、澳洲Essay代写、澳洲代写、澳洲作业代写、澳洲统计代写、澳洲金融代写、留学生课业指导、经济代写、统计代写、统计作业代写、美国Essay代写、美国代考、美国数学代写、美国统计代写、英国Essay代写、英国代考、英国作业代写、英国数学代写、英国统计代写、英国金融代写、论文代写、金融代考、金融作业代写。

Scroll to Top