• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
鱼市口
博客园    首页    新随笔    联系   管理    订阅  订阅
ToC考前随手写1

那种烂大街的DFA NFA RE 关系构造及取反略过, PDA稍微有点思想毕竟算是有了stack的无穷记忆但是考试题也不会太难;如果难这部分也就是老师纯粹写很抽象的表达式和算子,这样实际上是在考离散数学233

所以这里从Turing Machine开始写,各种variants 及内在关系,TM与language hierachy 

Stay TM as start-point

So far, our TMs had to move left or right in each step. Suppose
we add a 3rd option|to stay put, so the type of a TM’s transition
function becomes:
δ : Q × Γ −> Q × Γ × {l; r; s}

Theorem
Every stay put TM has an equivalent ordinary TM.

Proof: Replace each s transition with two transitions, a r followed by a L

 

Theorem
Every doubly infinite tape TM has an equivalent left-bounded TM.

Every multitape TM has an equivalent single-tape TM.

Proof idea:
To simulate a doubly infinite tape TM by a left-bounded one, we
split the left-bounded tape into an upper and a lower half. The
upper half represents the right half of the tape (from the initial
head position onwards) and the lower half represents the left half.
An extra state component keeps track of the half in which the
head currently is.

 

NTM (Non-deterministic)

δ : Q × Γ −> 2Q×Γ×{l;r;s}

Theorem
Every non-deterministic TM has an equivalent deterministic TM.

We simulate any non-deterministic TM N with a deterministic TM
D that breadth-first searches for qaccept on all possible branches of
N’s non-deterministic computation. If D ever finds qaccept on one
of these branches, it accepts. Otherwise it will diverge.

Actually this will be discussed in PSPACE and NPSPACE argument...

 

Enumerators


An enumerator is a TM-like construct that starts with a blank
input tape and, if it doesn’t halt, may print an infinite list of
strings onto the tape.

The language of an enumerator is the set of all strings it eventually
prints out. (It may print strings repeatedly and in any order.)

Theorem
A language is Turing-recognisable iff some enumerator enumerates it.  Actually, Enumerators ≡ Turing Machines.

 

Enumeration is a very useful technique, especially for
semi-decidable procedures.

 

Closure properties of (Semi-)Decidable Languages

The decidable languages are closed under union, closed under complement, closed under intersection...

 

 

A language L ∈ Σ∗ is in coRE if L (complementary)= Σ∗ \ L is in RE. 

 

A language is decidable(REC) iff it and its complement are RE. That's saying Rec = RE \ coRE

Proof.
⊆: follows from the closure properties of decidable languages.
⊇: We construct a decider D for L from a TM M that accepts L and a
TM M0 that accepts L as follows.
On input x:
1 Run M and M0 on x in parallel.
2 If M accepts, then accept.
3 If M0 accepts, then reject.

 

 

Encoding

 

The Universal Turing Machine

A universal TM is a TM U that can simulate the actions of any
Turing machine. I.e. for any TM M and any input x of M, U
accepts (respectively rejects or loops on) hM; xi, if and only if, M
accepts (respectively rejects or loops on) x.
This is equivalent to an interpreter of C written in C.
Note this is different (quantifier order) from results such as every
NDTM can be simulated by a deterministic TM

 

posted on 2022-05-08 14:08  鱼市口  阅读(48)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3