![Page 1: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/1.jpg)
Chapter 6. Advanced topics in computability theory
CS314: FORMAL LANGUAGES
AND AUTOMATA THEORY L. NADA ALZABEN
![Page 2: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/2.jpg)
Quick Note
Cs314pnu.wordpress.com
Computer Science Department
2
![Page 3: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/3.jpg)
6.1 The recursion theory
It concerns the possibility of making machines that can
construct replicas of themselves.
To consider the recursion theory:
1. Living things are machines • (modern biology assumption ,operate in a mechanistic way).
2. Living things can self-reproduce
• (essential characteristic of every biology species).
3. Machines cannot self-reproduce • (assuming the reproducing of machines by themselves is false, ex. SELF TM)
![Page 4: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/4.jpg)
SELF - REFERENCE
Make a Turing machine that ignores its input and print outs
a copy of its own description , we call it SELF.
![Page 5: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/5.jpg)
SELF - REFERENCE
The job of A is to print out a description of B, and conversely
the job of B is to print out a description of A.
The result is the desired description of SELF.
The jobs are similar, but they are carried out differently.
Our description of A depends on having a description of B.
So we can't complete the description of A until we construct
B.
![Page 6: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/6.jpg)
SELF - REFERENCE
For A we use the machine P<B>, described by q(<B>).
q(<B>) means applying the function q to <B>.
If B can obtain <B>, it can apply q to that and obtain <A>.
B only needs to look at the tape to obtain <B>.
Then after B computes q(<B>) = <A>, it combines A and B
into a single machine and writes its description <AB> =
<SELF> on the tape.
![Page 7: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/7.jpg)
SELF - REFERENCE
![Page 8: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/8.jpg)
SELF - REFERENCE
This can be implemented by any programming language
even plain English “ Print out this line”.
![Page 9: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/9.jpg)
6.1 The recursion theory
![Page 10: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/10.jpg)
TERMINOLOGY FOR THE RECURSION THEOREM
recursion theorem in TM - (If you are designing a machine M,
you can include the phrase "obtain own description <M>" in
the informal description of M's algorithm.)
Two ways:
1. use any other computed value <SELF>
2. simulate <M>.
![Page 11: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/11.jpg)
TERMINOLOGY FOR THE RECURSION
THEOREM
Applications computer Viruses
Another application giving minimal TM
![Page 12: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/12.jpg)
Quick Note
Cs314pnu.wordpress.com
Computer Science Department
12
![Page 13: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/13.jpg)
6.2 Decidability of Logic Theories
Mathematics logic is a branch of mathematics that investigate mathematics itself. It address questions like:
What is a theorem?
What is a proof?
What is truth?
Can an algorithm decide which statements are true?
Are all true statements provable?
We will focus on the problem of:
Determining if the mathematical statements are true or false
And investigate the decidability of the problem. ( depending on the domain of the statements)
Two domains:
1. To decide truth
2. To state its un-decidable
![Page 14: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/14.jpg)
6.2 Decidability of Logic Theories
Remember Boolean operations:
![Page 15: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/15.jpg)
6.2 Decidability of Logic Theories
Statement 1 - infinitely many prime numbers exist - solved.
Statement 2 is Fermat' last theorem - solved, and
Statement 3 - infinitely many prime pairs1 exist - unsolved.
To determine these statements are true we treat each statement as strings and define a language consisting of those statements that are true. Then we ask if the language is decidable.
![Page 16: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/16.jpg)
6.2 Decidability of Logic Theories
The form of the alphabet of this language is:
Formulas are in the prenex normal form if the quantifier
appears in the front of the formula.
Formulas are called statements or sentences if they have
no free variables.
Example:
![Page 17: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/17.jpg)
6.2 Decidability of Logic Theories
To determine the meaning of the variables and relations
we need to determine:
1. The universe over which the variables may take values.
2. A universe together with an assignment of relations to
relation symbols is called a model ( we say M is a tuple
(U,P1,…..,Pk))
Example: (is it true or not)
![Page 18: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/18.jpg)
6.2 Decidability of Logic Theories
Example 6.11: (is it true or not)
Let
If M2=(R,PLUS)?
If M2=(N,PLUS)?
DECIDABLE THEORY:
![Page 19: CS314: FORMAL LANGUAGES AND AUTOMATA THEORY€¦ · CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN . ... statement as strings and define a language consisting of those](https://reader035.vdocuments.us/reader035/viewer/2022081507/5fc088313d281e2d58543ea5/html5/thumbnails/19.jpg)
DECIDABLE THEORY:
No algorithm can decide whether statements in the number
theory are true or false.
Let (N,+) be the model and its theory is Th(N,+):