File:CookLevinCommDiag.pdf

Summary

Description
English: Commutative diagram showing the construction in the Cook-Levin theorem.


The proof starts with a given nondeterministic Turing machine M that solves some decision problem in polynomial time, say, in at most p(n) steps for an input of length n. Cook describes an algorithm (called "Reduction" in the image) that transforms (the description of M and) the input I into a boolean expression B in conjunctive normal form (CNF) such that B is satisfiable if, and only if, I is accepted by M. Hence if satisfiability could be solved in polynomial time (by some algorithm SAT), the decision problem could be solved that fast, too.

In the image, data is colored in red, their sizes in orange, algorithms in blue, their running times in green. Logarithmic factors are omitted.
Date
Source Own work
Author Jochen Burghardt
Other versions File:CookLevinCommDiag.pdf * File:CookLevinCommDiag svg.svg
LaTeX source
\documentclass[12pt]{article}
\usepackage[pdftex]{color}
\usepackage[paperwidth=100mm,paperheight=40mm]{geometry}
\setlength{\topmargin}{-36mm}
\setlength{\textwidth}{100mm}
\setlength{\textheight}{40mm}
\setlength{\oddsidemargin}{-23mm}
\setlength{\parindent}{0cm}
\setlength{\unitlength}{1mm}
\definecolor{bData}     {rgb}{0.99,0.90,0.90}%
\definecolor{fData}     {rgb}{0.40,0.00,0.00}%  
\definecolor{fProg}     {rgb}{0.00,0.00,0.40}%  
\definecolor{fTime}     {rgb}{0.00,0.40,0.00}%
\definecolor{fSpce}     {rgb}{0.80,0.40,0.00}%
\definecolor{fOrcl}     {rgb}{0.00,0.00,0.40}%  
\definecolor{fOTme}     {rgb}{0.00,0.40,0.00}%
\pagestyle{empty}

\begin{document}
\begin{picture}(94,37)%

\textcolor{bData}{\put(1,5){\makebox(0,0)[bl]{\rule{12mm}{6mm}}}}%
\textcolor{fData}{\put(1,5){\framebox(12,6){Input}}}%
\textcolor{fSpce}{\put(7,1){\makebox(0,0)[b]{$n$}}}%

\textcolor{bData}{\put(41,5){\makebox(0,0)[bl]{\rule{12mm}{6mm}}}}%
\textcolor{fData}{\put(41,5){\framebox(12,6){CNF}}}%
\textcolor{fSpce}{\put(47,0){\makebox(0,0)[b]{$p(n)^3$}}}%

\textcolor{bData}{\put(81,5){\makebox(0,0)[bl]{\rule{12mm}{6mm}}}}%
\textcolor{fData}{\put(81,5){\framebox(12,6){y/n}}}%
\textcolor{fSpce}{\put(87,1){\makebox(0,0)[b]{$1$}}}%

\thicklines%

\textcolor{fProg}{\put(13,8){\vector(1,0){28}}}%
\textcolor{fProg}{\put(27,9){\makebox(0,0)[b]{Reduction}}}%
\textcolor{fTime}{\put(27,7){\makebox(0,0)[t]{$p(n)^3$}}}%

\textcolor{fOrcl}{\put(53,8){\vector(1,0){28}}}%
\textcolor{fOrcl}{\put(67,9){\makebox(0,0)[b]{SAT}}}%
%\textcolor{fOTme}{\put(67,7){\makebox(0,0)[t]{$???$}}}%

\textcolor{fProg}{\put(8,11){\line(0,1){16}}}%
\textcolor{fProg}{\put(13,27){\oval(10,10)[tl]}}%
\textcolor{fProg}{\put(13,32){\line(1,0){70}}}%
\textcolor{fProg}{\put(83,27){\oval(10,10)[tr]}}%
\textcolor{fProg}{\put(88,27){\vector(0,-1){16}}}%
\textcolor{fProg}{\put(47,33){\makebox(0,0)[b]{$M$}}}%
\textcolor{fTime}{\put(47,31){\makebox(0,0)[t]{$p(n)$ nondet.}}}%

\end{picture}
\end{document}

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International 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.
Category:CC-BY-SA-4.0#CookLevinCommDiag.pdf
Category:Self-published work Category:Commutative diagrams Category:Cook-Levin theorem Category:Images with LaTeX source code Category:Files by User:Jochen Burghardt
Category:CC-BY-SA-4.0 Category:Commutative diagrams Category:Cook-Levin theorem Category:Files by User:Jochen Burghardt Category:Images with LaTeX source code Category:Self-published work