形式语言与自动机_笔记整理(四)_可判定性与可计算性

这篇博客深入探讨了可判定性问题,通过图灵机的对角线方法证明了停机问题的不可判定性。进一步阐述了递归可枚举和非递归可枚举语言的概念,并通过构造反例展示了存在非递归可枚举的语言。此外,文章还介绍了计算复杂性理论,包括时间复杂性和多项式时间类P,以及与之相关的NP完全问题和SAT实例。最后,讨论了复杂性理论中P与NP的关系以及它们与EXP类的不等价性,提出了未解决的P=NP问题的重要性。
摘要由CSDN通过智能技术生成

Decidability

The diagonalization method

Undecidability

fig2

Countable and Uncountable Sets

  • The natural numbers N={ 1,2,3,} are countable.
  • Definition: a set S is countable if it is finite, or it is infinite and there is a bijection f: N→S

  • The positive rational numbers Q={m / n | m,nN} are countable.

  • Theorem: The real numbers R are uncountable. (Cantor diagonalization)

Non-RE Languages

Theorem: there exist languages that are not Recursively Enumerable.
Proof outline:

  • the set of all TMs is countable
  • the set of all languages is uncountable
  • the function L : {TM’s} → {languages}$ cannot be onto

Proof:

The halting problem is undecidable

The Halting Problem

  • Definition:
    HALT = { <M,x> | TM M halts on input x}

  • Theorem: HALT is not decidable (undecidable).

    • Proof:
    • Suppose TM H decides HALT
      • if M halts on x , H accept
      • if M does not halt on x , H reject
    • Define new TM H : on input <M> <script type="math/tex" id="MathJax-Element-19"> </script>
      • if H accepts <M,<M>> , then loop
      • if H rejects <M,<M>> , then halt
    • Consider H on input <H> <script type="math/tex" id="MathJax-Element-25"> </script>:
      • if it halts, then H rejects <H,<H>> , which implies it cannot halt
      • if it loops, then H accepts <H,<H>> , which implies it must halt
    • Contradiction. Thus neither H nor H can exist

RE and co-RE

The complement of a RE language is called a co-RE language.
Theorem: a language L is decidable if and only if L is RE and L is co-RE.
Proof:
() we already know decidable implies RE

  • If L is decidable, then complement of L is decidable by flipping accept/reject.
  • So L is in co-RE.

() we have TM M that recognizes L , and TM M recognizes complement of L .

  • On input x, simulate M , M in parallel.

    • If M accepts, accept; if M accepts, reject.
    • A natural non-RE Language

      • Theorem: the complement of HALT is not recursively enumerable.

      • Proof:
        we know that HALT is RE
        suppose complement of HALT is RE
        then HALT is co-RE
        implies HALT is decidable.
        Contradiction.

      这里写图片描述

      Complexity

      Analyze Algorithms
      Worst-Case Analysis

      Time Complexity

      Measure Time Complexity

      Asymptotic Notation

      Asymptotic Notation Facts
      - logarithmic: O(log n)
      - logbn=(log2n)/(log2b)
      - so logbn = O(log2n

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值