‹

01 · Theory of Computation

01 · Theory of Computation

01 · ​ทฤษฎี​การคำนวณ

This chapter is the bedrock of the tower — the floor that decides what every floor above it is permitted to attempt.

​บท​นี้​คือ​ชั้น​รากฐาน​ของ​หอคอย — ​ชั้น​ที่​ตัดสิน​ว่า​ทุก​ชั้น​เหนือ​ขึ้นไป​ได้รับอนุญาต​ให้​ลอง​ทำ​อะไร​ได้​บ้าง

What can be computed at all — and what never, on any hardware?

​อะไร​บ้าง​ที่​คำนวณ​ได้​เลย — ​และ​อะไร​ที่​คำนวณ​ไม่​ได้​เด็ดขาด ​ไม่​ว่า​จะ​บน​ฮาร์ดแวร์​ชนิด​ไหน​ก็ตาม

Here is a tool every working programmer would like to own. It reads a program and its input and answers one question: will this finish, or will it run forever? No more hung builds, no more servers looping overnight. It need not even fix the program, only report on it.

​โปรแกรมเมอร์​ทำงาน​จริง​ทุกคน​อยาก​มี​เครื่องมือ​ชิ้น​นี้​ไว้​ใน​มือ ​มัน​อ่าน​โปรแกรม​กับ​ข้อมูล​นำเข้า​ของ​โปรแกรม​นั้น ​แล้ว​ตอบคำถาม​เดียว: ​โปรแกรม​นี้​จะ​จบ ​หรือ​จะ​วน​ซ้ำ​ไป​ตลอดกาล? ​หมด build ​ที่​ค้าง ​หมด​เซิร์ฟเวอร์​ที่​วน​ลูป​ข้ามคืน ​มัน​ไม่ต้อง ​แก้ ​โปรแกรม​ด้วยซ้ำ ​แค่​รายงาน​ผล​ก็​พอ

It cannot exist. Not "nobody has managed it yet," not "it would be too slow" — no such program can be written, on any machine ever built or ever to be built, and the proof was published in 1936, before there was a machine to run it on. Why is the whole of this floor, and the reason the floor sits at the bottom of the tower: it fences the territory everything above builds on.

​มัน​ไม่​มีทาง​มี​อยู่​จริง ​ไม่​ใช่ "​ยัง​ไม่​มี​ใคร​ทำสำเร็จ" ​ไม่​ใช่ "​มัน​คง​ช้า​เกินไป" — ​ไม่​มี​ใคร​เขียน​โปรแกรม​แบบนี้​ขึ้น​มา​ได้ ​ไม่​ว่า​จะ​บน​เครื่อง​ไหน​ที่​เคย​สร้าง​มา​แล้ว​หรือ​จะ​สร้าง​ขึ้น​ในอนาคต ​และ​บทพิสูจน์​ตีพิมพ์​ตั้งแต่​ปี 1936 ​ก่อน​จะ​มี​เครื่องจักร​สัก​เครื่อง​ให้​รัน​มัน​ด้วยซ้ำ "​ทำไม" ​คือ​เนื้อหา​ทั้งหมด​ของ​ชั้นนี้ ​และ​คือ​เหตุผล​ที่​ชั้นนี้​อยู่​ล่าง​สุด​ของ​หอคอย: ​มัน​ปัก​เขตแดน​ให้​ทุกอย่าง​ข้างบน​สร้าง​ต่อยอด​ขึ้น​มา

The question came from Hilbert, and was meant to have a happy answer. In 1928 David Hilbert and Wilhelm Ackermann published Grundzüge der theoretischen Logik, the first textbook exposition of first-order logic, and posed in it the Entscheidungsproblem: is there a definite procedure that takes any statement of logic and decides whether it follows from the axioms (Springer)? Hilbert expected there was. In Königsberg on 8 September 1930 he closed a speech with the line later carved on his gravestone: Wir müssen wissen — wir werden wissen — we must know, we will know (MAA Convergence).

