{"id":4048,"date":"2024-09-21T12:17:34","date_gmt":"2024-09-21T12:17:34","guid":{"rendered":"https:\/\/workhouse.sweetdishy.com\/?p=4048"},"modified":"2024-09-21T12:17:34","modified_gmt":"2024-09-21T12:17:34","slug":"computability-and-models-for-computation","status":"publish","type":"post","link":"https:\/\/workhouse.sweetdishy.com\/index.php\/2024\/09\/21\/computability-and-models-for-computation\/","title":{"rendered":"Computability and Models for Computation"},"content":{"rendered":"\n<p>For a long time historically, computation was a matter of actually solving,<\/p>\n\n\n\n<p>or \ufb01nding algorithms to solve, various mathematical problems using mechan-<\/p>\n\n\n\n<p>ical or other algorithms. It was only in the early twentieth century that the<\/p>\n\n\n\n<p>process of computation was modelled in mathematical terms, largely in the<\/p>\n\n\n\n<p>works of Alan Turing, Alonso Church, Kurt G\u00a8odel, and Emil Post. Their e\ufb00orts<\/p>\n\n\n\n<p>were directed at extracting the basic properties of a computational process,<\/p>\n\n\n\n<p>independent of the platform on which it was executed.<\/p>\n\n\n\n<p>The \ufb01rst question regarding computation that a theoretician asks is<\/p>\n\n\n\n<p>whether or not the given problem is computable. What exactly does this mean?<\/p>\n\n\n\n<p>If the problem is somehow reduced to the calculation of a function, then is this<\/p>\n\n\n\n<p>function computable? In order to meaningfully answer this question without<\/p>\n\n\n\n<p>having to examine all possible algorithms designed to compute the function,<\/p>\n\n\n\n<p>the famous mathematician Alan Turing came up with a theoretical model<\/p>\n\n\n\n<p>computer known as the Turing Machine, which is a simpli\ufb01cation of your<\/p>\n\n\n\n<p>desktop computer to the bare bones.<\/p>\n\n\n\n<p>101<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9781482238129\/files\/bg7f.png\" width=\"669\" height=\"306\"><\/p>\n\n\n\n<p>102 Introduction to Quantum Physics and Information Processing<\/p>\n\n\n\n<p>6.1.1 Turing machine<\/p>\n\n\n\n<p>Turing\u2019s abstract computing machine captures the concept of an algorithm<\/p>\n\n\n\n<p>to evaluate a function. It can be thought of as a mechanical analogue of an<\/p>\n\n\n\n<p>algorithm broken down to its bare bones. Now an algorithm basically takes<\/p>\n\n\n\n<p>an input in some symbolic form, performs basic manipulations in steps that<\/p>\n\n\n\n<p>may even be recursive and \ufb01nally \ufb01nishes up with an output. In the paradigm<\/p>\n\n\n\n<p>of a computing machine, the machine has a means of accepting and reading<\/p>\n\n\n\n<p>an input, a set of instructions on what basic steps to perform, which may<\/p>\n\n\n\n<p>depend on the output at a previous step. The machine must therefore be able<\/p>\n\n\n\n<p>to move back and forth over previous steps and write out the answer at<\/p>\n\n\n\n<p>each step, and halt when the process is over. This mechanism of comparing<\/p>\n\n\n\n<p>outputs to conditions in the program can be achieved easily by attributing an<\/p>\n\n\n\n<p>internal state to the machine.<\/p>\n\n\n\n<p>FIGURE 6.1: A schematic of a Turing machine.<\/p>\n\n\n\n<p>Turing modelled this process in an abstract machine (TM), schematically<\/p>\n\n\n\n<p>shown in Figure 6.1, consisting of the following.<\/p>\n\n\n\n<p>1. A tape which is a string of cells that can contain one of a \ufb01nite set of<\/p>\n\n\n\n<p>symbols, \u0393 = {S<\/p>\n\n\n\n<p>i<\/p>\n\n\n\n<p>}, which could, for example, be binary 0 and 1, a blank<\/p>\n\n\n\n<p>(<\/p>\n\n\n\n<p>\ue001<\/p>\n\n\n\n<p>0) and a special symbol B, for the left edge of the tape.<\/p>\n\n\n\n<p>2. A read\/write head that can take input from or write output to a cell<\/p>\n\n\n\n<p>at a time when fed into the machine.<\/p>\n\n\n\n<p>3. A register that stores the internal state of the machine, which could<\/p>\n\n\n\n<p>be one of a \ufb01nite set of states {q<\/p>\n\n\n\n<p>i<\/p>\n\n\n\n<p>}. There are two special states, S, the<\/p>\n\n\n\n<p>starting state and H, the halting state.<\/p>\n\n\n\n<p>4. A table of instructions (like a program) that make the head execute<\/p>\n\n\n\n<p>a Left move, a Right move, and a Print, depending on the symbol<\/p>\n\n\n\n<p>currently read by the head. This is like a function f(q, x) = hq<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>, x<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>, mi<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9781482238129\/files\/bg80.png\" width=\"685\" height=\"648\"><\/p>\n\n\n\n<p>Computation Models and Computational Complexity 103<\/p>\n\n\n\n<p>where q is the current state of the machine, x is the current symbol read,<\/p>\n\n\n\n<p>q<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>is the new state after execution of the step, x<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>is the symbol written<\/p>\n\n\n\n<p>on to the tape, and m is a move L, R, or 0.<\/p>\n\n\n\n<p>Example 6.1.1. To see how a TM might work, consider one with binary<\/p>\n\n\n\n<p>symbols, \u0393 = {0, 1,<\/p>\n\n\n\n<p>\ue001<\/p>\n\n\n\n<p>0, B} and internal states Q = {S, q<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>, q<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>, q<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>, H}. Let the<\/p>\n\n\n\n<p>table (program) be as follows:<\/p>\n\n\n\n<p>H<\/p>\n\n\n\n<p>H<\/p>\n\n\n\n<p>H<\/p>\n\n\n\n<p>H<\/p>\n\n\n\n<p>H<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>q<\/p>\n\n\n\n<p>i<\/p>\n\n\n\n<p>B 0 1<\/p>\n\n\n\n<p>\ue001<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>S hq<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>, B, Ri<\/p>\n\n\n\n<p>q<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>hq<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>, 0, Ri hq<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>, 1, Ri, hq<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>,<\/p>\n\n\n\n<p>\ue001<\/p>\n\n\n\n<p>0, Li<\/p>\n\n\n\n<p>q<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>hq<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>,<\/p>\n\n\n\n<p>\ue001<\/p>\n\n\n\n<p>0, Li, hq<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>,<\/p>\n\n\n\n<p>\ue001<\/p>\n\n\n\n<p>0, Li<\/p>\n\n\n\n<p>q<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>hH, B, 0i hq<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>, 0, Li, hq<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>, 1, Li hH,<\/p>\n\n\n\n<p>\ue001<\/p>\n\n\n\n<p>0, Li<\/p>\n\n\n\n<p>Can you see what this machine achieves? Take for example an input string<\/p>\n\n\n\n<p>110 on the tape followed by blanks. The tape would look like<\/p>\n\n\n\n<p>B 1 1 0<\/p>\n\n\n\n<p>\ue001<\/p>\n\n\n\n<p>0 . . .<\/p>\n\n\n\n<p>The sequence of states followed by the machine are:<\/p>\n\n\n\n<p>hS, Bi \u2192 hq<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>, Bi<\/p>\n\n\n\n<p>R<\/p>\n\n\n\n<p>\u2212\u2192 hq<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>, 1i<\/p>\n\n\n\n<p>R<\/p>\n\n\n\n<p>\u2212\u2192 hq<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>, 1i<\/p>\n\n\n\n<p>R<\/p>\n\n\n\n<p>\u2212\u2192 hq<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>, 0i<\/p>\n\n\n\n<p>R<\/p>\n\n\n\n<p>\u2212\u2192 hq<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>,<\/p>\n\n\n\n<p>\ue001<\/p>\n\n\n\n<p>0i<\/p>\n\n\n\n<p>R<\/p>\n\n\n\n<p>\u2212\u2192 hq<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>,<\/p>\n\n\n\n<p>\ue001<\/p>\n\n\n\n<p>0i<\/p>\n\n\n\n<p>L<\/p>\n\n\n\n<p>\u2212\u2192 hq<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>, 1i<\/p>\n\n\n\n<p>L<\/p>\n\n\n\n<p>\u2212\u2192 hq<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>Bi \u2192 hH, Bi.<\/p>\n\n\n\n<p>The tape now looks like<\/p>\n\n\n\n<p>B 1 1<\/p>\n\n\n\n<p>\ue001<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>\ue001<\/p>\n\n\n\n<p>0 . . .<\/p>\n\n\n\n<p>You can see that this machine erases the last symbol on the tape. Try it<\/p>\n\n\n\n<p>out on a di\ufb00erent input.<\/p>\n\n\n\n<p>Exercise 6.1. Try to construct the table of instructions for a TM that adds 1 to<\/p>\n\n\n\n<p>the entry on the tape.<\/p>\n\n\n\n<p>Every TM is speci\ufb01ed by its own set of symbols \u0393, set of internal states<\/p>\n\n\n\n<p>Q, and program. So there exists a speci\ufb01c Turing machine for every speci\ufb01c<\/p>\n\n\n\n<p>algorithm. However, the machine may be made programmable according to<\/p>\n\n\n\n<p>di\ufb00erent algorithms, if the program is also fed in as part of the input. Thus a<\/p>\n\n\n\n<p>programmable Turing machine can simulate any other Turing machine: this<\/p>\n\n\n\n<p>is the universal Turing machine (UTM).<\/p>\n\n\n\n<p>In his work, strengthened by the work of Alonso Church, who was simulta-<\/p>\n\n\n\n<p>neously working on Hilbert\u2019s famous computability problem, Turing was able<\/p>\n\n\n\n<p>to prove the thesis that any algorithm could be simulated by a UTM. Church\u2019s<\/p>\n\n\n\n<p>work strengthened this to the Church\u2013Turing thesis:<\/p>\n\n\n\n<p>104 Introduction to Quantum Physics and Information Processing<\/p>\n\n\n\n<p>Theorem 6.1. Any function that can be computed by an algorithm can be<\/p>\n\n\n\n<p>e\ufb03ciently simulated by the Universal Turing Machine.<\/p>\n\n\n\n<p>Turing was then able to formulate the problem of computability in terms<\/p>\n\n\n\n<p>of whether or not such a universal machine would halt, i.e., \ufb01nd a solution. So<\/p>\n\n\n\n<p>problems on which this machine halted would then be called computable.<\/p>\n\n\n\n<p>Interestingly enough, the famous halting problem, viz. whether or not a<\/p>\n\n\n\n<p>particular algorithm on a Turing machine will halt, is itself uncomputable!<\/p>\n\n\n\n<p>The question then begged to be asked as to whether a given problem that<\/p>\n\n\n\n<p>is not computable by a UTM can be made so by a di\ufb00erent paradigm of com-<\/p>\n\n\n\n<p>putation. This led to extensions of the Turing machine concept to probabilistic<\/p>\n\n\n\n<p>Turing machines where the algorithms made use of fuzzy logic.<\/p>\n\n\n\n<p>6.1.2 Probabilistic Turing Machine<\/p>\n\n\n\n<p>One of the major challenges to the Church\u2013Turing thesis came from al-<\/p>\n\n\n\n<p>gorithms that were probabilistic, that is, could solve problems e\ufb03ciently but<\/p>\n\n\n\n<p>with a certain (bounded) probability of failure. These problems, for instance<\/p>\n\n\n\n<p>the Solovay\u2013Strassen primality test (1977) cannot be e\ufb03ciently solved on the<\/p>\n\n\n\n<p>deterministic Turing machine described above.<\/p>\n\n\n\n<p>Computer scientists therefore extended the validity of the Church\u2013Turing<\/p>\n\n\n\n<p>thesis to probabilistic algorithms by designing a probabilistic Universal Turing<\/p>\n\n\n\n<p>Machine.<\/p>\n\n\n\n<p>A probabilistic or randomized Turing machine is one in which randomness<\/p>\n\n\n\n<p>is built into each step which chooses possible options according to a probability<\/p>\n\n\n\n<p>distribution. Such a machine therefore would need to have an additional tape:<\/p>\n\n\n\n<p>the random tape, containing a string of random numbers to decide the options<\/p>\n\n\n\n<p>at each step. Without going into details, we will state that a probabilistic<\/p>\n\n\n\n<p>universal Turing machine (PTM) can replace the earlier deterministic one<\/p>\n\n\n\n<p>to save the Church\u2013Turing Thesis in its stronger form.<\/p>\n\n\n\n<p>There is a plethora of randomized complexity classes that can be de\ufb01ned<\/p>\n\n\n\n<p>for randomized algorithms that we will not go into, but this extends the class<\/p>\n\n\n\n<p>of e\ufb03ciently solvable problems.<\/p>\n\n\n\n<p>6.1.3 Quantum Turing Machine<\/p>\n\n\n\n<p>The challenge to this model of computation came with trying to simulate<\/p>\n\n\n\n<p>quantum mechanical systems on a PTM; this was still unsolvable. The natural<\/p>\n\n\n\n<p>question to ask was whether or not it was possible to generalize to a quantum<\/p>\n\n\n\n<p>Turing machine (QTM) that would further expand the class of solvable<\/p>\n\n\n\n<p>problems. This was done by David Deutsch in 1985 though thought of earlier<\/p>\n\n\n\n<p>by Benio\ufb00 and Bennett.<\/p>\n\n\n\n<p>The most important idea behind this machine, which is also probabilistic,<\/p>\n\n\n\n<p>is that it is reversible, in the same way as quantum time evolution is reversible.<\/p>\n\n\n\n<p>The idea behind discussing Turing models is to see if the class of problems<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9781482238129\/files\/bg82.png\" width=\"671\" height=\"456\"><\/p>\n\n\n\n<p>Computation Models and Computational Complexity 105<\/p>\n\n\n\n<p>that are hard to solve can be made smaller. As it turned out, while QTMs<\/p>\n\n\n\n<p>cannot reduce the class of unsolvable problems, they do reduce that of hard<\/p>\n\n\n\n<p>problems.<\/p>\n\n\n\n<p>The Turing model is the most mathematically abstract model for compu-<\/p>\n\n\n\n<p>tation, and is widely used to establish computability and upper bounds on<\/p>\n\n\n\n<p>the e\ufb03ciency of a given algorithm. There are several other models involving<\/p>\n\n\n\n<p>for example, decision trees, cellular automata, or logical calculus. The most<\/p>\n\n\n\n<p>practical approach is called the circuit model where elementary logic opera-<\/p>\n\n\n\n<p>tions are used as building blocks to evaluate the function. It was shown that<\/p>\n\n\n\n<p>the circuit model was equivalent to the Turing model, so that there is no loss<\/p>\n\n\n\n<p>in generality in concentrating on this, as we will in most of this book<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For a long time historically, computation was a matter of actually solving, or \ufb01nding algorithms to solve, various mathematical problems using mechan- ical or other algorithms. It was only in the early twentieth century that the process of computation was modelled in mathematical terms, largely in the works of Alan Turing, Alonso Church, Kurt G\u00a8odel, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4040,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[495],"tags":[],"class_list":["post-4048","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-computation-models-and-computational-complexity"],"jetpack_featured_media_url":"https:\/\/workhouse.sweetdishy.com\/wp-content\/uploads\/2024\/09\/download-1.png","_links":{"self":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4048","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/comments?post=4048"}],"version-history":[{"count":1,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4048\/revisions"}],"predecessor-version":[{"id":4049,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4048\/revisions\/4049"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media\/4040"}],"wp:attachment":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media?parent=4048"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/categories?post=4048"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/tags?post=4048"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}