सीएसएस ट्यूरिंग पूरा हो गया है?


297

जैसा कि मुझे पता है CSS, insofar नहीं है, Turing पूरा। लेकिन CSS का मेरा ज्ञान बहुत सीमित है।

  • सीएसएस ट्यूरिंग पूरा हो गया है?
  • क्या मौजूदा ड्राफ्ट या समितियों में से कोई भी भाषा सुविधाओं पर विचार कर रहा है जो कि ट्यूरिंग पूर्णता को सक्षम कर सकती है यदि यह अभी नहीं है?

28
यह पहले से ही किया गया है, यदि आप ie6 का उपयोग करते हैं। उन्हें सीएसएस अभिव्यक्ति कहा जाता है, और आम सहमति है कि वे बुरी तरह से टूट गए हैं और खतरनाक हैं। JS CSS में एम्बेडेड ...
kibibu

13
@ किबिबू - यिकस! कृपया यह विचार मेरे मस्तिष्क से मिटा दें, इससे पहले कि यह अपने आप में गुना हो जाए!
डीवीके

CSS संभवतः ट्यूरिंग-पूर्ण कैसे हो सकता है ?
SLKs

1
@ डीवीडीके: आप वास्तव में उनके साथ कुछ शांत चीजें कर सकते हैं - विशेष रूप से संकल्प स्वतंत्र लेआउट के संबंध में - जो कि सीएसएस में अभी भी मुश्किल या विचित्र हैं तालिकाओं का सहारा लिए बिना। मुझे लगता है कि अगर वे इसे कड़ाई से एक घोषणात्मक अभिव्यक्ति भाषा के रूप में सीमित कर देते हैं, तो इसके बिना कोई साइड-इफ़ेक्ट वाली स्क्रिप्ट इंजन की पूरी पहुँच की अनुमति देता है, जो बेहतर तरीके से प्राप्त होता (और शायद यह भी अगर वेबकिट इसके साथ आया था)
kibibu

5
@SLaks: एचटीएमएल 5 / CSS3 की शक्ति को कम मत समझो :)
निकल्स बी।

जवाबों:


385

आप CSS3 में नियम 110 को एन्कोड कर सकते हैं , इसलिए यह ट्यूरिंग-पूर्ण है जब तक कि आप सीएसएस के "निष्पादन" का हिस्सा बनने के लिए एक उपयुक्त HTML फ़ाइल और उपयोगकर्ता इंटरैक्शन के साथ विचार करें । एक बहुत अच्छा कार्यान्वयन उपलब्ध है, और एक और कार्यान्वयन यहाँ शामिल है:

body {
    -webkit-animation: bugfix infinite 1s;
    margin: 0.5em 1em;
}
@-webkit-keyframes bugfix { from { padding: 0; } to { padding: 0; } }

/*
 * 111 110 101 100 011 010 001 000
 *  0   1   1   0   1   1   1   0
 */

body > input {
    -webkit-appearance: none;
    display: block;
    float: left;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 0px 3px;
    margin: 0;
    font-family: Consolas, "Courier New", monospace;
    font-size: 7pt;
}
body > input::before {
    content: "0";
}

p {
    font-family: Verdana, sans-serif;
    font-size: 9pt;
    margin-bottom: 0.5em;
}

