File:CookLevin.pdf

Original file(1,722 × 856 pixels, file size: 21 KB, MIME type: application/pdf)

Captions

Captions

Add a one-line explanation of what this file represents

Summary edit

Description Schematized computation of a non-deterministic Turing machine M, as used in the proof of the Cook-Levin theorem. Each line corresponds to a computation step. Initially, in step 0, the tape (green area) contains a given input word I = I0...In, surrounded by blank cells ("‿"), the tape read/write head is at position 0 (red column, also circled), and the state (blue column) is the machine's initial state s. In each step, M performs an action dependent on its current state and the current tape symbol under the head, possibly changing the state and the tape symbol, and moving the head one cell to the left or to the right. The proof assumes that M finishes its computation after at most p(n) steps, where p is some polynomial, by entering an "accept" state from a set F. Hence it is sufficient to consider the tape cells -p(n) ... +p(n). In the picture, M happens to finish exactly in the last step.
Date
Source Own work; inspired by Fig.7.8 in Sect.7.4 (p.255) of Michael Sipser (1997) Introduction to the Theory of Computation, Boston/MA: PWS Publishing Co. ; notation adapted to Cook-Levin theorem#Proof
Author Jochen Burghardt
Other versions File:CookLevin.pdf - File:CookLevin svg.svg


LaTeX source code
\documentclass[12pt]{article}
\usepackage[pdftex]{color}
\usepackage[paperwidth=292mm,paperheight=145mm]{geometry}
\setlength{\topmargin}{-36mm}
\setlength{\textwidth}{292mm}
\setlength{\textheight}{145mm}
\setlength{\evensidemargin}{-2.7cm}
\setlength{\oddsidemargin}{-2.5cm}
\setlength{\parindent}{0cm}
\setlength{\parskip}{1ex}
\setlength{\unitlength}{1mm}
\sloppy

\definecolor{bSt}       {rgb}{0.90,0.90,0.99}   % state column
\definecolor{fSt}       {rgb}{0.00,0.00,0.70}   % state

\definecolor{bHd}       {rgb}{0.99,0.90,0.90}   % head column
\definecolor{fHd}       {rgb}{0.70,0.00,0.00}   % head

\definecolor{bPo}       {rgb}{0.90,0.99,0.90}   % reachable head pos
\definecolor{bP}        {rgb}{0.92,0.99,0.90}   % (reachable head pos)

\definecolor{bTp}       {rgb}{0.95,0.99,0.90}   % tape columns
\definecolor{bIn}       {rgb}{0.80,0.99,0.80}   % input word
\definecolor{fTp}       {rgb}{0.00,0.70,0.00}   % tape content

\newcommand{\SP}{\scriptstyle\smile}    % empty tape

\begin{document}

\begin{picture}(290,140)%
        %\put(0,0){\makebox(0,0){+}}%
        %\put(290,140){\makebox(0,0){+}}%
