zoukankan      html  css  js  c++  java
  • 2

    Turing Machine

    Alan Turning, 1936, Turing Machine.

    A Turing machine can do everything that a real computer can be. Nonetheless, even a Turing machine cannot solve certain problems. In a very real sense, these problems are beyond the theoretical limits of computation.

    The Turing machine model uses an infinite tape as its unlimited memory. It has a tape head that can read and write symbols and move around on the tape. Initially the tape contains only the input string and is blank everywhere else. If the machine needs to store information, it may write this information on the tape. The machine continuous computing until it decides to produce an output. The output accept and reject are obtained by entering designated accepting and rejecting states.

    The church-Turing Thesis (Church, 1936; Turing, 1937)

    Everything that can be effectively computed can be computed using a Turing machine (or: the (lambda) calculus)

    Formal Definition of Turing Machine

    Definition A Turing Machine is a (7)-tuple, ((Q,sum,Gamma,delta,q_0,q_{accept},q_{reject})), where (Q), (sum), (Gamma) are all finite sets and

    • (Q) is the set of state,
    • (sum) is the input alphabet not containing the blank symbol (sqcup),
    • (Gamma) is the tape alphabet, where (sqcupinGamma) and (sumsubseteqGamma),
    • (delta:Q imesGamma ightarrow Q imesGamma imes{L,R}) is the transition function,
    • (q_0in Q) is the start state,
    • (q_{accept}in Q) is the accept state, and
    • (q_{reject}in Q) is the reject state, where (q_{reject} eq q_{accept}).

    For a Turing machine, (delta) takes the form: (Q imesGamma ightarrow Q imesGamma imes{L,R}). That is, when the machine is in certain state (q) and the head is over a tape square containing a symbol (a), and if (delta(q,a)=(r,b,L)), the machine writes the symbol (b) replacing the (a), and goes to state (r). The third component is either (L) or (R) and indicates whether the head moves to the left or right after writing. In this case, the (L) indicates a move to the left.

    As a Turing machine components, changes occur in the current state, the current tape contents, and the current head location. A setting of these three items is called a configuration of the Turing machine. For a state (q) and two strings (u) and (v) over the tape alphabet (Gamma), we write (uqv) for the configuration where the current state is (q), the current tape contents is (uv), and the current head location is the first symbol of (v). The tape contains only blanks following the last symbol of (v). Say that configuration (C_1) yields configuration (C_2) if the Turing machine can legally go from (C_1) to (C_2) in a single step.

    Definition A Turing Machine (M) accepts input (w) if a sequence of configurations (C_1, C_2,cdots,C_k) exists, where

    1. (C_1) is the start configuration of (M) on input (w),
    2. each (C_i) yields (C_{i+1}), and
    3. (C_k) is an accepting configuration.

    Definition Turing recognizable language: A language for which there exists a Turing machine that accepts all strings and only the strings in the language.

    Definition Turing decidable language: A language for which there exists a Turing machine that

    • accepts all strings in the language
    • rejects all other strings.

    Variants of Turing Machine

    Multi-tape Turing Machine

    Definition

    A mutitape Turing machine is like an ordinary Turing machine with several tapes. Formally, it is:

    [delta:Q imesGamma^k ightarrow Q imesGamma^k imes{L,R,S}^k ]

    where (k) is number of tapes. The expression:

    [delta(q_i,a_1,cdots,a_k)=(q_j,b_1,cdots,b_k,L,R,cdots,L) ]

    means that if the machine is in state (q_i) and heads 1 through (k) are reading symbols (a_1) through (a_k), the machine goes to state (q_j), writes symbols (b_1) through (b_k), and directs each head to move left or right, or to say put, as specified.

    Theorem Every multitape Turing machine has an equivalent single-tape Turing machine

    Nondeterministic Turing Machine

    Definition At any point in a computation, the machine may proceed according to several possibilities. The transition function for a nondeterministic Turing machine has the form:

    [delta:Q imesGamma ightarrowmathcal{P}(Q imesGamma imes{L,R}) ]

    If some branch of the computation leads to the accept state, the machine accepts its input.

    Theorem Every nondeterministic Turing machine has an equivalent deterministic Turing machine.

    Reference

    Introduction to the Theory of Computation, 3rd edition, Michael Sipser.

  • 相关阅读:
    C#中关于@的用法
    c++ 中__declspec 的用法
    #pragma详细解释(一)
    memmove 和 memcpy的区别
    【niubi-job——一个分布式的任务调度框架】----安装教程
    [异能程序员]第一章 酒后事发(第一更)
    博客园的最后一篇博文,还是要离开了(附带个人博客源码分享)
    五一假期——技术之路上的坎儿
    deerlet-redis-client添加集群支持,邀请各路大神和菜鸟加入。
    从日常开发说起,浅谈HTTP协议是做什么的。
  • 原文地址:https://www.cnblogs.com/romaLzhih/p/14433760.html
Copyright © 2011-2022 走看看