​คำถาม​นี้​มาจาก Hilbert ​และ​ตั้งใจ​ให้​มี​คำตอบ​ที่​มีความสุข ​ปี 1928 David Hilbert ​กับ Wilhelm Ackermann ​ตีพิมพ์ Grundzüge der theoretischen Logik ​ตำรา​เล่ม​แรก​ที่​อธิบาย​ตรรกศาสตร์​อันดับ​หนึ่ง (first-order logic) ​อย่าง​เป็นระบบ ​และ​วาง​คำถาม Entscheidungsproblem ​ไว้​ใน​เล่ม: ​มี​กระบวนการ​ที่​แน่นอน​ซึ่ง​รับ​ข้อความ​เชิง​ตรรกะ​ใดๆ ​แล้ว​ตัดสิน​ได้​ไหม​ว่า​มัน​สืบเนื่อง​มาจาก​สัจพจน์ (axiom) ​หรือไม่ (Springer)? Hilbert ​คาด​ว่า​มี ​ที่​เมือง Königsberg ​วันที่ 8 ​กันยายน 1930 ​เขา​ปิด​ปาฐกถา​ด้วย​ประโยค​ที่​ภายหลัง​ถูก​สลัก​บน​หลุมศพ​ของ​เขา: Wir müssen wissen — wir werden wissen — ​เรา​ต้อง​รู้ ​เรา​จะ​ต้อง​รู้ (MAA Convergence)

The day before, at a roundtable closing a conference in the same city, a young logician named Kurt Gödel had mentioned almost in passing that any consistent formal system strong enough to describe arithmetic must contain true statements it cannot prove. The room let it go by; John von Neumann, present, appears to have been the only person who grasped what had happened (Davis, Notices of the AMS, 2006). The paper followed in 1931 (Monatshefte für Mathematik und Physik 38: 173–198).

​วันก่อน​หน้า​นั้น ​ที่​โต๊ะกลม​ปิดท้าย​การประชุม​วิชาการ​ใน​เมือง​เดียวกัน ​นัก​ตรรกวิทยา​หนุ่ม​ชื่อ Kurt Gödel ​เอ่ย​ขึ้น​มา​เกือบจะ​เป็นการ​พูด​ผ่านๆ ​ว่า​ระบบ​รูป​นัย (formal system) ​ที่​สอดคล้อง​ใน​ตัวเอง​ใดๆ ​ที่​แข็งแรง​พอ​จะ​อธิบาย​เลขคณิต​ได้ ​ต้อง​มี​ข้อความ​จริง​บาง​ข้อ​ที่​มัน​พิสูจน์​ไม่​ได้​อยู่​ใน​ตัว ​ห้องประชุม​ปล่อย​ผ่าน; John von Neumann ​อยู่​ใน​ที่ประชุม​ด้วย ​และ​ดูเหมือน​จะ​เป็น​คนเดียว​ที่จับ​ได้​ว่า​เพิ่ง​เกิด​อะไร​ขึ้น (Davis, Notices of the AMS, 2006) ​บทความ​ตามมา​ใน​ปี 1931 (Monatshefte für Mathematik und Physik 38: 173–198)

Gödel had holed the ship, but the Entscheidungsproblem stayed afloat: you cannot prove no procedure exists until you have said what a procedure is.

Gödel ​เจาะ​รู​เรือ​ไป​แล้ว ​แต่ Entscheidungsproblem ​ยัง​ลอย​อยู่​ได้: ​คุณ​พิสูจน์​ไม่​ได้​ว่า​ไม่​มี​กระบวนการ​ใด​อยู่เลย ​จนกว่า​จะ​นิยาม​ก่อน​ว่า "​กระบวนการ" ​คือ​อะไร

The definition was found by watching a person. Alan Turing's move, at twenty-three and a Fellow of King's College, was less mathematical than anthropological. In 1936 a computer was a job title: a human being, usually poorly paid, who calculated. Turing watched one. "Computing is normally done by writing certain symbols on paper," he wrote. "We may suppose this paper is divided into squares like a child's arithmetic book" (On Computable Numbers, §9). Then he stripped the human away one faculty at a time: a bound on the symbols taken in at a glance, a bound on the "states of mind" he can hold, nothing to do but look, write, and move. What remains is a tape, a finite table of rules, and a head that reads and writes — the Turing machine, less a machine than a description of what a person does when they stop thinking and start following instructions. The London Mathematical Society received it on 28 May 1936.