body > input:nth-of-type(-n+30) { border-top: 1px solid #ddd; }
body > input:nth-of-type(30n+1) { border-left: 1px solid #ddd; clear: left; }

body > input::before { content: "0"; }

body > input:checked::before { content: "1"; }
body > input:checked { background: #afa !important; }


input:not(:checked) +
        *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
        input::before {
    content: "1";
}
input:not(:checked) +
        *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
        input {
    background: #fa0;
}


input:checked +
        *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
        input::before {
    content: "1";
}
input:checked +
        *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
        input {
    background: #fa0;
}


input:checked +
        *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
        input::before {
    content: "1";
}
input:checked +
        *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
        input {
    background: #fa0;
}

input:checked + input:checked + input:checked +
        *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
        input::before {
    content: "0";
}
input:checked + input:checked + input:checked +
        *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
        input {
    background: #fff;
}

input:not(:checked) + input:not(:checked) + input:not(:checked) +
        *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
        input::before {
    content: "0";
}
input:not(:checked) + input:not(:checked) + input:not(:checked) +
        *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
        input {
    background: #fff;
}

body > input:nth-child(30n) { display: none !important; }
body > input:nth-child(30n) + label { display: none !important; }
<p><a href="http://en.wikipedia.org/wiki/Rule_110">Rule 110</a> in (webkit) CSS, proving Turing-completeness.</p>

<!-- A total of 900 checkboxes required -->
<input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/><input type="checkbox"/>


2
ट्यूरिंग मशीन की औपचारिक परिभाषा (सरलतम) केवल राज्यों के सेट, प्रतीक सेट, प्रारंभिक राज्य, स्वीकार किए गए राज्यों को सेट और एक संक्रमण फ़ंक्शन का एक टपल है। इसमें कोई क्रैंक नहीं है। अभिकलन से हमारा मतलब है कि किसी को टेप पर संक्रमण फ़ंक्शन को ईमानदारी से लागू करने की आवश्यकता है जो इस मामले में क्लिक करने के समान है। औपचारिक रूप से, गणना के एक मॉडल को नियमों के एक सेट के रूप में देखा जा सकता है जिसे किसी व्यक्ति को गणना करने के लिए पालन करने की आवश्यकता है। उस लिहाज से, मुझे लगता है कि CSS Turing-Complete है।
जॉन

2
यह स्निपेट काम नहीं करता है (फ़ायरफ़ॉक्स 61)। मुझे खाली चेकबॉक्स का एक ग्रिड दिखाई देता है - अगर आप उन्हें चेक करते हैं तो कुछ भी नहीं होता है।
ऑरेंजडॉग सेप

2
@ जॉन "सीएसएस पूरा हो रहा है" मुझे असहज कर रहा है, लेकिन मुझे "सीएसएस के रूप में समुद्र तट पर चट्टानों के एक जोड़े के रूप में पूरा करने के रूप में ट्यूरिंग" के साथ कोई समस्या नहीं है । क्या बाद वाला बयान सही होगा?
राफेल श्मिट

1
@ R.Schmitz नहीं, उस मामले में मानव चुन रहा है कि चट्टानों को कहां रखा जाए, इसलिए यह मानव + चट्टानों की संयुक्त प्रणाली है जो पूरी तरह से ट्यूरिंग है। ऊपर सीएसएस उदाहरण में, टैब + स्पेस कीपेस एक सरल दोहराई जाने वाली प्रक्रिया है, जो एक प्रतिक्रिया सर्किट के समान है। इसलिए यदि C ++ निर्देशों को निष्पादित करने के लिए कंप्यूटर हार्डवेयर का उपयोग करके पूरी तरह से छेड़छाड़ कर रहा है, तो यह कहना एक खिंचाव नहीं है कि CSS निर्देशों को निष्पादित करने के लिए दोहराए जाने वाले
कुंजीपटों

यहाँ एक ही समाधान, प्लस एनोटेशन और कुछ सैस का उपयोग करके नियम 110 का एक कोडपेन है जिसमें DRY चीजों की मदद की जा सकती है: codepen.io/laras126/pen/OYvGZj मैंने यहां एक साथ एक ब्लॉग पोस्ट लिखी है जिसमें अवधारणाओं को समझाया गया है: notlaura.com/is-css -करण-पूर्ण
नथलौर

89

ट्यूरिंग संपूर्णता का एक पहलू रुकने की समस्या है

इसका मतलब यह है कि, यदि सीएसएस ट्यूरिंग पूरा हो गया है, तो यह निर्धारित करने के लिए कोई सामान्य एल्गोरिथ्म नहीं है कि क्या सीएसएस प्रोग्राम हमेशा के लिए रनिंग या लूप खत्म कर देगा।

लेकिन हम CSS के लिए इस तरह के एक एल्गोरिथ्म प्राप्त कर सकते हैं! यह रहा:

  • यदि स्टाइलशीट कोई एनिमेशन घोषित नहीं करता है , तो यह रुक जाएगा।

  • यदि यह एनिमेशन है, तो:

    • यदि कोई animation-iteration-countहै infinite, और युक्त चयनकर्ता HTML में मिलान किया गया है, तो यह रुक नहीं जाएगा ।

    • नहीं तो रुक जाएगा।

बस। चूंकि हमने सीएसएस के लिए केवल हल करने की समस्या को हल किया है, इसलिए यह निम्न है कि सीएसएस ट्यूरिंग पूरा नहीं है

(अन्य लोगों ने IE 6 का उल्लेख किया है, जो सीएसएस में मनमानी जावास्क्रिप्ट अभिव्यक्तियों को एम्बेड करने की अनुमति देता है; जो स्पष्ट रूप से ट्यूरिंग पूर्णता को जोड़ देगा। लेकिन यह सुविधा गैर-मानक है, और उनके सही दिमाग में कोई भी इसका उपयोग नहीं करता है।)


डैनियल वैगनर ने एक बिंदु को सामने लाया जिसे मैंने मूल उत्तर में याद किया। वह नोट करता है कि जब मैंने एनिमेशन को कवर किया है , तो स्टाइल इंजन के अन्य भागों जैसे चयनकर्ता मिलान या लेआउट के साथ-साथ ट्यूरिंग पूर्णता भी हो सकती है। हालांकि इन के बारे में औपचारिक तर्क देना मुश्किल है, मैं यह रेखांकित करने की कोशिश करूंगा कि ट्यूरिंग पूर्णता अभी भी होने की संभावना नहीं है।

पहला: ट्यूरिंग पूर्ण भाषाओं में डेटा वापस फीड करने का कोई तरीका है , चाहे वह रिकर्सन या लूपिंग के माध्यम से हो। लेकिन सीएसएस भाषा का डिज़ाइन इस प्रतिक्रिया के लिए प्रतिकूल है:

  • @mediaक्वेरीज़ केवल ब्राउज़र के गुणों की जांच कर सकती हैं, जैसे व्यूपोर्ट आकार या पिक्सेल रिज़ॉल्यूशन। ये गुण उपयोगकर्ता इंटरैक्शन या जावास्क्रिप्ट कोड (जैसे ब्राउज़र विंडो का आकार बदलना) के माध्यम से बदल सकते हैं, लेकिन अकेले सीएसएस के माध्यम से नहीं।

  • ::beforeऔर ::afterछद्म तत्वों को DOM का हिस्सा नहीं माना जाता है , और इसे किसी अन्य तरीके से मिलान नहीं किया जा सकता है।

  • चयनकर्ता कॉम्बिनेटर केवल वर्तमान तत्व के ऊपर और पहले के तत्वों का निरीक्षण कर सकते हैं, इसलिए उनका उपयोग निर्भरता चक्र बनाने के लिए नहीं किया जा सकता है।

  • जब आप इस पर मंडराते हैं , तो किसी तत्व को स्थानांतरित करना संभव होता है , लेकिन स्थिति केवल माउस ले जाने पर ही अपडेट होती है।

आपको यह समझाने के लिए पर्याप्त होना चाहिए कि चयनकर्ता मिलान, अपने दम पर, ट्यूरिंग पूर्ण नहीं हो सकता है । लेकिन लेआउट के बारे में क्या?

आधुनिक सीएसएस लेआउट एल्गोरिथ्म बहुत जटिल है, जिसमें फ्लेक्सबॉक्स और ग्रिड के पानी कीचड़ डालने जैसी विशेषताएं हैं। लेकिन भले ही लेआउट के साथ अनंत लूप को ट्रिगर करना संभव था, लेकिन उपयोगी संगणना करने के लिए इसका लाभ उठाना कठिन होगा। ऐसा इसलिए है क्योंकि CSS चयनकर्ता केवल DOM की आंतरिक संरचना का निरीक्षण करते हैं, न कि इन तत्वों को स्क्रीन पर कैसे रखा जाता है। इसलिए लेआउट सिस्टम का उपयोग करते हुए कोई भी ट्यूरिंग पूर्णता प्रमाण केवल लेआउट पर निर्भर होना चाहिए

अंत में - और यह शायद सबसे महत्वपूर्ण कारण है - ब्राउज़र विक्रेताओं को सीएसएस को ट्यूरिंग पूरा नहीं रखने में रुचि है । भाषा को प्रतिबंधित करके, विक्रेता चतुर अनुकूलन के लिए अनुमति देते हैं जो सभी के लिए वेब को तेज बनाते हैं। इसके अलावा, Google Chrome में बग खोजने के लिए एक संपूर्ण सर्वर फ़ार्म समर्पित करता है । यदि सीएसएस का उपयोग करके एक अनंत लूप लिखने का एक तरीका था, तो वे शायद इसे पहले ही पा चुके होंगे to


4
जब लोग कहते हैं कि "सीएसएस पूरा हो रहा है" तो उनका मतलब है "सीएसएस, जो एनिमेशन का समर्थन करता है ट्यूरिंग कम्प्लीट है"। आप प्रोग्रामिंग भाषाओं को प्रतिबंधित कर सकते हैं और निष्कर्ष निकाल सकते हैं कि वे आपके तर्क का उपयोग करके ट्यूरिंग पूर्ण नहीं हैं, लेकिन आपको प्रतिबंधों को निर्दिष्ट करना होगा।
फिलिक्स

36
मुझे लगता है कि यह उत्तर "पड़ाव" की एक मज़ेदार परिभाषा का उपयोग कर रहा है - निश्चित रूप से वह नहीं जो मैं चाहूंगा अगर मैं सवाल पूछ रहा हूं, तो कम से कम। आप "पड़ाव" का उपयोग करने के लिए प्रतीत होते हैं इसका मतलब है "एक समय है जिस पर प्रत्येक तत्व के लिए गणना किए गए गुण बदलना बंद कर देते हैं"; लेकिन मैं "हॉल्ट" को "एल्गोरिथ्म" कहना चाहता हूं जो सभी तत्वों को खत्म करने वाले तत्वों के गणना गुणों में घोषणात्मक सीएसएस को बदल देता है। बाद की परिभाषा के साथ, ऐसा लगता है कि "केवल कोई एनिमेशन नहीं हैं" की तुलना में काफी अधिक तर्क होने की आवश्यकता है।
डैनियल वैगनर

4
आपका तर्क यहाँ पीछे है। ट्यूरिंग पूर्णता का तात्पर्य है कि रुकना अपरिहार्य है इसका मतलब यह नहीं है कि रुकना अपरिहार्य है ट्यूरिंग पूर्णता।

3
@LambdaFairy सीएसएस के लिए हॉल्टिंग समस्या क्या है ? मुझे विश्वास नहीं होता कि ऐसी कोई चीज मौजूद है। रुकने की समस्या केवल मशीनों के लिए प्रासंगिक है। आज हमारे पास सबसे शक्तिशाली कम्प्यूटेशनल मॉडल ट्यूरिंग मशीन हैं। आपका कंप्यूटर ट्यूरिंग मशीन (w / o अनंत मेमोरी) जितना शक्तिशाली है। अकेले CSS को मशीन के रूप में परिभाषित नहीं किया जा सकता है। शायद आप एक ब्राउज़र के सीएसएस इंजन को मशीन के रूप में परिभाषित कर सकते हैं, लेकिन फिर भी यह केवल टीएम जितना शक्तिशाली हो सकता है। बयान " सीएसएस के लिए समस्या को रोकना " बस कोई मतलब नहीं है, जब तक कि सीएसएस चॉम्स्की के पदानुक्रम में एक नया ऑटोमेटन नहीं बन गया।
माइक शी

3
@LambdaFairy आप गलत समझ रहे हैं कि अपूर्णता को छेड़ने का एक प्रमाण कैसा दिखेगा। हम जानते हैं कि रुकने की समस्या एक TM द्वारा अनिर्दिष्ट है। मूल प्रमाण दावा करना प्रतीत होता है क्योंकि सीएसएस हॉल्टिंग समस्या को हल कर सकता है जो कि पूर्ण नहीं है। अगर CSS वास्तव में रुकने की समस्या को हल कर सकता है, तो CSS एक Turing Machine से अधिक मजबूत है क्योंकि यह कुछ TM की गणना नहीं कर सकता है। हम जानते हैं (चर्च-ट्यूरिंग थीसिस द्वारा), कि एक मशीन का निर्माण नहीं किया जा सकता है जो एक टीएम / द लैम्बडा कैलकुलस से अधिक मजबूत हो। इसलिए, यह एक विरोधाभास है, और आपका मूल कथन सही नहीं है।
इसहाक डायमंड

32

इस लेख के अनुसार, यह नहीं है । लेख का यह भी तर्क है कि इसे एक बनाने के लिए एक अच्छा विचार नहीं है।

टिप्पणियों में से एक से उद्धृत करने के लिए:

इसलिए, मुझे विश्वास नहीं है कि CSS पूरी तरह से चल रही है। CSS में किसी फंक्शन को डिफाइन करने की क्षमता नहीं है। ट्यूरिंग-पूर्ण होने के लिए एक प्रणाली के लिए एक दुभाषिया लिखना संभव है: एक फ़ंक्शन जो अभिव्यक्तियों की व्याख्या करता है जो प्रोग्राम को निष्पादित करने के लिए निरूपित करता है। CSS में कोई चर नहीं है जो सीधे उपयोगकर्ता के लिए सुलभ है; इसलिए आप सीएसएस में व्याख्या किए जाने वाले कार्यक्रम का प्रतिनिधित्व करने वाली संरचना का मॉडल भी नहीं बना सकते हैं।


4
सीएसएस किसी भी तरह से निष्पादन योग्य नहीं है। जिस व्यक्ति ने उद्धृत टिप्पणी लिखी है, वह समझ में नहीं आता है। : - \
रयान प्रायर

33
CSS एक प्रोसेसर (लेआउट इंजन) के निर्देशों का एक समूह है। इसके बारे में "निष्पादन योग्य" क्या नहीं है?
DVK

47
ट्यूरिंग-पूर्णता बस के बारे में नहीं है यदि आप प्रोग्राम को जिस तरह से आप चाहते हैं या एक विश्वास लिख सकते हैं। यह गणनात्मकता के बारे में एक गणितीय गुण है। तो आप विश्वास नहीं कर सकते हैं कि सीएसएस ट्यूरिंग-पूर्ण है या नहीं, आपको एक प्रमाण की आवश्यकता है। इस मामले में, नियम 110 के कारण, सीएसएस ट्यूरिंग-पूर्ण है।
मिकाइल मेयर

15
@ MikaëlMayer - जैसा कि "110" उत्तर में कई टिप्पणियों में उल्लेख किया गया है, जिसमें उपयोगकर्ता को कार्रवाई करने की आवश्यकता होती है। यदि उपयोगकर्ता की कार्रवाइयां फिर से की जाती हैं, तो उपयोगकर्ता के बिना सीएसएस पूरा नहीं हो रहा है
DVK

1
@ LCDK सीएसएस 110 उदाहरण के लिए आवश्यक दोहराए जाने वाले कुंजीपट काफी उपयोगकर्ता "एक्शन" नहीं हैं, उन्हें एक दोहराए जाने वाले डिजिटल सर्किट द्वारा किया जा सकता है। वास्तविक ट्यूरिंग मशीनों को निष्पादन के लिए कुछ प्रकार के इलेक्ट्रिकल हार्डवेयर की आवश्यकता होती है, इसलिए मैं यह नहीं देखता कि यह कैसे अलग है
woojoo666

6

ट्यूरिंग-पूर्णता केवल "परिभाषित कार्यों" या "इफ्स / लूप्स / आदि" के बारे में नहीं है। उदाहरण के लिए, हास्केल के पास "लूप" नहीं है, लैम्ब्डा-कैलकुलस में "इफ्स" आदि नहीं हैं ...

उदाहरण के लिए, यह साइट: http://experthuman.com/programming-with-nothing । लेखक रूबी का उपयोग करता है और केवल क्लोजर (कोई तार, संख्या या ऐसा कुछ भी नहीं) के साथ एक "FizzBuzz" प्रोग्राम बनाता है ...

ऐसे उदाहरण हैं जब लोग केवल प्रकार प्रणाली का उपयोग करके स्काला पर कुछ अंकगणितीय कार्यों की गणना करते हैं

तो, हाँ, मेरी राय में, CSS3 + HTML ट्यूरिंग-पूर्ण है (भले ही आप पागल हुए बिना उसके साथ कोई वास्तविक गणना नहीं कर सकते हैं)


11
हास्केल और लैम्ब्डा-कैक्लकुलस में पुनरावृत्ति होती है। सीएसएस करता है? आपको Malbolge में किसी भी वास्तविक गणना करने के लिए पागल होना होगा; सीएसएस में, इससे कोई फर्क नहीं पड़ता कि आप कितने पागल हैं: यह काम नहीं करेगा, सीएसएस ट्यूरिंग-पूर्ण नहीं है, और यह राय का विषय नहीं है।
JMCF125

11
क्षमा करें, मुझे इस पृष्ठ में आपकी कोई अन्य टिप्पणी नहीं मिली। लेकिन जैसा कि स्वीकृत उत्तर में उल्लेख किया गया है कि यह ट्यूरिंग-पूर्ण "(...) है, जब तक कि आप (...) उपयोगकर्ता इंटरैक्शन को सीएसएस के" निष्पादन "का हिस्सा मानते हैं। और मैं नहीं।
JMCF125

20
आक्रामक होने का इरादा किए बिना, पूर्णता का दोहन करना किसी की राय का जवाब नहीं देता है।
trisweb 14

5
@ MaurícioSzabo नहीं, CSS3 प्लस एचटीएमएल प्लस एक इंसान लगातार सिमुलेशन को आगे बढ़ा रहा है ट्यूरिंग पूरा हो रहा है।
लैंबडा फेयरी

4
@LambdaFairy हर शारीरिक ट्यूरिंग मशीन के बारे में भी सच है।
माइल्स रुट

5

यहां मूलभूत मुद्दा यह है कि HTML + CSS में लिखी गई कोई भी मशीन असीम रूप से कई चरणों का मूल्यांकन नहीं कर सकती है (जब तक कि कोड असीम रूप से लंबा न हो, "वास्तविक" पुनरावृत्ति नहीं हो सकती)। और सवाल यह है कि यह मशीन चरणों Hमें कॉन्फ़िगरेशन तक पहुंच जाएगी nया कम हमेशा जवाबदेह होगी यदि nपरिमित हो।


1
मैं नहीं देखता कि ट्यूरिंग मशीन की आवश्यकताओं में अनंत छोरों को संसाधित करने की क्षमता निर्दिष्ट है या नहीं। आपका दूसरा बिंदु वैध प्रतीत नहीं होता है। जबकि ट्यूरिंग मशीन ने ट्यूरिंग समस्या के मुद्दों को साबित करने के लिए अपनी ट्यूरिंग मशीन का उपयोग किया है, जबकि रुकने की समस्या की तरह, ये नियम निर्धारित नहीं करते हैं कि मशीन ट्यूरिंग मशीन है या नहीं। यदि ट्यूरिंग मशीन में इन परिकल्पनाओं को शामिल किया जाता है तो आवश्यकताओं के रूप में वह उन्हें साबित करने के लिए ट्यूरिंग मशीन का उपयोग नहीं कर सकता है।
एडम डेविस

4
@AdamDavis यह पूरी तरह से मान्य तर्क है: यदि एक एल्गोरिथ्म मौजूद है जो ट्यूरिंग-पूर्ण औपचारिकता के लिए हॉल्टिंग समस्या को हल करता है, तो यह सामान्य रूप से हॉल्टिंग समस्या को हल करने के बराबर है। बेशक, यह असंभव साबित हुआ है, जिसका अर्थ है कि अगर किसी दिए गए औपचारिकता के लिए हॉल्टिंग समस्या को हल किया जा सकता है, तो उस औपचारिकता को ट्यूरिंग-पूर्ण नहीं होना चाहिए । इसलिए, सभी औपचारिकताएं जो केवल चरणों की एक सीमित संख्या का मूल्यांकन कर सकती हैं, वे ट्यूरिंग-पूर्ण नहीं हो सकती हैं, सीएसएस शामिल हैं।
00dani

3
यह B नहीं है तो A! यह बी नहीं तो ए नहीं है ! पूर्व परिणामी की पुष्टि कर रहा है , जिसे आप सही ढंग से इंगित करते हैं कि गलत है। गर्भनिरोधक द्वारा उत्तरार्द्ध, तर्क है कि मैं क्या उपयोग करता हूं और मान्य है। मेरी पिछली टिप्पणी में नकारात्मकता के सावधानीपूर्वक उपयोग पर ध्यान दें - मैंने इसका निर्माण विशेष रूप से उस पतन से बचने के लिए किया था।
लैम्ब्डा फेयरी

1
@ woojoo666 नहीं। नियमों के एक सेट के अनुसार राज्य को बदलने में सक्षम होने के नाते, ट्यूरिंग पूर्ण होने के समान नहीं है। कुछ भी नहीं है कि केवल एक सीमित संख्या में कदम के लिए कभी भी पूरा हो सकता है। यदि परिवर्तनों के नियमों का सेट केवल एक सीमित संख्या में लागू किया जा सकता है तो सवाल "क्या व्यवस्था कभी राज्य तक पहुंच जाएगी H?" हमेशा निर्णायक होता है और यह पूर्ण रूप से ट्यूरिंग नहीं है। एक सेलुलर ऑटोमेटोन का कार्यान्वयन जो केवल पुनरावृत्तियों की एक सीमित संख्या कर सकता है, कभी भी पूर्ण रूप से ट्यूरिंग नहीं हो सकता है।
हेनरिक सोमरलैंड

1
"और, हाँ, सीएसएस भी पूरा कर रहे हैं" [उद्धरण वांछित]
एंड्रिया लेज़ारोत्तो

4

यह उत्तर सटीक नहीं है क्योंकि इसमें UTM और UTM का विवरण (यूनिवर्सल ट्यूरिंग मशीन) मिला हुआ है।

हमारे पास अच्छा जवाब है लेकिन विभिन्न दृष्टिकोणों से और यह वर्तमान शीर्ष उत्तर में सीधे खामियां नहीं दिखाता है।


सबसे पहले हम सहमत हो सकते हैं कि मानव UTM के रूप में काम कर सकता है। इसका मतलब अगर हम करते हैं

CSS + Human == UTM

तब CSSहिस्सा बेकार है क्योंकि सभी काम Humanयूटीएम भाग कौन करेगा द्वारा किया जा सकता है । क्लिक करने का कार्य यूटीएम हो सकता है, क्योंकि आप यादृच्छिक पर क्लिक नहीं करते हैं, लेकिन केवल विशिष्ट स्थानों पर।

सीएसएस के बजाय मैं इस पाठ ( नियम 110 ) का उपयोग कर सकता हूं :

000 -> 0
001 -> 1
010 -> 1
011 -> 1
100 -> 0
101 -> 1
110 -> 1
111 -> 0

मेरे कार्यों का मार्गदर्शन करने के लिए और परिणाम समान होगा। इसका मतलब यह पाठ UTM? नहीं, यह केवल इनपुट (विवरण) है जिसे अन्य UTM (मानव या कंप्यूटर) पढ़ और चला सकते हैं। क्लिक करना किसी भी UTM को चलाने के लिए पर्याप्त है।


क्रिटिकल हिस्सा है कि सीएसएस की कमी से मनमाने तरीके से इसे बदलने की क्षमता है, अगर सीएसएस क्लिक उत्पन्न कर सकता है तो यह यूटीएम होगा। यह तर्क कि CSS के लिए आपके क्लिक "क्रैंक" हैं, सटीक नहीं है क्योंकि CSS के लिए असली "क्रैंक" लेआउट इंजन है जो इसे चलाता है और यह साबित करने के लिए पर्याप्त होना चाहिए कि CSS UTM है।


नियम 110 एक UTM है। आपका पाठ नियम 110 का एक (शायद थोड़ा अपर्याप्त) विवरण है, इसलिए हाँ यह पाठ एक (UTM का प्रतिनिधित्व) है।
ऑरेंजडॉग

"यदि सीएसएस क्लिक उत्पन्न कर सकता है" मैं अपनी परियोजनाओं में बहुत सारे एवीआर माइक्रोकंट्रोलर का उपयोग करता हूं। आप या तो एक आंतरिक घड़ी का उपयोग कर सकते हैं, जो 8MHz तक सीमित है। वैकल्पिक रूप से, आप एक बाहरी क्रिस्टल को जोड़ सकते हैं और 20MHz तक जा सकते हैं। वैकल्पिक रूप से मैं सिर्फ एक पूरी तरह से बाहरी घड़ी की आपूर्ति कर सकता था इसलिए यह सीपीयू हार्डवेयर भी नहीं है जो वास्तव में क्रिस्टल चला रहा है। इसका मतलब है कि मैं वास्तव में इसे स्विच करने के लिए एक स्विच और सर्किट के एक टुकड़े को तार कर सकता हूं, और काफी शाब्दिक रूप से उपयोग करता हूं कि मेरे साथ एक बटन दबाएं। क्या इसका मतलब यह है कि अगर मैं ऐसा करता हूं तो यह पूरा हो जाना बंद हो जाता है?
सेड्रिक मैमो

1
@CedricMamo लेकिन आपकी क्लिक स्थिति बदल जाती है, और आपको केवल उन सही स्थानों पर क्लिक करने की आवश्यकता होती है, जो अन्य बुद्धिमान नहीं हैं। वास्तव में eli.fox-epste.in/rule110-full.html पर देखें, मैं किसी भी सेल पर क्लिक कर सकता हूं, अगर CSS अक्षम है तो मैं अभी भी सही कोशिकाओं पर क्लिक करता हूं और UTM है। यदि आप सभी एक बटन "नेक्स्ट" पर क्लिक कर रहे हैं तो वास्तव में CSS UTM होगा, लेकिन ऐसा कुछ करने के लिए आपको कुछ JS की आवश्यकता होगी जो कि प्रति बटन क्लिक है, और जैसा कि हम जानते हैं कि JS IS UTM है। CSS के लिए आपके पास कुछ ऐसा होना चाहिए जो सही ढंग से परिणाम और अद्यतन स्थिति की व्याख्या कर सके।
येंके

1
@CedricMamo इसका कोई लिंक? अभी मैं वहां से कुछ उदाहरण देख रहा हूं लेकिन यह मेरे लिए काम नहीं करता है। कुल मिलाकर अगर मैं सही ढंग से समझता हूं कि सीएसएस कुछ चेक बॉक्सों की दृश्यता को बदल देता है और आप अगले एक पर नेविगेट करने के लिए टैब का उपयोग करते हैं, और यहां हमने फिर से UTM छिपाया है जो CSS नहीं है, क्योंकि जब आप टैब पूछते हैं तो आप ब्राउज़र को नेविगेट करने के लिए अगली वैध स्थिति की गणना करने के लिए कहते हैं, और ओड थिन्स के लिए यह बहुत सारे जटिल कोड का उपयोग करता है, यह सीएसएस का उपयोग करता है, लेकिन इसके बहुत अधिक। इसका मतलब है कि आप यह साबित करते हैं कि आपका ब्राउज़र UTM नहीं CSS है।
येंकेज़

1
@CedricMamo लेकिन सेल्युलर ऑटोमेटा की अपनी परिभाषा में एक लूप होता है, जब स्टेट ट्रांज़िशन किया जाता है, तब उसका रन फिर से होता है, और फिर से आदि। अगर हम इसे हटा देते हैं और केवल इस स्टेट ट्रांजिशन को छोड़ देते हैं तो यह ऑटोमेटा UTM नहीं रहेगा। यह सीएसएस जैसी ही स्थिति होगी। हम CA में दो चरणों को परिभाषित कर सकते हैं, R- पढ़े गए राज्य, और W- राज्य को लिख सकते हैं, सामान्य CA RWRWRWRW...केवल सीएसएस के मामले में अनंत अनुक्रम करते हैं।R , और हमारे पास नहीं हैW क्योंकि यह उन चीजों को संशोधित करता है जो इसे पढ़ नहीं सकते हैं, केवल अगर हम जोड़ते हैं B- ब्राउज़र की कार्रवाई तब हम कर सकते थे RBRBRBR...लेकिन फिर BBBBBBअपने स्वयं के UTM पर है।
येंके

-28

CSS एक प्रोग्रामिंग भाषा नहीं है, इसलिए ट्यूरिंग-पूर्णता का प्रश्न एक अर्थहीन है। यदि प्रोग्रामिंग एक्सटेंशन को CSS में जोड़ा जाता है जैसे IE6 में मामला था तो यह कि नया संश्लेषण एक पूरी अलग चीज है।

CSS केवल शैलियों का विवरण है; इसका कोई तर्क नहीं है, और इसकी संरचना सपाट है।


1
इसके अलावा (IIRC), वहाँ कुछ अस्पष्टता है जिसके बारे में कई पूर्वविरोधी (डुप्लिकेट) शैलियों का उपयोग करने पर शैलियों में पूर्वता होती है। और फिर थोड़ा अलग तरीके हैं जिनसे निपटने के लिए अलग-अलग ब्राउज़र मार्कअप शैलियों को लागू / व्याख्या करते हैं।
डेविड आर ट्रिब्बल

70
"सीएसएस एक प्रोग्रामिंग भाषा नहीं है, इसलिए ट्यूरिंग-पूर्णता का प्रश्न एक अर्थहीन है।" टॉटोलॉजिकल वाक्य टॉटोलॉजिकल हैं।
एडम डेविस

3
प्रोग्रामिंग लैंग्वेज पर एक नज़र डालें अगर आपको आश्चर्य होता है कि आपका उत्तर इतना कम क्यों है।
एडविन
हमारी साइट का प्रयोग करके, आप स्वीकार करते हैं कि आपने हमारी Cookie Policy और निजता नीति को पढ़ और समझा लिया है।
Licensed under cc by-sa 3.0 with attribution required.