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

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

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值