Sunday, November 6, 2011

Topic 6: Turing thesis. Communication recursive functions with Turing machines

Topic 6: Turing thesis. Communication recursive functions with Turing machines

    A. Turing proposed a hypothesis that is formulated as follows: grades calculated and calculated by Turing functions coincide. Bring Turing thesis as the thesis of Church, it is impossible because the very notion of an algorithm (or an effective procedure) is inaccurate. This is not a theorem and postulate a mathematical theory, and a statement that links the theory of those objects for the description of which it was created. According to its value Turing thesis resembles the hypothesis of Physics adequacy of mathematical models of physical phenomena and processes. Proof of Turing thesis is a mathematical practice and the fact that the description of the algorithm in terms of any other known algorithmic models can be reduced to its description as a Turing machine (TM).



    Turing thesis allows, on the one hand, to replace the inaccurate assertions about the existence of effective procedures (algorithms) accurate statements about the existence of T M , on the other - allegations of non-existence TM interpreted as allegations of non-existence of algorithms in general. But we should understand Turing thesis in the sense that the whole theory of algorithms can be reduced to the theory of Turing machines. For example, in complexity theory of algorithms (which is now rapidly developing and considering the relative complexity of algorithms for memory, the number of actions) results are correct within an algorithmic model may be incorrect in another model.


    Church thesis (any function, calculated by some algorithm, is partially-recursive) has historically been formulated before Turing thesis. From the comparison of these two abstracts follows this statement: function calculated TM if and only if it is partially recursive. This statement about the equivalence of the two algorithmic models (as opposed to abstract) is a precise mathematical statement and requires proof.


    Theorem:
Any partial-recursive function is calculated on the TM .
Plan of proof of the theorem, first proved that the simplest functions that make up the complete system is calculated, and that operators of superposition, primitive recursion and minimization of retaining the ability to resolution of.



    You can also prove contrary.

    Theorem:

Any function, calculated on the   TM is partially recursive.

Friday, October 28, 2011

Topic 5: Part-recursive functions

Topic 5: Part-recursive functions

    Recursive functions - historically the first formalization of the concept of algorithm. In the theory of recursive functions adopted a constructive approach, whose main feature is that the set of objects that are studied, based on a finite number of elementary objects with simple operations, effective feasibility are fairly obvious. Operations on functions called operators.
     The function f(x1, x2, … , xn)  is called partially numerical n-seater function if its domain of definition and the region is a subset of its values  Nn If the domain of the function Nn ,   then the function f is everywhere defined. Calculated called numerical function f(x1, x2, … , xn) , whose value can be calculated by some algorithm based on the known values of the argument. Simplest is called such everywhere defined functions including:
O (x) = 0 (zero function), S (x) = x +1 (the continuity of the function)
Inm (x1, x2, … , xn) = xm , where m = 1, 2, ... , n
(projection function, selective function or feature selection).
Operator superposition
Snm called substitution function in m variables f(x1, x2, … , xm) m functions f1(x1, x2, … , xn), ... , fm(x1, x2, … , xn) n the same variables. It sets a new function n variables.
They say that the operator of primitive recursion Rn defines the (n +1)-triple function f(x1, x2, … , xn, y) through n-seater function   j(x1, x2, … , xn) and (n +2) - double function  w(x1, x2, … , xn, y, z) so (according to primitive recursion): f(x1, x2, … , xn, 0) = j(x1, x2, … , xn);
f(x1, x2, … , xn, y+1) = w(x1, x2, … , xn, y, f(x1, x2, … , xn, y)).
Then say f(x1, x2, … , xn, y) = Rn (j, w).
    The function is called primitive recursive if it can be formed from the elementary functions using a finite number of applications of superposition operators and primitive recursion.
     Consider the calculated n-bed partially numerical function f(x1, x2, … , xn) . Record a certain value x1, x2, … , xn-1 of its first (n-1) arguments and consider the equation f(x1, x2, … , xn-1, y) = xn . Than solve consistently value f(x1, x2, … , xn-1, y) for y = 0, 1, 2, .... Least a, for which f(x1, x2, … , xn-1, а) = xn, denoted as follows:
