File:NP-hardness of pattern language membership.pdf

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(1,285 × 293 pixels, file size: 17 KB, MIME type: application/pdf)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

[edit]
Description
English: Shows a reduction of the 1-in-3-SAT problem to the problem of deciding whether a given string is a member of a given pattern language. The construction is inspired by Dana Angluin's original proof (Thm.3.6 in "Finding Patterns Common to a Set of Strings", JCSS 21/1980), but simplified by using 1-in-3- rather than plain 3-SAT.
Date
Source Own work
Author Jochen Burghardt
Other versions File:NP-hardness of pattern language membership svg.svg
LaTeX source code
 \documentclass[12pt]{article}

 \usepackage[pdftex]{color}
 \usepackage[paperwidth=218mm,paperheight=50mm]{geometry}

 \setlength{\topmargin}{-45mm}
 \setlength{\textwidth}{216mm}
 \setlength{\textheight}{51mm}
 \setlength{\oddsidemargin}{-25mm}
 \pagestyle{empty}



 \begin{document}

 \definecolor{fSep}     {rgb}{0.00,0.00,0.50}   % separating 0
 \definecolor{fPos}     {rgb}{0.00,0.50,0.00}   % true
 \definecolor{fNeg}     {rgb}{0.50,0.00,0.00}   % false

 \newcommand{\0}{\textcolor{fSep}{\bf 0}}       % separating 0
 \newcommand{\1}[1]{\overline{#1}}              % negation
 \newcommand{\2}[1]{\textcolor{fNeg}{#1}}       % false
 \newcommand{\3}[1]{\textcolor{fPos}{#1}}       % true



 $$\begin{array}{l*{32}{c}}
 
 \bf CNF: 
 &&&&&&&&&&&&&&&&
 &       & \multicolumn{4}{c}{(\1w \!\lor\!   x \!\lor\! \1y)}
 & \land & \multicolumn{4}{c}{(  w \!\lor\!   y \!\lor\!   z)}
 & \land & \multicolumn{4}{c}{(  x \!\lor\! \1y \!\lor\! \1z)}
 \\
 \\
 
 \bf Pattern: 
 & \0 & \multicolumn{3}{c}{wW} 
 & \0 & \multicolumn{3}{c}{xX} 
 & \0 & \multicolumn{3}{c}{yY} 
 & \0 & \multicolumn{3}{c}{zZ} 
 & \0 & \multicolumn{4}{c}{W x Y}
 & \0 & \multicolumn{4}{c}{w y z}
 & \0 & \multicolumn{4}{c}{x Y Z}
 & \0
 \\
 
 \bf String: 
 & \0 & 1 & 1 & 1 
 & \0 & 1 & 1 & 1 
 & \0 & 1 & 1 & 1
 & \0 & 1 & 1 & 1 
 & \0 & 1 & 1 & 1 & 1
 & \0 & 1 & 1 & 1 & 1
 & \0 & 1 & 1 & 1 & 1
 & \0
 \\
 \\
 
 \bf Solution:
 && \multicolumn{3}{c}{\1w=1}
 && \multicolumn{3}{c}{\1x=1}
 && \multicolumn{3}{c}{  y=1}
 && \multicolumn{3}{c}{\1z=1}
 &       & \multicolumn{4}{c}{(1 \!\lor\! 0 \!\lor\! 0)}
 & \land & \multicolumn{4}{c}{(0 \!\lor\! 1 \!\lor\! 0)}
 & \land & \multicolumn{4}{c}{(0 \!\lor\! 0 \!\lor\! 1)}
 \\
 \\
 
 \cline{3-5}
 \cline{7-9}
 \cline{11-13}
 \cline{15-17}
 \cline{19-22}
 \cline{24-27}
 \cline{29-32}
 
 & \0 & \multicolumn{1}{|c|}{\2w} & \multicolumn{2}{|c|}{\3W} 
 & \0 & \multicolumn{1}{|c|}{\2x} & \multicolumn{2}{|c|}{\3X} 
 & \0 & \multicolumn{2}{|c|}{\3y} & \multicolumn{1}{|c|}{\2Y}
 & \0 & \multicolumn{1}{|c|}{\2z} & \multicolumn{2}{|c|}{\3Z}
 & \0 & \multicolumn{2}{|c|}{\3W} & \multicolumn{1}{|c|}{\2x} & \multicolumn{1}{|c|}{\2Y}
 & \0 & \multicolumn{1}{|c|}{\2w} & \multicolumn{2}{|c|}{\3y} & \multicolumn{1}{|c|}{\2z}
 & \0 & \multicolumn{1}{|c|}{\2x} & \multicolumn{1}{|c|}{\2Y} & \multicolumn{2}{|c|}{\3Z}
 & \0
 \\
 
 & \0 & \multicolumn{1}{|c|}{\21} & \multicolumn{1}{|c }{\31} & \multicolumn{1}{ c|}{\31} 
 & \0 & \multicolumn{1}{|c|}{\21} & \multicolumn{1}{|c }{\31} & \multicolumn{1}{ c|}{\31} 
 & \0 & \multicolumn{1}{|c }{\31} & \multicolumn{1}{ c|}{\31} & \multicolumn{1}{|c|}{\21}
 & \0 & \multicolumn{1}{|c|}{\21} & \multicolumn{1}{|c }{\31} & \multicolumn{1}{ c|}{\31} 
 & \0 & \multicolumn{1}{|c }{\31} & \multicolumn{1}{ c|}{\31} & \multicolumn{1}{|c|}{\21} & \multicolumn{1}{|c|}{\21}
 & \0 & \multicolumn{1}{|c|}{\21} & \multicolumn{1}{|c }{\31} & \multicolumn{1}{ c|}{\31} & \multicolumn{1}{|c|}{\21}
 & \0 & \multicolumn{1}{|c|}{\21} & \multicolumn{1}{|c|}{\21} & \multicolumn{1}{|c }{\31} & \multicolumn{1}{ c|}{\31}
 & \0
 \\
 
 \cline{3-5}
 \cline{7-9}
 \cline{11-13}
 \cline{15-17}
 \cline{19-22}
 \cline{24-27}
 \cline{29-32}
 
 \end{array}$$

 \end{document}



 % finding a 1-in-3-satisfiable CNF:
  w x y z       W X Y Z         WxY     wyz     xYZ
  --------------------------------------------------
 %0 0 0 0       1 1 1 1         101     000     011
 %0 0 0 1       1 1 1 0         101     001     010
  0 0 1 0       1 1 0 1         100     010     001
 %0 0 1 1       1 1 0 0         100     011     000
 %0 1 0 0       1 0 1 1         111     000     111
 %0 1 0 1       1 0 1 0         111     001     110
 %0 1 1 0       1 0 0 1         110     010     101
 %0 1 1 1       1 0 0 0         110     011     100
 %1 0 0 0       0 1 1 1         001     100     011
 %1 0 0 1       0 1 1 0         001     101     010
 %1 0 1 0       0 1 0 1         000     110     001
 %1 0 1 1       0 1 0 0         000     111     000
 %1 1 0 0       0 0 1 1         011     100     111
 %1 1 0 1       0 0 1 0         011     101     110
 %1 1 1 0       0 0 0 1         010     110     101
 %1 1 1 1       0 0 0 0         010     111     100

Licensing

[edit]
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 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.

File history

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

Date/TimeThumbnailDimensionsUserComment
current21:24, 5 November 2013Thumbnail for version as of 21:24, 5 November 20131,285 × 293 (17 KB)Jochen Burghardt (talk | contribs)added rightmost 0es
20:39, 5 November 2013No thumbnail0 × 0 (17 KB)Jochen Burghardt (talk | contribs)User created page with UploadWizard

There are no pages that use this file.

Metadata