Trial Mechanism

xiaoxiao2021-03-19  199

Trial Mechanism

Liu Weipeng / article

C Template is a full of Turing-Complete, or more specifically, it is Turning-Equivalent, there is no suspense in this, just a few a few friends asked why C Template is complete, in order to find the original connection, so I went to search for Wiki and Standford Encyclopaedia. Who brought a lot of content in this search, so I spent several times. The relevant theory of Ling Machine reviewed it once. By the way, it took a look at Alan Turing in the forty-five degree angle. The magical thing was to turn over the Trustive Mathematics and an east of Intuitionistic Logic in the pursuit of links and search. East, that is, it is, it is not mentioned. Let's talk about C Template and Tuwork.

The map spirit is a theoretical device that Tuling is in order to study the calculated problem. You can probably know if you want to have a limited state machine, you can know what the map spirit is a concept. (I.e., you can be any long, "dive endless" is the speech of the ancient wax. The definition of the map spirit is like an old-fashioned electrical passer: a read-write head, a paper strip (possibly any long), read the writing head constantly read the symbol on the paper strip, and according to the inherent state conversion rules Convert the current state, do some actions, such as interrupted or overwriting the current characters, moving forward / back, moving the writing head or keeps moving. As for its abstract definition, it is the definition of a limited state machine. This definition of the map foreground now seems to be very obvious, but at the time, it represents a thoughtful revolution, a kind of nothing. The map spirit is essentially abstract the core laws of our malain for mechanical calculations, so it is equivalent to the "one person paper pen certain rules" for mechanical operation. This first theory machine first indicates the possibility of creating a computer, but this is not enough. If you create a specific map spirit, it is too low if you have a certain problem. One of the most beautiful conclusions in the theory of the map is to exist "Universal Turing-Machine, direct translation for general map forever / universal map spirit, however" Yuan Tu Ling Machine "is more accurately expressing it), so-called chart Lingling machine is actually a map of the map spirit as an operation object. It is assumed that there is a metamorphic M, a diagram spirit P, and P, then feed (p, d) feed the yuan M, M can spit out P (d) (ie the result on P on D). This is the model of the computer we use, where M is better than our computer (Yuan Tu Ling), P is the program (encoded Matline ), D. The existence of the program P. The existence of the Yuan Tuger indicates that we can use a machine to solve all Turing-computable issues - as long as you add this specific problem Lingling machine encoding (program) and the input data of the problem, the Yuan Tuition will simulate the behavior of the chart crane P we feed it, and finally give the result. The existence of the Yuan Tulend machine is ignited by the birth of the computer. Ming lights, this is the most beautiful discovery in the theory of the map.

There are two famous Halt Problem and Busy Beaver Problem, but no latter is interesting, so you can google. These two problems illustrate that the map spirit is not "universal", it can only solve the problem that "mechanically" solve problems, but this "mechanically" definition is too vague, not accurately defined, so it is necessary to accurately define What issues can be solved by the map forever, in other words, what is the problem is that the map is calculated. Here is a very beautiful proof, what is the number of map spirits, saying that there is an endless implementation of a map spirit. First, the next number is that the map spirit can calculate what concept, one is that the map spirit can be calculated to say that there is a map spirit, give it an empty tape, and finally it can print an alternative approach. The roots like pi, natural constant e, and all polynomials are also map spirit could be calculated (can be arbitrarily approached by the mechanical steps), which is very understanding, because we can write a program to iterate any approach to them, such as e is an infinite level Number of sum. But there is other implementation? Is there a real number of Tulex unclear? If you want to understand this problem, you should consider how many maps (nonsense, of course, have multiple, but "infinite" also has a level question :)), to make a map spirit first, due to the picture The status of the Lingling machine is limited, encoding the map spirit into a five-tuple (5-tuple) (OLD_STATE, SYMBOL, NEW_STATE, NEW_SYMBOL, MOVE) sequence (or more / less), this is a relatively common A coding method, but in summate is n-tuple, n limited), then we consider a N-State (N state), how many possibilities may be in M-Symbol, for this, first consider corresponding N --State, M-SYMBOL 5-TUPLE (see the above definition), according to a simple arrangement, a total of N * m * n * m * 3 (the last 3 is the possibility of Move - Static / forward / rearward), in other words, that is, a UPPER-Bounded Function with M, N as the parameter. OK, now consider the form of a chart, a map spirit is actually constructed from a set of 5-tuple, so since N-State, M-Symbol's 5-tuple has N * m * n * m * 3 One, in other words, there is a total of N * m * n * m * 3 elements in the collection composed of all possible 5-tuples, then the number of all subsets of this collection is N-State, M -Symbol's number of maps, depending on the definition of the power set, this is 2N * m * n * m * 3. Here, in order to simply, we have a number of M0, namely Symbol, such that all M0-State's diagram spirit is: 21 * m0 * 1 * m0 * 3 22 * ​​m0 * 2 * m0 * 3 23 * m0 * 3 * m0 * 3 ... = σ2i * m0 * i * m0 * 3. Now we see that every item of this and type is COUTABLE, and Z × Z is still collectible, don't say that every item is limited, so it is easy to build a single shot with Z (Injective), in other words, the collection of all M0-State's map foreground is a collections.

