مسئله توقف: تفاوت میان نسخه‌ها

محتوای حذف‌شده محتوای افزوده‌شده
جز سوال به سؤال، replaced: سوال ← سؤال (3) با استفاده از AWB
خط ۳:
اگر شرح یک برنامه و ورودی متناهی متناظر با آن را داشته باشیم آیا می‌توان تشخیص داد که این برنامه متوقف می‌شود یا تا ابد ادامه می‌یابد.
 
در این مساله هیچ شرطی بر روی زمانی که طول می‌کشد تا برنامه تمام شود یا حافظه‌ای که اشغال می‌کند وجود ندارد، یعنی ممکن است اجرای برنامه زمان زیادی طول بکشد، یا حافظه زیادی اشغال شود تا برنامه تمام شود؛ یعنی سوالسؤال این است که آیا بالاخره این برنامه تمام می‌شود یا تا ابد ادامه پیدا می‌کند.
 
[[پرونده:Alan_Turing.jpg|بندانگشتی|[[آلن تورینگ]] از پیش‌گامان کار بر مساله توقف بود.]]
خط ۱۴:
<code>
 
int main(void)
 
{ while (1); }
خط ۳۸:
 
== اهمیت و نتایج مساله توقف ==
در کل مساله توقف از این جنبه مشهور است که از اولین دسته مسائلی بود که تصمیم ناپذیر بود، بدین صورت که هیچ برنامه کامپیوتری با قابلیت جواب دادن به این سوالسؤال به ازای جمیع ورودی‌ها پیدا نشد و اثبات شد که وجود ندارد. در نتیجه آن تعدادی زیادی مسائلی از این دست بیان شدند. راه حل رایج برای اثبات کردن اینکه یک مساله تصمیم ناپذیر است استفاده از [[روش کاهیدن]] (reduction) است.
 
یکی از نتایج تصمیم ناپذیر بودن مساله توقف این است که الگوریتمی عمومی برای پیدا کردن درستی یا نادرستی یک حکم درباره اعداد طبیعی وجود ندارد. چون می‌توان گزاره‌ای که نشان می‌دهد آیا یک الگوریتم با ورودی‌های مربوط به آن متوقف می‌شود یا نه را متناظر با یک حکم درباره اعداد طبیعی در نظر گرفت. چون می دانیم که این همان مساله توقف است پس چنین الگوریتمی برای اعداد طبیعی پیدا نمی‌شود.
 