​นิยาม​นั้น​ได้มา​จาก​การเฝ้าดู​คน ​สิ่ง​ที่ Alan Turing ​ทำ​ตอน​อายุ​ยี่สิบ​สาม​ปี​และ​เป็น Fellow ​ของ King's College ​เป็นแนว​มานุษยวิทยา​มากกว่า​คณิตศาสตร์ ​ใน​ปี 1936 ​คำ​ว่า computer ​ยัง​เป็น​ชื่อ​ตำแหน่งงาน: ​มนุษย์​คน​หนึ่ง ​มักได้​ค่าจ้าง​ต่ำ ​ที่​ทำหน้าที่​คำนวณ Turing ​เฝ้าดู​คน​คน​นั้น ​เขา​เขียน​ไว้​ว่า "​การคำนวณ​โดยปกติ​ทำ​โดย​การเขียน​สัญลักษณ์​บางอย่าง​ลง​บน​กระดาษ ​เรา​อาจ​สมมติ​ว่า​กระดาษ​แผ่น​นี้​ถูก​แบ่ง​เป็น​ช่อง​สี่เหลี่ยม​เหมือน​สมุด​เลขคณิต​ของ​เด็ก" (On Computable Numbers, §9) ​เขา​ถอดความ​สามารถ​ของ​มนุษย์​ออก​ทีละ​อย่าง: ​จำกัด​สัญลักษณ์​ที่​รับรู้​ได้​ใน​การมอง​แต่ละครั้ง ​จำกัด "​สภาวะ​ทาง​ความคิด (states of mind)" ​ที่​เขา​จำไว้​ได้ ​ไม่​เหลือ​อะไร​ให้​ทำ​นอกจาก​มอง ​เขียน ​และ​ขยับ ​สิ่งที่เหลืออยู่​คือ​เทป ​ตาราง​กฎ​จำนวน​จำกัด ​และ​หัว​อ่าน​ที่​อ่าน​และ​เขียน​ได้ — ​คือ​เครื่องทัว​ริง (Turing machine) ​ที่​เป็น​คำอธิบาย​ว่า​มนุษย์​ทำ​อะไร​เมื่อ​หยุด​คิด​แล้ว​เริ่ม​ทำตาม​คำสั่ง ​มากกว่า​จะ​เป็น​เครื่องจักร​จริงๆ ​เสีย​อีก London Mathematical Society ​รับบท​ความนี้​ไว้​เมื่อ​วันที่ 28 ​พฤษภาคม 1936

Everyone who defined it independently landed in the same place. Alonzo Church got there first by another road: an April 1936 proof, built on his lambda calculus, that no such procedure exists (American Journal of Mathematics 58: 345–363). Emil Post reached a near-identical formalism that year; Gödel and Kleene, general recursive functions. All define exactly the same class, and that convergence is the evidence for the Church–Turing thesis: this class is what we informally mean by "effectively calculable." It is a thesis, not a theorem, and cannot be otherwise: it joins an informal human idea to a formal object, and no proof bridges that gap (Stanford Encyclopedia of Philosophy). It is also why this floor's results are hardware-proof: build a computer from anything you like — tubes, silicon, qubits — and if it computes at all, it computes this set and no more.