qy (f(x1, x2, … , xn-1, а) = xn).
    The obtained expression defines a partial function variables x1, x2, … , xn, which determines the operator to minimize (q-operator). Often the operator to minimize consider uncertain.
    The function f(x1, x2, … , xn) is called partial-recursive if it can be formed from the elementary functions using a finite number of applications of operators of superposition, primitive recursion and minimization. Everywhere defined partially recursive function call general recursive.
     You can easily install all recursivetion primitive logic functions: on the functional completeness of this set of functions and that the superposition of a primitive recursive operator.
     Consider the set A, which is a subset of N. Characteristic function of set A are called cA function cA (x), which equals 1 if x is A and 0 otherwise. The set A is called primitive recursive if its characteristic function - primitive recursive.
     Part-characteristic function cЧА set A called function cЧА (x), which equals 1 if x is A and is undefined otherwise. The set A is called partial-recursive if its characteristic function partially - partially-recursive. Obviously, the characteristic and partially characteristic functions coincide only for the set of natural numbers N. One can prove that every primitive recursive set is partially recursive.
     Theorem:
Let f (x) - primitive-recursive function, and A - some primitive recursive set. Then the partial function defined by the scheme: fx(x) = f (x), if x is A and is uncertain if x Is not is partially recursive.
     Theorem allows the construction of numerous examples of partially-recursive functions. General notion of partial-recursive functions - one of the main concepts of the theory of algorithms. On the one hand, each part of the standard set-recursive function is calculated for a specific procedure that meets the intuitive idea of the algorithm, on the other - that would still not built precisely defined classes of algorithms, always find out that the number of features that are calculated by the algorithms these classes were partially recursive. So common is this a scientific hypothesis (Church thesis): Class algorithmically calculated partial numerical functions coincides with the class of all partially recursive functions.
     In the formulation of this thesis is an intuitive notion obchyslyuvanosti because it can neither prove nor disprove in general-mathematical sense. It is a fact which testifies in favor of long mathematical practice.
     Theorem:
The system of functions {O (x), S (x)} is a relatively complete system of operations of superposition, primitive recursion and minimization of the set of algorithmically calculated partial numerical functions.
Partial
recursivetion - a clarification of the notion of the function is performed. This concept can prove or refute  resolution ofing.

Sunday, October 23, 2011

Theme 4: Applied theory of algorithms. Rice's theorem. Part 2

Rice's theorem
    Considering algorithmically not solvable problem is easy to see that almost all of them related to samozastosovnistyu - a situation where the algorithm operates with its own description. In applied theory of algorithms can solve that, because the concept is far from samozastosovnosti algorithmic practice, the not solvable in it will never happen. However, it is not.
    Rice's theorem: Let C - any class calculated functions of one variable, non-trivial in the sense that there is a function belonging to C, and functions that do not belong to S. Then there is no algorithm that would be the number x defined functions  fx , fx is a Class C or not (then say that the set {x | fx is C} is not solved).
   With Rice's theorem implies that the number computed by the function can not tell if this function is constant, intermittent, limited, or contains, among its values given number. It seems that nothing is impossible to know and everything in the world -   not solvable. On the other hand, does not contradict Theorem Rice the obvious fact that the number of Turing machine can always learn, for example, whether it contains more than 10 teams or not. In order to understand the meaning of Rice's theorem, it should first recall that the number's function f - is the number of algorithm that computes f; in turn, the number of algorithm uniquely recovers its description, and different numbers correspond to different algorithms.For functions this is not true: if х is'nt y fx and fy are the same function. In Theorem Rice involved as algorithms and functions that need to be clearly distinguished. Class C - a class of functions, while fx mean "function that calculates algorithm Ах ."
    Thus, the value of Rice's theorem is that the description of the algorithm's nothing you can learn about the properties of functions, which he calculates. In particular, it appears not solvable problem of equivalence of algorithms: two algorithms given can not be set, they calculated the same function or not. Number of teams - this property does not function, and describe the algorithm, Rice's theorem is not applicable. An experienced programmer knows that the text of a complex program without running it into work, it is difficult to understand what it does without hypotheses about what she should do, if this understanding is reached and, each time differently, systematic method here does not exist. On the other hand, the text can be found algorithmic method syntax errors, that is to install these or other properties of the algorithm description. Syntactic properties of the algorithm - it features texts that describe it, that the properties of finite words in a fixed alphabet. Semantic properties of algorithms related to the fact that he does, they naturally described in terms of functions and equivalence classes of functions that are calculated algorithms. Obviously, in the process of debugging syntax errors are found quickly, all unpleasantness associated with the analysis of semantics an not established program that attempts to determine what it does instead of doing what was planned.
    Informal interpretation of Rice's theorem: "Algorithm for syntax did not know about its semantics." The expression "do not know" - this is an exaggeration. His exact equivalent of "no single algorithm that allows to know."
    Some of the problems not solvable general theory of algorithms are defined interpretation in practice of programming. Not solvable also occurs in other theories: machine, languages and grammars. From a theoretical point of view, not solvable - not failure, but scientific fact. If it is important to deal with a solvable problem, you need to clear about two things: no general algorithm that solves this problem does not mean that in each case can not succeed; not solvable appearance - this is usually the result of excessive generality problem .