Ok, now put M0 into variables, since all M0-State's map foreground collection is available, M0 is also a natural number (column set), plus "collections of columns" still It is possible to collect this nature, it is easy to draw a collection of all figure spirit. So, what is important about this conclusion? It is very important, we know, the real set is not possible, its geope (or "base") is Alav 1 (and Z, ie the scale of integer set is Alav 0), so even if all the pictures Lingling machine still still has the real number of "columns". To prove that this is also very simple, just use Cantor to use the classic "diagonal" technique used by Cantor to use the classic "diagonal" technique, you may be simply description: First, since all the collection machines collection is a column set, we can Use M0, M1, M2, ... to represent them. Now, it is assumed that the real number calculated is ai0.ai1ai2ai3 .... Then we construct a new real number b = b0.b1b2b3 ... so that it satisfies B1 ≠ A11, B2 ≠ A22, B3 ≠ A33, ..., BN ≠ Ann. One real number B thus constructed can be guaranteed to be equal to any AI, and this B is not calculated for any map (because all the AI ​​sequences have been exhausted all of the charters). That extent, it shows that the momentum of the map spirit is Alav 0 (although the map spirit is not called "potential").

In addition, all functions of the function space are not all graphic, and a function can be calculated for the map spirit. This conclusion is very well explained through the proven of just now: because the potential of the function space is Alex 2, it is more than the fact set, how can it be enumerated by the map spirit? It is also very simple to prove, and the diagonal method is not said.

So, since we have already sure some functions are unable to say, in other words, some functions you know that it is a function, but you are unable to use the map spirit to simulate it, in today's words, it is impossible Programming! This is more frustrating, actually has a function that cannot be programmed. So can you make such a function to make people 瞧 怎么 瞧 不 不 编 法 法? This is the so-called Busy Beaver problem. The busy beaver problem is to construct such a function, which is used to calculate the maximum "product" "of any N-State. The definition of productivity is to give a chart, an empty paper strip, and finally when the figure is the opportunity HALT When the number of 1 sheets on the tape is its productivity. The maximum productivity of all N-State's map foreground refers to the largest of the productivity of the map of the N state. Obviously, this is a function of n. Remember to L (n). Then the problem is, is this L (N) whether it is Tulex calculated? The answer is not! With the anti-skiller: assuming that there is such a diagram spirit B, it is possible to imitate the behavior of L (N), then we receive a special N-State of the diagram Line I (i's role is left on the paper tape) 1. As the input of B, it can be proved that such I is present), which forms a new map of the chart, this new map spirit is to calculate L (n), where n is the status number of I, is also I output, the input of B. We will then connect to a b in the back, get the IBB such a diagram, its effect is L (L (n)). Then consider the status number of IBB itself, the status number of the status (ie N) 2 times B, assuming that the status of B (b is limited), then the number of IBB is N 2B. The maximum productivity of the map foreground that can be imagined to know the N 2B state is certain to be greater than or equal to L (L (n)), because there is already a map spirit, which already has a T2B's productivity is L (L (n)), it is IBB . This inequality is L (n 2b)> = L (L (n)), where we can introduce N 2B> = L (n) (L (i)> = L (j) => i> = j This conclusion is easy to confirm), according to any N of N, we can equal it to N 11, so N 11 2B> = L (n 11), and we know that 11 status can realize a paper Such a chart, one of the numbers (try to see :) It is very simple), so L (n 11)> = 2n (as long as the previous N status is used for a map of the N 1 The latter 11 states can be doubled by a diagram of a number of times of the number of doubles), and then N 11 2B> = 2n is obtained, so 11 2b> = n is obtained. According to the anyty of N, B is limited, this has been contradictory! (In fact, it also implies another layer, that is, to achieve such a map spirit, there must be an endless state, that is, B is to be arrested, but according to the definition of the map, B is limited).

Church-Turing Thesis is not to say that in all functions of natural numbers to define domains, only those recursive functions (here the recursive function also include functions of finite steps) is the graphic can be calculated. This conclusion defines the computing power of the map. It is very important. In fact, I think it is also very intuitive, and an endless function naturally requires a number of states to calculate. And a status of a chart is limited. In this limited space transfer, it will eventually fall into the loop. This seems to be two integers, either except, either infinite loop decimal, use pigeons. Principle can be easy Prove. To simply talk about C Template, Turing-Complete, more accurately Turing-Equivalent, because Turing-Complete generally refers to a problem is Turing-computable). To prove that the characteristics of a language is in principle, it is necessary to prove that it can solve all the problems that the map is calculated. Or construct a conversion path, which can convert any graphic calculated solution to the program of this language. But there is still a more suitably in this language to implement a universal Turing Machine in this language (in fact, it is a limited state machine). C template can do this, in fact, this has already been done. In addition, generally, as long as there is an IF judgment, recursive or looping structure, and the most basic assignment capabilities and four operations are Tulex, and C Template happens to have these all, where IF judgment and recursive structure are templates. Dialectability, the designer of the estimated language did not expect this to bring such a big impact on modern C :)

In addition, strictly, any computer today is not Turing-Equivalent, because their memory is poor. The memory of the map foreground is dive. Just just the same situation, no memory is not exhausted :)

The constructure mathematics and intuitive logic mentioned earlier are not the content of the map spirit, and write it again.

转载请注明原文地址:https://www.9cbs.com/read-130146.html

New Post(0)