یکی دیگر از نتایج تصمیم ناپذیری مساله توقف تئوری [[Rice's theorem]] است که می‌گوید به طور کلی نمی‌توان دربارهٔ درستی هرعبارت نا بدیهی (non-trival) مربوط به تابعی که توسط یک الگوریتم تعریف شده نظر داد. برای مثال نمی‌توان به سوالسؤال «آیا این الگوریتم با ورودی 0 متوقف می‌شود یا نه» پاسخ قطعی داد. توجه کنید که این تئوری درباره تابعی که توسط الگوریتم تعریف شده نظر می‌دهد و نه دربارهٔ خود الگوریتم. برای مثال تشخیص اینکه یک الگوریتم در 100 مرحله متوقف می‌شود یا نه کار آسانی است و این یک گزاره دربارهٔ خود الگوریتم است و نه دربارهٔ تابع آن الگوریتم.
 
== رسمی کردن مساله توقف ==
خط ۸۳:
== پیوند به بیرون ==
* {{یادکرد-ویکی|پیوند=http://en.wikipedia.org/wiki/Halting_problem|عنوان = Halting problem|بازیابی = ۲ می ۲۰۱۱}}
* [[:w:en:Worst-case_execution_timecase execution time|زمان اجرا در بدترین حالت]]
 
== منابع ==
{{پانویس}}
{{چپ‌چین}}
* Alan Turing, On computable numbers, with an application to the Entscheidungsproblem, Proceedings of the London Mathematical Society, Series 2, 42 (1936), pp 230-265230–265. online version This is the epochal paper where Turing defines Turing machines, formulates the halting problem, and shows that it (as well as the Entscheidungsproblem) is unsolvable.
* Sipser, Michael (2006). "Section 4.2: The Halting Problem", Introduction to the Theory of Computation, Second Edition, PWS Publishing, pp.&nbsp;173–182. ISBN 0-534-94728-X.
* Wiki:HaltingProblem
* B. Jack Copeland ed. (2004), The Essential Turing: Seminal Writings in Computing, Logic, Philosophy, Artificial Intelligence, and Artificial Life plus The Secrets of Enigma, Clarendon Press (Oxford University Press), Oxford UK, ISBN 0-19-825079-7.
* Martin Davis, The Undecidable, Basic Papers on Undecidable Propositions, Unsolvable Problems And Computable Functions, Raven Press, New York, 1965. Turing's paper is #3 in this volume. Papers include those by Godel, Church, Rosser, Kleene, and Post.
* Martin Davis, Computability and Unsolvability, McGraw-Hill, New York, 1958.
* Alfred North Whitehead and Bertrand Russell, Principia Mathematica to *56, Cambridge at the University Press, 1962. Re: the problem of paradoxes, the authors discuss the problem of a set not be an object in any of its "determining functions", in particular "Introduction, Chap. 1 p. 24 "...difficulties which arise in formal logic", and Chap. 2.I. "The Vicious-Circle Principle" p.&nbsp;37ff, and Chap. 2.VIII. "The Contradictions" p. &nbsp;60ff.
* Martin Davis, "What is a computation", in Mathematics Today, Lynn Arthur Steen, Vintage Books (Random House), 1980. A wonderful little paper, perhaps the best ever written about Turing Machines for the non-specialist. Davis reduces the Turing Machine to a far-simpler model based on Post's model of a computation. Discusses Chaitin proof. Includes little biographies of Emil Post, Julia Robinson.
* Marvin Minsky, Computation, Finite and Infinite Machines, Prentice-Hall, Inc., N.J., 1967. See chapter 8, Section 8.2 "The Unsolvability of the Halting Problem." Excellent, i.e. readable, sometimes fun. A classic.
خط ۱۰۲:
* Constance Reid, Hilbert, Copernicus: Springer-Verlag, New York, 1996 (first published 1970). Fascinating history of German mathematics and physics from 1880s through 1930s. Hundreds of names familiar to mathematicians, physicists and engineers appear in its pages. Perhaps marred by no overt references and few footnotes: Reid states her sources were numerous interviews with those who personally knew Hilbert, and Hilbert's letters and papers.
* Edward Beltrami, What is Random? Chance and order in mathematics and life, Copernicus: Springer-Verlag, New York, 1999. Nice, gentle read for the mathematically-inclined non-specialist, puts tougher stuff at the end. Has a Turing-machine model in it. Discusses the Chaitin contributions.
* Ernest Nagel and James R. Newman, Godel’s Proof, New York University Press, 1958. Wonderful writing about a very difficult subject. For the mathematically-inclined non-specialist. Discusses Gentzen's proof on pages 96-9796–97 and footnotes. Appendices discuss the Peano Axioms briefly, gently introduce readers to formal logic.
* Taylor Booth, Sequential Machines and Automata Theory, Wiley, New York, 1967. Cf Chapter 9, Turing Machines. Difficult book, meant for electrical engineers and technical specialists. Discusses recursion, partial-recursion with reference to Turing Machines, halting problem. Has a Turing Machine model in it. References at end of Chapter 9 catch most of the older books (i.e. 1952 until 1967 including authors Martin Davis, F. C. Hennie, H. Hermes, S. C. Kleene, M. Minsky, T. Rado) and various technical papers. See note under Busy-Beaver Programs.
* Busy Beaver Programs are described in Scientific American, August 1984, also March 1985 p. &nbsp;23. A reference in Booth attributes them to Rado, T.(1962), On non-computable functions, Bell Systems Tech. J. 41. Booth also defines Rado's Busy Beaver Problem in problems 3, 4, 5, 6 of Chapter 9, p. &nbsp;396.
* David Bolter, Turing’s Man: Western Culture in the Computer Age, The University of North Carolina Press, Chapel Hill, 1984. For the general reader. May be dated. Has yet another (very simple) Turing Machine model in it.
* Stephen Kleene, Introduction to Metamathematics, North-Holland, 1952. Chapter XIII ("Computable Functions") includes a discussion of the unsolvability of the halting problem for Turing machines. In a departure from Turing's terminology of circle-free nonhalting machines, Kleene refers instead to machines that "stop", i.e. halt.