Theme 4: Applied theory of algorithms. Rice's theorem. Part 1

Applied theory of algorithms
    The standard form of presentation of algorithms such as Markov normal algorithm, due to their extremely high level of detail suitable for engineering practice. Turing machine is a convenient abstract model of any person or algorithm computing machine, but in the real world any kind of memory and time of operation is not infinite, but rather strictly limited. However, if the development and implementation of specific algorithms in engineering practice enough to go out of their general properties.
    Applied theory of algorithms itself little concern about the existence of algorithms, it directs its efforts primarily on developing the most effective methods for their description, conversion and implementation. Algorithm as a set of interconnected operators that reflect the basic set of operations transformation projects. Methods of operators are strictly defined (usually operators are some of the algorithms), and in particular the implementation of the algorithm are set as initial value data and parameters that are included in the description of the operators.
    To describe the algorithms use different methods to different degrees of detail and formalized. The theoretical description is given in a formalized form, which - without any details to substantiate the procedure, as the proposed algorithm. For visual presentation structure algorithms are widely used graphical tools: graphs, diagrams, network. A formal and complete description of the algorithms perform on specially developed for this purpose algorithmic languages, it contains all the necessary information to implement the algorithm, not directly related to specific features of computers. Machine implementation of the algorithm requires its translation into the language of a particular machine in a program. The role of automatic translation of algorithmic languages have a special software compilers. Often a general description of the algorithm is directly translated into machine language decryption algorithm operators in computers.
    In contrast to the general theory of algorithms applied theory considers not only deterministic but probabilistic (statistical) and heuristic algorithms. In the latter case than deterministic or statistically defined rules algorithm also includes substantial indications of the direction of sensible process.

Saturday, October 22, 2011

Theme 3: Basic methods construction algorithms. Part 3

Analysis of algorithms
    After developing and drafting stage of the algorithm comes to analysis. The analysis algorithm - an examination of its correctness, ie, determining the accuracy of the applied mathematical model, the coordination of individual blocks, routines, consistency of all actions.
    For the analysis algorithm used a system of testing. The essence of it lies in the selection of such initial data, which result to be obtained after the application of selected mathematical models, it is known in advance. The following reconciliation of the results of the composite algorithm with the same initial data will allow to determine its correctness. When testing the algorithm sequentially, step by step work examined some of its units - branches, loops, subroutines, input and output data. That's when single-step algorithm can correct logical errors.
    For complex and cumbersome algorithms can be applied technique using "stub", that instead of checking the implementation of selected parts of the algorithm currently used value to be derived from their implementation. Later, after the analysis of the main parts of the algorithm can return to the missing parts and to verify their correctness.
    Clearly, the incremental performance for large algorithms is a difficult task. For complex algorithms of modern programming environments provide users a convenient and useful features for single-step program for a computer to keep track of all the necessary intermediate values.
    Successive refinement algorithm
    During the analysis algorithm may need to clarify some of its parts, replacement of some fragments of more rational mathematical tools, design of individual blocks of the algorithm in the form of auxiliary algorithms for the next possible use in its other units.
    For the implementation of some algorithms by one of the essential factors is the time of their execution. When implementing these algorithms on a computer while the algorithm can be tested for different initial data. If the execution is not satisfied, the developer of the algorithm tries to apply more efficient methods for solving the task. Sometimes they are difficult to implement, but more effective on the timing of their implementation.
   

