TE
테크에코
홈24시간 인기최신베스트질문쇼채용
GitHubTwitter
홈

테크에코

Next.js로 구축된 기술 뉴스 플랫폼으로 글로벌 기술 뉴스와 토론을 제공합니다.

GitHubTwitter

홈

홈최신베스트질문쇼채용

리소스

HackerNews API원본 HackerNewsNext.js

© 2025 테크에코. 모든 권리 보유.

What does “Undecidable” mean, anyway

155 포인트작성자: BerislavLopac6일 전

21 comments

mreid5일 전
This is a really nice explanation of decidability. One extra thing it might be worth mentioning is that there are many more <i>functions</i> `f : string -&gt; boolean` then there are programs that implement those functions.<p>When I first encountered this topic I had trouble intuitively understanding how there could not exist an `IS_HALTING` function when it is also just a function that takes in a string (representing a program plus its inputs) and outputs True or False depending on whether it halts or not.<p>The argument in the article does a great job of showing that `IS_HALTING` cannot exist because it is in some sense &quot;too powerful&quot; but that means there is a mapping f : strings -&gt; boolean that cannot be represented as a program, which seems weird if you&#x27;ve been programming for ages and every function you encounter is expressed as a program.<p>The result becomes less weird when you realize that that <i>almost all</i> functions from string -&gt; boolean are not expressible as a program. Why? Well there are countable many programs since there are only countably many finite length strings and every program, by definition, is a finite length string. However, there are uncountably many functions from string -&gt; boolean since these functions map one-to-one to sets of strings (just let the set be all inputs that map to True) and the cardinality of the set of sets of strings is uncountable.<p>This is essentially due to Cantor&#x27;s diagonalization argument which shows you cannot put all elements in a set X into a 1-1 correspondence with all the subsets of X, even when X is countably infinite. This fact is at the heart of a lot of these computability results since it shows there is a gap between all functions (= any arbitrary subset of finite strings) and a program (= a finite string).
评论 #44124774 未加载
评论 #44130765 未加载
评论 #44122588 未加载
cubefox6일 전
There are at least two meanings of &quot;undecidable&quot;. The one, from computer science, is discussed in the blog post. The other, from formal logic, is a synonym to &quot;independent&quot;. A proposition (not property) is independent of some axiomatic theory with respect to a proof system, if and only if the proposition can neither be proved nor disproved in that theory.<p>For example, the continuum hypothesis is independent of ZFC. Another way to express this is to say that the continuum hypothesis is undecidable (in ZFC).<p>Kurt Gödel used this sense of &quot;undecidable&quot; in his famous paper &quot;Über formal unentscheidbare Sätze der Principia Mathematica und verwandter Systeme I&quot;. (&quot;On formally undecidable propositions in Principia Mathematica and related systems I&quot;)<p>Are these two meanings of &quot;undecidable&quot; related in some way? I guess probably yes. But I&#x27;m not sure how.
评论 #44121516 未加载
评论 #44121559 未加载
ummonk5일 전
&quot;This to me is a strong &quot;intuitive&quot; argument for why the halting problem is undecidable: a halt detector can be trivially repurposed as a program optimizer &#x2F; theorem-prover &#x2F; bcrypt cracker &#x2F; chess engine. It&#x27;s too powerful, so we should expect it to be impossible.&quot;<p>I don&#x27;t buy this. Bcrypt cracking and solving chess is easy already if you don&#x27;t care about runtime complexity (both have rather trivial finite -- albeit exponential -- runtime algorithms), and it wouldn&#x27;t be any easier to transform them into halting problems.
评论 #44123031 未加载
Animats5일 전
Any deterministic system with a finite number of states is decidable, in the halting problem sense. Either it halts or repeats a state. The halting problem only applies for infinite memory.<p>Now, there are finite state systems where the halting problem is arbitrarily hard. But that&#x27;s not undecidability. That&#x27;s complexity. That&#x27;s a problem in the space where P=NP lives.<p>The article does not make this distinction, and it&#x27;s important.
评论 #44123778 未加载
评论 #44123687 未加载
评论 #44122956 未加载
评论 #44131765 未加载
taeric6일 전
I&#x27;m curious if you could make an analogy to the idea of &quot;underspecified&quot; in FreeCAD. It isn&#x27;t that the drawing doesn&#x27;t exist. It is that you still have some freedom in how long certain parts could be. Crucially, not all. It could be that parts of the drawing are indeed fully specified.<p>Same can go with programs. You can constrain parts of it enough that you can answer some pretty specific questions. And similar to how a drawing with fewer lines is easier to constrain, a program that has restricted constructs can be easier to constrain.
评论 #44121158 未加载
nialv76일 전
One of my favorite insights is that the existence of undecidable problems is the same thing as the uncountability of real numbers.<p>Too bad the author didn&#x27;t get into it.
评论 #44122054 未加载
评论 #44124143 未加载
godelski5일 전
I think it helps to understand my namesake&#x27;s Incompleteness Theorem[0]. They are actually connected [1,2]<p><pre><code> 1) no consistent system of axioms whose theorems can be listed by an effective procedure (i.e. an algorithm) is capable of proving all truths about the arithmetic of natural numbers. For any such consistent formal system, there will always be statements about natural numbers that are true, but that are unprovable within the system. 2) the system cannot demonstrate its own consistency. </code></pre> Any axiomatic system will have true statements that are unprovable. Which means basically any system of logic. If you&#x27;ve made an assumption you&#x27;ll end up with this. You&#x27;re always making assumptions, even if you don&#x27;t realize it. It&#x27;s usually a good idea to figure out what those are.<p>I hear a lot of people say &quot;from first principles&quot;. If you&#x27;re not starting from your axioms, you&#x27;re not starting from first principles. Think Carl Sagan making a pie from scratch.<p>[0] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;G%C3%B6del%27s_incompleteness_theorems" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;G%C3%B6del%27s_incompleteness_...</a><p>[1] <a href="https:&#x2F;&#x2F;scottaaronson.blog&#x2F;?p=710" rel="nofollow">https:&#x2F;&#x2F;scottaaronson.blog&#x2F;?p=710</a><p>[2] <a href="https:&#x2F;&#x2F;cstheory.stackexchange.com&#x2F;questions&#x2F;10635&#x2F;halting-problem-uncomputable-sets-common-mathematical-proof&#x2F;10636#10636" rel="nofollow">https:&#x2F;&#x2F;cstheory.stackexchange.com&#x2F;questions&#x2F;10635&#x2F;halting-p...</a>
评论 #44131875 未加载
skydhash6일 전
One of the biggest boost to my SWE career was studying theory of computation and programming languages theory. My major was electronic engineering, so I didn&#x27;t touch those at the university. But I use some books to at least grasp the introductory knowledge.<p>The boost was how easy it is to find the mechanism to some abstractions. And instead of being those amazing and complex tools that you have to use carefully, they&#x27;ve become easier to use and reason about. I would say very much like the study of forms, value, and perspectives for an artist, or music theory for a musician. It just makes everything easier. Especially the understanding about automata (regex), context-free grammar (programming language), and the Turing machine (CPU).
评论 #44121371 未加载
评论 #44122018 未加载
评论 #44120324 未加载
评论 #44121232 未加载
评论 #44121577 未加载
brap6일 전
I sometimes wonder if the concept of “intelligence” is going to benefit from a formal model the way “computation” benefited from Turing Machines.<p>Are there classes of intelligence? Are there things that some classes can and cannot do? Is it a spectrum? Is the set of classes countable? Is it finite? Is there a maximum intelligence? One can dream…
评论 #44120820 未加载
评论 #44120527 未加载
评论 #44121056 未加载
评论 #44122256 未加载
评论 #44121025 未加载
Tainnor4일 전
My pet peeves when it comes to undecidability:<p>1. People saying &quot;sure, problem A may be undecidable but it&#x27;s decidable for instance X&quot;. That&#x27;s not how the concept works - if you restrict the a problem to a specific instance (in the sense of having a decider for the intersection of A and {X}), then it will <i>always</i> be decidable because either the Turing Machine that always outputs true or the Turing Machine that always outputs false is a decider (it doesn&#x27;t matter that we don&#x27;t know which one). I know what people are trying to say - &quot;just because a problem is undecidable it doesn&#x27;t mean you can&#x27;t solve specific instances&quot; - but this is arguing against a <i>misconception</i> of what decidability means.<p>2. &quot;Decidability doesn&#x27;t matter because real-world computers have finite memory&quot;. Yeah, but if your solution to problem X involves running an algorithm until you&#x27;ve run through all possible 2^N configurations for N=the size of your memory, you haven&#x27;t really practically solved it either in any way that anyone would want to use.
graycat5일 전
&gt; What does “Undecidable” mean, anyway<p>A big and relatively recent example is to take (1) the axioms of Zermelo-Fraenkel set theory and (2) the axiom of choice and ask if (1) can be used to prove or disprove (2). The surprising answer is &quot;No&quot;, i.e., (1) cannot be used either to prove or disprove (2). So, can work with (1) and, whenever convenient, assume (2), continue on, and never encounter a problem.<p>So, given (1), (2) is <i>undecidable</i>.<p>The work was by Paul J. Cohen as at<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Paul_Cohen" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Paul_Cohen</a><p>The field of research about what is <i>undecidable</i> also goes back to Kurt Gödel as at<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Kurt_G%C3%B6del" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Kurt_G%C3%B6del</a><p>Another example, starting with (1), of an <i>undecidable</i> statement is the <i>continuum hypothesis</i>:<p><pre><code> There is no set whose cardinality is strictly between that of the integers and the real numbers. </code></pre> In simple terms, &quot;cardinality&quot; means that there is no set X that is too large to be put into 1-1 correspondence with the set of integers and too small to be put into 1-1 correspondence with the set of real numbers.
Aziell5일 전
The first time I encountered the halting problem, I was honestly confused. I kept thinking there had to be another solution. But over time, I came to realize it wasn’t a technical issue ,it was about the limits of computation itself. This article explains the concept of undecidability really well. It breaks things down in a very practical way. That last part, about the limits of how we think, really hit me.
theodorethomas5일 전
Can someone explain to me why although we&#x27;ve known that classical physics is not a correct description of the hardware of the universe for at least 100 years now, we are still hooked on 90-year-old Turing Machines which cannot physically exist (they violate quantum mechanics) and whose theoretical limitations are, consequently, irrelevant.
paulddraper6일 전
&gt; I often see the halting problem misconstrued as &quot;it&#x27;s impossible to tell if a program will halt before running it.&quot; This is wrong.<p>&gt; The halting problem says that we cannot create an algorithm that, when applied to an arbitrary program, tells us whether the program will halt or not.<p>Or more simply:<p>No program can tell whether any program will halt or not.
评论 #44120510 未加载
评论 #44120913 未加载
评论 #44121355 未加载
irthomasthomas5일 전
Ha, I bought <a href="https:&#x2F;&#x2F;undecidability.com" rel="nofollow">https:&#x2F;&#x2F;undecidability.com</a>, but haven&#x27;t decided what to do with yet, so for now it just redirects to my public bookmarks.
aatd866일 전
And here I thought it was simply about a system of equations solving down to a single solution (decidable).<p>As opposed to having too many free variables.
kazinator6일 전
An undecidable problem in the Turing computational model is this: it is a problem for which no algorithm exists which can ] decide <i>every input case</i>.<p>This doesn&#x27;t preclude <i>some</i> input cases from being decided.<p>What happens it that every attempt at making an algorithm for an undecidable problem will run into two issues: there will be input cases for which an answer exists, but for which the algorithm either gets into an infinite loop&#x2F;recursion or else produces the wrong answer.<p>Why would a decision procedure ever yield the wrong answer? That is due to mitigations of the infinite looping problem. To avoid becoming trapped by the input cases that trigger infinite calculations, the algorithm has to resort to some mechanism of arbitrarily stopping, without having reached the decision. Like for instance by capping the number of steps executed. But when that situation is reached, the correct answer is not yet known. The algorithm can return &quot;yes&quot; or &quot;no&quot;, but that will be wrong half the time. Or it can report &quot;failed&quot;, which is always incorrect, not matching either &quot;yes&quot; or &quot;no&quot;.<p>A classic example of an undecidable problem is the Halting Problem: the question of whether a given program (or algorithm) P, operating on an input I, will halt or not. So the space of inputs for this problem is &lt;P, I&gt; pairs.<p>The input space is infinite, but all instances in that space are finite: finite length programs P operating on finite inputs I.<p>The problem is that just we have a given finite P and finite I doesn&#x27;t mean that halting can be decided in finite steps.<p>No matter how cleverly someone constructs a halting decider, it is easy to produce test cases which will cause that decider to either stop and produce the answer (decide incorrectly) or else iterate or recurse forever. (Demonstrating how such test cases can be produced for any decider is at the heart of a popular proof which shows that halting is undecidable.)<p>The Halting Problem is at the center of decidability, because every decision procedure of any kind (not necessarily a decision in the Halting Problem) is a &lt;P, I&gt; pair. For instance the decision whether a list of N integers is sorted in ascending order is a &lt;P, I&gt; pair. P is an algorithm for sweeping through the integers to check that they are ordered, and I is some list of integers. Since it is a &lt;P, I&gt; pair, it is in the domain of the Halting Problem. P is not in the Halting Problem: P is in the domain of processing a list of integers. But &lt;P, I&gt; is an input case of the Halting Problem: does list-processing algorithm P halt on the list of integers I.<p>The upshot is that when we are solving some decision problem by running an algorithm, which is taking long, and we ask &quot;will this decision terminate, or is it in a loop?&quot; we are then posing another problem, and that problem is an input case of the Halting Problem.<p>And we know that the Halting Problem is undecidable.<p>What that means is that if we happen to be calculating a problem which is undecidable, the Halting Problem informs us that there is no guaranteed shortcut for us to know whether our calculation is hung, or whether it is working toward halting.<p>When we try to apply &quot;meta reasoning&quot; about an algorithm that appears stuck, our reasoning itself may also get stuck. We may have to give up, cut the investigation short, and report &quot;we don&#x27;t know&quot;. I.e. we don&#x27;t know whether or not our decision program is forever stuck or working toward the solution.<p>Undecidability is a somewhat important topic to a software engineer for the following reasons. In your career you may from time to time encounter requirements that call for a the calculation of an undecidable problem. If you know can recognize it, you can take action to revise the requirements. For instance, perhaps you can negotiate the requirements such that it&#x27;s acceptable for the decision to be incorrect, erring on one side of the other (false positive or false negative). Equivalently, maybe some inputs can be rejected before the algorithm, leaving a decidable subset. You may have a People Problem there because the requirements are coming from non-computer-scientists who don&#x27;t know about decidability; you have to be careful not to make it look like you are refusing to do hard work due to not believing in your skill, or laziness.<p>As an example, we could use the Halting Problem itself. Say you work on some virtual machine for sandboxing untrusted programs and your boss says, can we detect programs which loop infinitely, and not run them at all? Just reject them? If you know about undecidability, you can tell your boss, no, that is an undecidable problem! What we can do is limit the number of instructions or run time, which will stop some programs that are not looping infinitely but are just taking long to calculate something. Or here is another thing we can do instead; only admit programs written in a language that is not Turing Complete: has only bounded loops and no recursion. The sandbox compiler can reject all others. Or we can allow recursion but stacked recursion only (not tail) and limit the depth. Of course, that&#x27;s just an easy example; undecidability can sneak into the requirements in forms that are not immediately recognizable.
评论 #44120734 未加载
评论 #44120699 未加载
gnulinux6일 전
The reason decidability makes no or very little sense to tons of CS or Math majors is because the logical basis of decidability is almost never explained in school. Even if you&#x27;re in a logic&#x2F;computability class you likely won&#x27;t get a very concrete explanation, unless you&#x27;re in a Philosophy of Math class.<p>The problem that&#x27;s usually not told to kids is that decidability has different sort of implications to classical mathematics and constructive mathematics. Since most undergrad programs only teach mainstream math (i.e. classical) and don&#x27;t even mention constructive logic, decidability becomes a black magic situation for some confused students.<p>Here&#x27;s the crucial part: decidability really only has material impact on our reasoning if we&#x27;re in some kind of constructive setting. Undecidability does not and cannot have <i>any</i> impact on the results of classical mathematics, period, but it does have effect on the proofs of those classical theorems. It can also have impact on classical mathematics if we&#x27;re reasoning classically but describing results in constructive settings (e.g. this is what happens when we do computability theory in classical mathematics).<p>In short, classically we&#x27;re always allowed to work around undecidability by using an &quot;oracle&quot;. But it can be important to state that we can only do it this way (similar to how we can state the need to use the axiom of choice).<p>One way to re-phrase Aristotle&#x27;s law of excluded middle (forall P, P or not P) is to say: &quot;every relation is decidable&quot; which is how you would postulate it in homotopy type theory: <a href="https:&#x2F;&#x2F;agda.github.io&#x2F;agda-stdlib&#x2F;master&#x2F;Axiom.ExcludedMiddle.html" rel="nofollow">https:&#x2F;&#x2F;agda.github.io&#x2F;agda-stdlib&#x2F;master&#x2F;Axiom.ExcludedMidd...</a><p>This doesn&#x27;t mean in classical mathematics every relation &quot;literally&quot; is decidable. Classical mathematics can still study constructive settings by creating a computational model (e.g. Turing Machine model). But it does mean that in classical mathematics every relation effectively is indistinguishable from decidable relations since given a statement like &quot;Program P will halt&quot; you are always allowed to say &quot;either (program P will halt) or (program P won&#x27;t halt)&quot; regardless of our impossibility to prove one of the cases in general.<p>Also note that we call this kind of constructive reasoning &quot;neutral constructive mathematics&quot; which is when we operate in a constructive reasoning setting (like Agda&#x27;s type theory above) but allow ourselves to say things like &quot;AxiomOfChoice implies ExcludedMiddle&quot; etc, read: <a href="https:&#x2F;&#x2F;ncatlab.org&#x2F;nlab&#x2F;show&#x2F;neutral+constructive+mathematics" rel="nofollow">https:&#x2F;&#x2F;ncatlab.org&#x2F;nlab&#x2F;show&#x2F;neutral+constructive+mathemati...</a>
评论 #44126496 未加载
gerdesj5일 전
I&#x27;m not sure
johnea6일 전
I don&#x27;t know, I can&#x27;t decide...
评论 #44121001 未加载
dunkeltaenzer6일 전
The problem there is overlap between fractal and non-fractal spaces. Our Math and Logic were created to work in non-fractal spaces. Whenever we cross the boundaries into fractal spaces (recursion in programming, for example), our math and logic have a tendency to explode, because there are infinities flying around everywhere and things stop to be guaranteed to be deterministic, because you have to assure determinability for several dimensions of infinities. You have to accept certain quantum rules, in those spaces. And being deterministic isn&#x27;t compatible with quantum rules. That&#x27;s why quantum physics is struggling so badly to get rid of all those infinities flowing in with every new dimension they add to the wave function. That thing wasn&#x27;t designed for fractal spaces. So it becomes harder and harder to contain all those leaking infinities into a workable magic ball. We stored most of our fractal remembrance in pictures for a reason. Much easier to draw fractals than to compute them with math, not made for fractal spaces