\thicklines%
% step
\put(5.000,135.000){\makebox(0.000,0.000){Step}}%
\put(5,115){\makebox(0,0){$0$}}%
\put(5,105){\makebox(0,0){$1$}}%
\put(5,95){\makebox(0,0){$2$}}%
\put(5,85){\makebox(0,0){$3$}}%
\put(5,5){\makebox(0,0){$p(n)$}}%
% Q (state)
\textcolor{bSt}{\put(20,0){\makebox(0,0)[bl]{\rule{10mm}{120mm}}}}%
\textcolor{fSt}{\put(25.000,135.000){\makebox(0.000,0.000){State}}}%
\textcolor{fSt}{\put(25.000,115.000){\makebox(0,0){$s$}}}%
\textcolor{fSt}{\put(25,45){\makebox(0,0){$\vdots$}}}%
\textcolor{fSt}{\put(25,5){\makebox(0,0){$\in\!\!F$}}}%
\put(20.000,0.000){\line(0,1){120.000}}%
\put(30.000,0.000){\line(0,1){120.000}}%
\put(20.000,0.000){\line(1,0){10.000}}%
\put(20.000,10.000){\line(1,0){10.000}}%
\put(20.000,120.000){\line(1,0){10.000}}%
\put(20.000,110.000){\line(1,0){10.000}}%
\put(20.000,100.000){\line(1,0){10.000}}%
\put(20.000,90.000){\line(1,0){10.000}}%
\put(20.000,80.000){\line(1,0){10.000}}%
% H (head position)
\textcolor{bHd}{\put(40,0){\makebox(0,0)[bl]{\rule{10mm}{120mm}}}}%
\textcolor{fHd}{\put(45.000,135.000){\makebox(0.000,0.000){Head}}}%
\textcolor{fHd}{\put(45.000,115.000){\makebox(0,0){$0$}}}%
\textcolor{fHd}{\put(45,45){\makebox(0,0){$\vdots$}}}%
\put(40.000,0.000){\line(0,1){120.000}}%
\put(50.000,0.000){\line(0,1){120.000}}%
\put(40.000,0.000){\line(1,0){10.000}}%
\put(40.000,10.000){\line(1,0){10.000}}%
\put(40.000,120.000){\line(1,0){10.000}}%
\put(40.000,110.000){\line(1,0){10.000}}%
\put(40.000,100.000){\line(1,0){10.000}}%
\put(40.000,90.000){\line(1,0){10.000}}%
\put(40.000,80.000){\line(1,0){10.000}}%
% T (tape)
\textcolor{bTp}{\put(60,0){\makebox(0,0)[bl]{\rule{230mm}{120mm}}}}%
%
\textcolor{bPo}{\put(160,100){\makebox(0,0)[bl]{\rule{30mm}{10mm}}}}%
\textcolor{bPo}{\put(150,90){\makebox(0,0)[bl]{\rule{50mm}{10mm}}}}%
\textcolor{bPo}{\put(140,80){\makebox(0,0)[bl]{\rule{70mm}{10mm}}}}%
\textcolor{bPo}{\put(130,70){\makebox(0,0)[bl]{\rule{90mm}{10mm}}}}%
\textcolor{bP}{\put(120,60){\makebox(0,0)[bl]{\rule{110mm}{10mm}}}}%
\textcolor{bP}{\put(110,50){\makebox(0,0)[bl]{\rule{130mm}{10mm}}}}%
\textcolor{bP}{\put(100,40){\makebox(0,0)[bl]{\rule{150mm}{10mm}}}}%
\textcolor{bP}{\put(90,30){\makebox(0,0)[bl]{\rule{170mm}{10mm}}}}%
\textcolor{bP}{\put(80,20){\makebox(0,0)[bl]{\rule{190mm}{10mm}}}}%
\textcolor{bPo}{\put(70,10){\makebox(0,0)[bl]{\rule{210mm}{10mm}}}}%
\textcolor{bPo}{\put(60,00){\makebox(0,0)[bl]{\rule{230mm}{10mm}}}}%
%
\textcolor{bIn}{\put(170,110){\makebox(0,0)[bl]{\rule{70mm}{10mm}}}}%
\textcolor{fTp}{\put(175.000,135.000){\makebox(0.000,0.000){Tape}}}%
\textcolor{fHd}{\put(175.000,115.000){\circle{9.1}}}%
%
\put(65.000,125.000){\makebox(0.000,0.000){$-p(n)$}}%
\put(145.000,125.000){\makebox(0.000,0.000){$-3$}}%
\put(155.000,125.000){\makebox(0.000,0.000){$-2$}}%
\put(165.000,125.000){\makebox(0.000,0.000){$-1$}}%
\put(175.000,125.000){\makebox(0.000,0.000){$0$}}%
\put(185.000,125.000){\makebox(0.000,0.000){$+1$}}%
\put(195.000,125.000){\makebox(0.000,0.000){$+2$}}%
\put(205.000,125.000){\makebox(0.000,0.000){$+3$}}%
\put(285.000,125.000){\makebox(0.000,0.000){$+p(n)$}}%
%
\textcolor{fTp}{\put(65.000,115.000){\makebox(0.000,0.000){$\SP$}}}%
\textcolor{fTp}{\put(105.000,115.000){\makebox(0.000,0.000){$\ldots$}}}%
\textcolor{fTp}{\put(145.000,115.000){\makebox(0.000,0.000){$\SP$}}}%
\textcolor{fTp}{\put(155.000,115.000){\makebox(0.000,0.000){$\SP$}}}%
\textcolor{fTp}{\put(165.000,115.000){\makebox(0.000,0.000){$\SP$}}}%
\textcolor{fTp}{\put(175.000,115.000){\makebox(0.000,0.000){$I_0$}}}%
\textcolor{fTp}{\put(185.000,115.000){\makebox(0.000,0.000){$I_1$}}}%
\textcolor{fTp}{\put(195.000,115.000){\makebox(0.000,0.000){$I_2$}}}%
\textcolor{fTp}{\put(205.000,115.000){\makebox(0.000,0.000){$I_3$}}}%
\textcolor{fTp}{\put(220.000,115.000){\makebox(0.000,0.000){$\ldots$}}}%
\textcolor{fTp}{\put(235.000,115.000){\makebox(0.000,0.000){$I_n$}}}%
\textcolor{fTp}{\put(245.000,115.000){\makebox(0.000,0.000){$\SP$}}}%
\textcolor{fTp}{\put(265.000,115.000){\makebox(0.000,0.000){$\ldots$}}}%
\textcolor{fTp}{\put(285.000,115.000){\makebox(0.000,0.000){$\SP$}}}%
%
\put(60.000,0.000){\line(0,1){120.000}}%
\put(70.000,0.000){\line(0,1){120.000}}%
\put(140.000,0.000){\line(0,1){120.000}}%
\put(150.000,0.000){\line(0,1){120.000}}%
\put(160.000,0.000){\line(0,1){120.000}}%
\put(170.000,0.000){\line(0,1){120.000}}%
\put(180.000,0.000){\line(0,1){120.000}}%
\put(190.000,0.000){\line(0,1){120.000}}%
\put(200.000,0.000){\line(0,1){120.000}}%
\put(210.000,0.000){\line(0,1){120.000}}%
\put(280.000,0.000){\line(0,1){120.000}}%
\put(290.000,0.000){\line(0,1){120.000}}%
%
\put(230.000,110.000){\line(0,1){10.000}}%
\put(240.000,110.000){\line(0,1){10.000}}%
\put(250.000,110.000){\line(0,1){10.000}}%
%
\put(60.000,0.000){\line(1,0){230.000}}%
\put(60.000,10.000){\line(1,0){230.000}}%
\put(60.000,80.000){\line(1,0){230.000}}%
\put(60.000,90.000){\line(1,0){230.000}}%
\put(60.000,100.000){\line(1,0){230.000}}%
\put(60.000,110.000){\line(1,0){230.000}}%
\put(60.000,120.000){\line(1,0){230.000}}%
\end{picture}
\end{document}

Licensing edit

I, the copyright holder of this work, hereby publish it under the following licenses:
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
You may select the license of your choice.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current17:28, 17 October 2014Thumbnail for version as of 17:28, 17 October 20141,722 × 856 (21 KB)Jochen Burghardt (talk | contribs)renamed input word to "I", to be consistent with en:Cook–Levin theorem#Proof
16:55, 17 October 2014Thumbnail for version as of 16:55, 17 October 20141,722 × 856 (21 KB)Jochen Burghardt (talk | contribs){{Information |Description=Schematized computation of a non-deterministic Turing machine, as used in the proof of the Cook-Levin theorem |Source={{own}}, inspired by Fig.7.8 in Sect.7....

There are no pages that use this file.

Metadata