​ทุกคน​ที่​นิยาม​มัน​ขึ้น​มา​อย่าง​เป็นอิสระ​ต่อกัน ​ต่าง​มา​ลงเอย​ที่​จุด​เดียวกัน Alonzo Church ​ถึง​จุด​นั้น​ก่อน​ใคร​ด้วย​เส้นทาง​อื่น: ​บทพิสูจน์​เมื่อ​เดือน​เมษายน 1936 ​สร้าง​บน lambda calculus ​ของ​เขา ​ว่า​ไม่​มี​กระบวนการ​แบบ​นั้น​อยู่​จริง (American Journal of Mathematics 58: 345–363) Emil Post ​ถึง​ระบบ​รูป​นัย​ที่​แทบจะ​เหมือนกัน​ใน​ปี​เดียวกัน; Gödel ​กับ Kleene ​ถึง​ด้วย general recursive functions ​ทั้งหมด​นี้​นิยาม​คลาส​เดียวกัน​เป๊ะ ​และ​การที่​ต่าง​เส้นทาง​มา​บรรจบ​กัน​นี้​เอง​คือ​หลักฐาน​ของ​ข้อ​ตั้ง Church–Turing (Church–Turing thesis): ​คลาส​นี้*​คือ*​สิ่ง​ที่​เรา​หมายถึง​อย่าง​ไม่​เป็นทางการ​เมื่อ​พูดว่า "​คำนวณ​ได้​อย่าง​มีประสิทธิผล" ("effectively calculable") ​มัน​เป็น​ข้อ​ตั้ง ​ไม่​ใช่​ทฤษฎีบท ​และ​เป็น​อย่าง​อื่น​ไป​ไม่​ได้: ​มัน​เชื่อม​ไอเดีย​ของ​มนุษย์​ที่​ไม่​เป็นทางการ​เข้ากับ​วัตถุ​ที่​เป็น​รูป​นัย ​และ​ไม่​มี​บทพิสูจน์​ใด​ข้าม​ช่องว่าง​นั้น​ได้ (Stanford Encyclopedia of Philosophy) ​นี่​คือ​เหตุผล​ที่​ผลลัพธ์​ของ​ชั้นนี้​ทนทาน​ต่อ​ฮาร์ดแวร์​ทุกชนิด: ​สร้าง​เครื่อง​คำนวณ​ขึ้น​จาก​อะไร​ก็ได้​ที่​คุณ​อยาก​ใช้ — ​หลอด​สุญญากาศ ​ซิลิคอน ​คิว​บิต (qubit) — ​ถ้า​มัน​คำนวณ​ได้​จริง ​มัน​ก็​คำนวณ​ได้​แค่​คลาส​นี้ ​ไม่​มาก​ไป​กว่า​นี้

One machine can be all machines. Section 6 of Turing's paper opens with the most consequential sentence in it: "It is possible to invent a single machine which can be used to compute any computable sequence." Hand a machine the description of another and it behaves as that one. Before this, a calculating device was built for its task — a loom for weaving, a differential analyzer for equations. After, the machine is blank and the task arrives as data. Everything downstream depends on that: software separable from hardware, the compiler, the emulator, the virtual machine, the operating system running programs it was never designed for. Universality is the hinge the tower swings on.

​เครื่อง​เดียว​เป็น​เครื่อง​ทุก​เครื่อง​ได้ ​ส่วน​ที่ 6 ​ของ​บทความ​ของ Turing ​เปิด​ด้วย​ประโยค​ที่​ส่งผล​สะเทือน​ที่สุด​ใน​บทความ​ทั้ง​ฉบับ: "​เป็นไปได้​ที่จะ​ประดิษฐ์​เครื่อง​เดี่ยว​เครื่อง​หนึ่ง​ขึ้น​มา ​ซึ่ง​ใช้​คำนวณ​ลำดับ​ที่​คำนวณ​ได้​ใดๆ ​ก็ได้​ทั้งหมด" ("It is possible to invent a single machine which can be used to compute any computable sequence.") ​ป้อน*​คำอธิบาย*​ของ​เครื่อง​อื่น​ให้​เครื่อง​หนึ่ง ​มัน​ก็​ทำตัว​เป็น​เครื่อง​นั้น ​ก่อนหน้านี้ ​อุปกรณ์​คำนวณ​ถูก​สร้าง​มา​เพื่อ​งาน​เฉพาะ​ของ​มัน — ​กี่ทอผ้า​สำหรับ​ทอผ้า ​เครื่อง​วิเคราะห์​เชิง​อนุพันธ์ (differential analyzer) ​สำหรับ​สมการ ​หลังจากนั้น ​ตัว​เครื่อง​ว่างเปล่า ​และ​งาน​มาถึง​ใน​รูป​ข้อมูล ​ทุกอย่าง​ที่​ตามมา​ขึ้นอยู่กับ​จุด​นั้น: ​ซอฟต์แวร์​ที่​แยก​ออกจาก​ฮาร์ดแวร์​ได้ ​คอมไพเลอร์ ​อีมู​เลเตอร์ (emulator) ​เครื่อง​เสมือน (virtual machine) ​ระบบปฏิบัติการ​ที่​รัน​โปรแกรม​ซึ่ง​ไม่​เคย​ถูก​ออกแบบ​มา​ให้​มัน​รัน ​ความเป็นสากล (universality) ​คือ​บานพับ​ที่​หอคอย​ทั้ง​หลัง​แกว่ง​อยู่​บน

