Presentation is loading. Please wait.

Presentation is loading. Please wait.

Automata, Formal Grammars, and Consequences

Similar presentations


Presentation on theme: "Automata, Formal Grammars, and Consequences"— Presentation transcript:

1 Automata, Formal Grammars, and Consequences
A Bit of Theory Automata, Formal Grammars, and Consequences John M. Hunt

2 What is Computer Science?
"Computer science is no more about computers than astronomy is about telescopes." Edsger Dijkstra

3 Hardware Independent Works at the level of logic, physical implementation is not important We can trade hardware for software Virtual machines Can be implemented Electronics Mechanically Biologically – DNA and bacteria

4 Algorithm Like a Recipe, but . . . Strictly defines the order of steps
“In mathematics and computing, an algorithm is a procedure (a finite set of well-defined instructions) for accomplishing some task which, given an initial state, will terminate in a defined end-state.” - Wikipedia Like a Recipe, but . . . Strictly defines the order of steps

5 Formal Language the way we describe problems
A set of finite length strings drawn from a finite set of symbols We do not consider the meaning of the symbols Grammar – rules on how the symbols may be fitted together By using recursive rules infinitely large languages can be generated from a finite number of symbols Key question is how to determine if a particular string belongs to a particular language

6 Two Approaches Automata Formal Grammars

7 Automata Imaginary machines Thought experiments Models of computation

8 Formal Grammar Variables – capital letters
Terminals – small letters / numbers Replacement rules S -> aS |

9 Formal Grammar One way to specify a language is to provide grammar rules, called productions Example with letters a, b, c: S -> aS S -> bA A -> A -> cA Which belong: cab aaaccc aabc abbcc

10 Machine and Grammar Two sides of a coin
Given a description of a machine we can predict what kind of language it can process and what grammar describes it Given a language we can describe what sort of machine is required to process it. Given an unknown machine we can try out different languages on it to asses its power.

11 Java is a formal language
Like most programming languages it has a formal grammar specified using BNF notation Which strings belong to the Java language?: a = b + c; b + c = a: a = b # c;

12 Chomsky Hierarchy Increasingly Powerful Automata Grammar
Production Rule Finite State Regular A->a, A->aB Push Down Context Free A->γ Turing Machine Recursively Enumerable Ω->β Increasingly Powerful

13 Finite State Automata Finite number of states, transition, and conditions No memory, no record of how we got to the current state Computing today

14 FSA Example a Door Circles are states Lines are transitions Open
Closed

15 Example c b c S b a a q1 q2 exit q0 Example with letters a, b, c:
S -> aS S -> bA A -> A -> cA c q1 b c q2 S b exit a q0 a

16 . . . Push Down Automata FSA + Stack Stack provides memory
Stack accessed only at top Stack is infinite . . .

17 Turing Machines FSA + Memory Can move around in memory
Memory is infinite Assume operations are infinitely fast . . . . . .

18 Turing Operations Move Left Move Right Set to 0 Set to 1 Compare Reset
Note: any set of discrete symbols can be represented by multiple 1’ & 0’s

19 Turing Machines (cont)
All problems that can be solved using an algorithm can be solved using a Turing machine There are a number of other notations for expressing algorithms – Lambda calculus, cellular automata, Wang models, Markov algorithm – that are equivalent to TM, none are more powerful, although they maybe more covenant

20 Thoughts Odd that such simple operations are capable of doing everything possible. Odd that there are many Turing equivalent approaches but nothing better. It would seem that Turing machines should be discouraging to AI proponents, but the have not been.

21 So What? Computing in Nature Genetics Ecological cycles Flock behavior
Linguistics Syntax of human languages

22 Chomsky Institute Professor and Professor (Emeritus) in the Dpt. of Linguistics & Philosophy at MIT Father of modern linguistics considered the "most cited living author“ eighth most cited source of all time Author of over 100 books

23 Chomsky Responsible for much of the development of formal languages and related machine models His intention was to use language and more specifically grammar as a window into the human mind His work was not only important to computer science, but also to cognitive psychology and forms the basis of modern linguistics

24 Chomsky’s Insights Grammar is creative – sentences are original
All human languages share an underlying meta-grammar Children are able to learn languages, including grammar just by being exposed to them Human grammar requires a Turing machine to process

25 Consequences Basic AI tasks such as understanding a conversation or translating a document require a Turing machine to perform correctly It has become common to refer to people as “wetware” or to suggest that people are a type of computer. Their ability to perform TM tasks suggests other wise

26 Consequences The ability of children to learn grammar at an early age, without training, shows that it is an innate ability of the human mind not a result of the child’s environment This refutes the idea of the mind as a blank slate promoted by such people as BF Skinner

27 Consequences Complex Grammar is universal in human languages, even “primitive” ones, and innate to children Animal “languages” (bird songs, etc.) show no evidence of grammar Where then did human grammar come from?

28 Applications

29 Broad Application #1 Natural Man rejects that man is made in the image of God. To avoid this the argument is made that man is just a machine However, Automata Theory, and the related linguistic and cognitive understandings, show man must be more than a machine as we can conceive it.

30 Broad Application #2 We are often tempted to have “rules to live by” that go beyond what Scripture gives us. Which becomes “legalism”. Automata theory shows the limits of rules to solve problems. Many places in Scripture refuse to provide us rules. Example: Luke 10:25-37

31 Conclusion We started with two very abstract topics – formal grammar and automata We have show they give us insight on: Foundations of computer science Nature of man Understanding of our Faith


Download ppt "Automata, Formal Grammars, and Consequences"

Similar presentations


Ads by Google