Theme 3: Basic methods construction algorithms. Part 2

Development of algorithms "top-down" and "bottom up"
    The massive use of computers - it is primarily the development of new software. So today we can already talk about the industry formed producing programs. To this end, a variety of programming techniques, which absorbed the idea of structural (modular) approach to drawing algorithms.
    Programming "top-down" or descending programming, based on the idea of gradual detailing the problem into a number of subtasks. First global problem represented as a set of subtasks and built a program in which these subtasks act as some referred to as routines that you can organize treatment. Those subtasks that have not implemented the program, temporarily replaced by so-called software "cap" that allows you to get the first version of the program, ready for the first step debugging and enhanced search options. After that, with respect to subtasks applied the same method.
    Programming "bottom up" or outbox programming based on the opposite process. Originally written and customizable design of tasks to solve specific subtasks, ie, the lowest level of the program and then gradually are going to larger blocks. This process ends when the whole program will be fully assembled and adjusted.
    Over time, technology has another program, called technology application packages. Her idea is that each new problem is solved by a combination of parts of ready-established software packages. Batch technology found its continuation and development in ob'yektnooriyentovanomu programming. Object-oriented tools are tools, high level language, built of modules that perform specific functions independently meaningful. In addition, the module may include objects created by the user or programmer for further processing and presentation.
    Methods of object-oriented programming is the basis to develop new application systems and applications. Now almost every traditional programming language developed from a subset or superset of the support object programming (programming system: Visual Basic, Visual C + +, Visual FoxPro; environment: Delphi, C Builder).

Theme 3: Basic methods construction algorithms. Part 1

Method step by step detail
The structural approach to building algorithms
Modular algorithm

    When creating complex algorithms the method step by step detail. At each stage of assembly algorithm formed its separate parts, which are topical at the moment, and the rest is replaced, such as text option description. In the next steps is the same method is applied to the next group of fragments of the algorithm. This approach leads to the gradual specification of the algorithm, as an executable specification and information of its structure.

    That is, using the method of incremental detail big task will be broken down into smaller units, they, in turn, to even smaller units, etc. Each block algorithm should be as independent and logically complete. Breakdown of units must be determined by the internal logic of the problem.
    Efforts to improve the quality of algorithms, programmers have found their performance in implementing the structural method of constructing algorithms. The basis of the structural approach of building algorithms is claim that the algorithm of any complexity can be displayed using the three basic structures: the passage, branching and loop. Basic structure can connect to each other or to perform their investments into each other. Another advantage of the structural approach is its modularity. The program, based on a structural basis of the algorithm can be presented as separate modules. Module - a sequence of logically related operations, executed as a separate part of the program.
    The structural approach to building algorithms - a way to create an algorithm with extensive use of auxiliary algorithms.
    In the complex and cumbersome tasks of this approach allows the algorithm to split into separate parts - modules, each of which solves its independent subtasks. This allows you to focus on solving each subtasks, implemented as a separate routine. For each such module determined the methods of implementation of the algorithm and data structure in which it operates. The final step in the modular construction of algorithms is an association of individual modules together. For this purpose between the modules must be installed connections for transferring information from one module to the other: the results of some modules are input to others.
    The main purpose of the structural approach to building algorithms is to develop an algorithm with minimal relationships between the modules.
    If placed in front of you is a serious problem of great challenge, the importance of partitioning the algorithm into separate modules can not be underestimated. Especially effective this technique in the development of complex algorithmic systems teams of programmers. In this case, any developer is given its own integral part of the algorithm, which sold it as a separate module. The culmination of the collective work is the construction of these modules together.