And some questions simply have no procedure. The proof is Cantor's diagonal argument of 1891, turned on machines. Suppose the halting checker exists. Build a program that hands the checker its own description and does the opposite of the prediction: halt if told it loops, loop if told it halts. Ask the checker about that program and it must be wrong. So it never existed.

​บาง​คำถาม​ไม่​มี​กระบวนการ​ตอบ​เลย​จริงๆ ​บทพิสูจน์​คือ​การทแยงมุม (diagonalization) ​ของ Cantor ​จาก​ปี 1891 ​หันมา​ใช้กับ​เครื่องจักร ​สมมติ​ว่า​ตัว​ตรวจสอบ​การหยุด (halting checker) ​มี​อยู่​จริง ​สร้าง​โปรแกรม​ที่​ป้อน​คำอธิบาย​ของ​ตัว​มัน​เอง​ให้​ตัว​ตรวจสอบ ​แล้ว​ทำ​ตรงข้าม​กับ​คำทำนาย​ที่​ได้รับ: ​หยุด​ถ้า​ถูก​บอก​ว่า​มัน​จะ​วน​ลูป ​วน​ลูป​ถ้า​ถูก​บอก​ว่า​มัน​จะ​หยุด ​ถาม​ตัว​ตรวจสอบ​เกี่ยวกับ​โปรแกรม​นั้น ​มัน​ต้อง​ตอบ​ผิด​เสมอ ​มัน​จึง​ไม่​เคย​มี​อยู่​จริง​ตั้งแต่แรก

Two footnotes of honesty. Turing used neither that name nor that proof; he proved undecidability for related problems about his machines, and both name and modern formulation appear later, in Martin Davis's Computability and Unsolvability of 1958 (Hamkins & Nenu, 2024). And halting is no exotic special case: H. G. Rice proved in 1953 that every non-trivial question about what a program computes is undecidable (Transactions of the American Mathematical Society 74: 358–366). That is a fence, not a pothole — why no compiler will promise your loop terminates, why no antivirus can decide by analysis alone whether a program is malicious, and why every static analyzer answers "yes," "no," or "I cannot tell." That third answer is a theorem, not a bug.

​เชิงอรรถ​แห่ง​ความซื่อตรง​สอง​ข้อ Turing ​ไม่​ได้​ใช้​ทั้ง​ชื่อ​นั้น​และ​บทพิสูจน์​แบบ​นั้น​เลย ​เขา​พิสูจน์​การตัดสิน​ไม่​ได้ (undecidability) ​ของ​ปัญหา​ที่​เกี่ยวข้อง​กับ​เครื่องจักร​ของ​เขา​เท่านั้น ​ทั้ง​ชื่อ "​ปัญหา​การหยุด (halting problem)" ​และ​รูปแบบ​สมัยใหม่​มา​ทีหลัง ​ใน Computability and Unsolvability ​ของ Martin Davis ​ปี 1958 (Hamkins & Nenu, 2024) ​ข้อ​สอง ​การหยุด​ไม่​ใช่​กรณีพิเศษ​แปลกๆ: H. G. Rice ​พิสูจน์​ใน​ปี 1953 ​ว่า​คำถาม​ที่​ไม่​ธรรมดา*​ทุก*​ข้อ​เกี่ยวกับ​สิ่ง​ที่​โปรแกรม​คำนวณ​นั้น​ตัดสิน​ไม่​ได้​ทั้งหมด (Transactions of the American Mathematical Society 74: 358–366) ​นั่น​คือ​รั้ว​กั้น​เขต ​ไม่​ใช่​หลุม​บ่อ — ​คือ​เหตุผล​ที่​ไม่​มี​คอมไพเลอร์​ตัว​ไหน​รับประกัน​ได้​ว่า​ลูป​ของ​คุณ​จะ​จบ ​เหตุผล​ที่​ไม่​มี​โปรแกรม​ป้องกัน​ไวรัส​ตัว​ไหน​ตัดสิน​ได้​จาก​การวิเคราะห์​อย่าง​เดียว​ว่า​โปรแกรม​หนึ่ง​เป็นอันตราย​หรือไม่ ​และ​เหตุผล​ที่ static analyzer ​ทุก​ตัว​ตอบ​ได้​แค่ "​ใช่" "​ไม่​ใช่" ​หรือ "​บอก​ไม่​ได้" ​คำตอบ​ที่สาม​นั้น​คือ​ทฤษฎีบท ​ไม่​ใช่​บั๊ก

Past the wall of the possible stands a second wall: the affordable. A problem can be decidable and still cost more than the universe can pay. Stephen Cook showed in 1971 that Boolean satisfiability is NP-complete, and Leonid Levin proved as much independently in 1973 (Cook's own account). The instrument behind such a claim is reduction: a translation cheap enough that a fast solver for one problem becomes a fast solver for another — one hard problem made into a lever on all the rest. In 1972 Richard Karp used it to show that twenty more natural problems were the same problem in disguise (Karp, 1972); by 1979 Garey and Johnson's Computers and Intractability catalogued three hundred. Whether checking an answer quickly implies finding one quickly — P versus NP — was posed in a letter Gödel wrote to the dying von Neumann on 20 March 1956 (translation), carries a million-dollar Clay Institute prize, and is unsolved (CMI). The wall leaks usefully, though: the best proven bound for 3-SAT is exponential, yet industrial solvers routinely dispatch structured instances of over a million variables (Gomes et al.). Worst case is not typical case — where the next floor begins.

​พ้น​กำแพง​แห่ง​ความเป็นไปได้​ไป​แล้ว ​ยังมี​กำแพง​ที่สอง: ​ความคุ้ม​ต้นทุน ​ปัญหา​หนึ่ง​อาจ​ตัดสิน​ได้ (decidable) ​แต่​แพง​กว่า​ที่​เอกภพ​ทั้ง​ใบ​จะ​จ่าย​ไหว Stephen Cook ​แสดงให้เห็น​ใน​ปี 1971 ​ว่า Boolean satisfiability ​เป็น NP-complete ​และ Leonid Levin ​พิสูจน์​เรื่อง​เดียวกัน​อย่าง​เป็นอิสระ​ใน​ปี 1973 (​บันทึก​ของ Cook ​เอง) ​เครื่องมือ​เบื้องหลัง​ข้อกล่าวอ้าง​แบบนี้​คือ ​การลดรูป (reduction): ​การแปลง​ที่​ถูก​พอ​จน​ตัว​แก้ปัญหา​ที่​เร็ว​สำหรับ​ปัญหา​หนึ่ง ​กลายเป็น​ตัว​แก้ปัญหา​ที่​เร็ว​สำหรับ​อีก​ปัญหา​หนึ่ง — ​ปัญหา​ยาก​ข้อ​เดียว​กลายเป็น​คันโยก​ที่​ยก​ปัญหา​ที่​เหลือ​ทั้งหมด​ได้ ​ปี 1972 Richard Karp ​ใช้​มัน​แสดงให้เห็น​ว่า​ปัญหา​ที่​ดู​เป็นธรรมชาติ​อีก​ยี่สิบ​ข้อ ​แท้จริง​คือ​ปัญหา​เดียวกัน​ที่​แค่​ปลอมตัว​มา (Karp, 1972); ​พอ​ถึง​ปี 1979 ​หนังสือ Computers and Intractability ​ของ Garey ​กับ Johnson ​รวบรวม​ได้​ถึง​สาม​ร้อย​ปัญหา ​ส่วน​คำถาม​ว่าการ​ตรวจ​คำตอบ​ได้​เร็ว​บ่งบอก​ว่า​หา​คำตอบ​ได้​เร็ว​ด้วย​หรือไม่ — P vs NP — ​ตั้งขึ้น​ใน​จดหมาย​ที่ Gödel ​เขียน​ถึง von Neumann ​ผู้​กำลังจะ​เสียชีวิต​เมื่อ​วันที่ 20 ​มีนาคม 1956 (​คำแปล) ​มา​พร้อม​เงิน​รางวัล​หนึ่ง​ล้าน​ดอลลาร์​จาก Clay Institute ​และ​ยัง​ไม่​มี​คำตอบ​มา​จนถึง​ทุกวันนี้ (CMI) ​กำแพง​นี้​รั่ว​อย่าง​เป็นประโยชน์​อยู่​บ้าง: ​ขอบเขต​ที่​พิสูจน์​ได้ดี​ที่สุด​สำหรับ 3-SAT ​คือ​เชิง​เลขชี้กำลัง (exponential) ​แต่​ตัว​แก้ปัญหา​ระดับ​อุตสาหกรรม​จัดการ​อิน​สแตนซ์​ที่​มี​โครงสร้าง​ชัดเจน​ซึ่ง​มี​ตัวแปร​กว่า​ล้าน​ตัว​ได้​เป็นประจำ (Gomes et al.) ​กรณี​แย่​สุด (worst case) ​ไม่​ใช่​กรณี​ทั่วไป (typical case) — ​และ​นี่​คือ​จุด​ที่​ชั้น​ถัดไป​เริ่มต้น

Connections

​เชื่อมโยง

Below: 00, the map. Above: 02, which takes every problem this floor calls possible and asks what it costs, turning the same counting arguments into lower bounds. Universality is what 05 sells as virtualization and 06 as compilation. 11 builds on the second wall: cryptography is the deliberate manufacture of problems believed unaffordable.

​ชั้นล่าง: ​บท​ที่ 00 ​แผนที่ ​ชั้นบน: ​บท​ที่ 02 ​ที่​หยิบ​ทุก​ปัญหา​ซึ่ง​ชั้นนี้​เรียก​ว่า​เป็นไปได้ ​มา​ถาม​ต่อว่า​มัน​มี​ต้นทุน​เท่าไร ​โดย​เปลี่ยน​ข้อโต้แย้ง​เชิง​การนับ​ชุด​เดียวกัน​ให้​กลายเป็น​ขอบ​ล่าง (lower bound) ​ความเป็นสากล (universality) ​คือ​สิ่ง​ที่​บท​ที่ 05 ​ขาย​ใน​ชื่อ​การทำ​เสมือน (virtualization) ​และ​บท​ที่ 06 ​ขาย​ใน​ชื่อ​การคอมไพล์ (compilation) ​บท​ที่ 11 ​สร้าง​ต่อ​จาก​กำแพง​ที่สอง: ​วิทยาการ​รหัสลับ (cryptography) ​คือ​การจงใจ​ผลิต​ปัญหา​ที่​เชื่อ​กัน​ว่า​ไม่​คุ้ม​ต้นทุน​จะ​แก้

Open questions

​คำถาม​ที่​ยัง​เปิด​อยู่

P versus NP, obviously — though a proof that P = NP would be less a theorem than an event: the security of the internet dissolved, much of mathematics handed to a machine. Is the thesis itself safe? Quantum computers compute nothing a Turing machine cannot, but may break its efficiency version — chapter 14's territory. And the deepest: undecidability limits machines and, through the thesis, any procedure a human could follow. Does anything escape it, or is the fence around the possible simply the shape of thought?

P vs NP ​แน่นอน​อยู่แล้ว — ​แม้ว่า​บทพิสูจน์​ว่า P = NP ​จะ​เป็น​เหตุการณ์​มากกว่า​ทฤษฎีบท: ​ความปลอดภัย​ของ​อินเทอร์เน็ต​สลาย​ไป ​คณิตศาสตร์​ส่วนใหญ่​ถูก​ส่งมอบ​ให้​เครื่องจักร​ทำแทน ​ข้อ​ตั้ง Church–Turing ​เอง​ปลอดภัย​หรือเปล่า? ​คอมพิวเตอร์​ควอนตัม (quantum computer) ​คำนวณ​อะไร​ที่ Turing machine ​คำนวณ​ไม่​ได้​เลย​สัก​อย่าง ​แต่​อาจ​ทำลาย​เวอร์ชัน*​ประสิทธิภาพ*​ของ​มัน​ได้ — ​ดินแดน​ของ​บท​ที่ 14 ​และ​คำถาม​ที่​ลึก​ที่สุด: ​การตัดสิน​ไม่​ได้ (undecidability) ​จำกัด​ขอบเขต​ของ​เครื่องจักร ​และ​ผ่าน​ทาง​ข้อ​ตั้ง​นี้ ​ก็​จำกัด​กระบวนการ​ใดๆ ​ที่​มนุษย์​จะ​ทำตาม​ได้​ด้วย ​มี​อะไร​หนี​พ้น​มัน​ได้​ไหม ​หรือ​รั้ว​ที่​ล้อมรอบ​สิ่ง​ที่​เป็นไปได้ ​ก็​คือ​รูปทรง​ของ​ความคิด​เอง​นั่นแหละ?

Go deeper

​อ่าน​ต่อ

  • Michael Sipser, Introduction to the Theory of Computation, 3rd ed., Cengage, 2012 — the standard course text (author's page).
  • A. M. Turing, "On Computable Numbers, with an Application to the Entscheidungsproblem," Proceedings of the London Mathematical Society, ser. 2, 42 (1936–37): 230–265 — worth reading for §9 alone (PDF).
  • Richard Karp, "Reducibility Among Combinatorial Problems," 1972 — the paper that turned NP-completeness from a theorem into a map (PDF).
  • Michael Sipser, Introduction to the Theory of Computation, 3rd ed., Cengage, 2012 — ​ตำราเรียน​มาตรฐาน​ของ​วิชา​นี้ (​หน้า​เว็บ​ของ​ผู้เขียน)
  • A. M. Turing, "On Computable Numbers, with an Application to the Entscheidungsproblem," Proceedings of the London Mathematical Society, ser. 2, 42 (1936–37): 230–265 — ​คุ้มค่า​จะ​อ่าน​แค่ §9 ​ก็​ยัง​คุ้ม (PDF)
  • Richard Karp, "Reducibility Among Combinatorial Problems," 1972 — ​เปเปอร์​ที่​เปลี่ยน NP-completeness ​จาก​ทฤษฎีบท​ให้​กลายเป็น​แผนที่ (PDF)
บทถัดไป · 3 / 1602 · Algorithms & Data Structures
Size
Page
Font

The Tower of Abstractions — An Encyclopedia of the Computing Disciplines

❦
100 · The Map00 · แผนที่201 · Theory of Computation01 · ทฤษฎีการคำนวณ302 · Algorithms & Data Structures02 · อัลกอริทึมและโครงสร้างข้อมูล403 · Information & Coding03 · สารสนเทศและการเข้ารหัส504 · Computer Architecture04 · สถาปัตยกรรมคอมพิวเตอร์605 · Operating Systems05 · ระบบปฏิบัติการ706 · Languages & Compilers06 · ภาษาและคอมไพเลอร์807 · Software Engineering07 · วิศวกรรมซอฟต์แวร์908 · Databases08 · ฐานข้อมูล1009 · Networks09 · เครือข่าย1110 · Distributed Systems10 · ระบบกระจาย1211 · Security & Cryptography11 · ความปลอดภัยและวิทยาการรหัสลับ1312 · AI & Machine Learning12 · ปัญญาประดิษฐ์และการเรียนรู้ของเครื่อง1413 · HCI & Graphics13 · ปฏิสัมพันธ์มนุษย์–คอมพิวเตอร์ และกราฟิกส์1514 · The Frontier14 · พรมแดน1699 · Closing — The Tower, Seen Whole99 · ปิดเล่ม — หอคอยเมื่อมองทั้งหลัง