The Chomsky Hierarchy - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

The Chomsky Hierarchy

Description:

... the basis for machine translation. Came up with the idea ... The term context free comes from the fact that V can always be replaced by w regardless context ... – PowerPoint PPT presentation

Number of Views:1596
Avg rating:3.0/5.0
Slides: 28
Provided by: rich488
Category:

less

Transcript and Presenter's Notes

Title: The Chomsky Hierarchy


1
The Chomsky Hierarchy
  • Richard Kelley

2
Overview
  • Mini Biography Chomsky
  • Formal Grammars
  • Formal Languages
  • The Chomsky Hierarchy
  • How does it relate to CS?

3
Biography Noam Chomsky
  • Avram Noam Chomsky was born 17 December 1928
  • The son of a Hebrew scholar he was exposed to
    many different languages at an early age
  • Yiddish
  • English
  • Made to study Hebrew at least once a week
  • Although claims that The only language I speak
    and write proficiently English

4
Biography (cont)
  • Not a computer scientist at all
  • Hes a linguist
  • Institute Professor of linguistics at MIT
  • Main work is in generative linguistics
  • Defn. The study of linguistic syntax using formal
    languages that can generate the well-formed
    expressions of a natural language

5
Biography (cont)
  • 1945 he began studying philosophy and linguistics
    at the University of Pennsylvania
  • conducted much of his doctoral research at
    Harvard, but received his Ph.D from U of P
  • At this time he started to develop is linguistic
    ideas

6
Biography (cont)
  • Book Syntactic Structures
  • The most well known work in the field of
    linguistics
  • "Colorless green ideas sleep furiously
  • grammar is correct, but the sentence is complete
    nonsense
  • idea that syntax is separate from grammar

7
Biography (cont)
  • Hes not a computer scientist, so why do we care?
  • ideas became the basis for machine translation
  • Came up with the idea of generative grammars
  • Study of automata

8
Formal Grammars
  • Formal Grammar is an abstract structure that
    describes a formal language
  • in other words it's a set of rules that defines a
    set of strings over an alphabet
  • In CS
  • Grammars generate
  • Languages describe

9
Formal Grammars (cont)
  • Generative grammars are the ones were familiar
    with
  • How about an example?

10
Formal Grammars (cont)
1. S - aSb
2. S - ba
So we can generate strings like this
(1) aSb
(1)- aaSbb
(1)- aaaSbbb
(2)- aaababbb
11
Formal Grammars (cont)
  • Formally, Chomsky defined generative grammars as
  • A finite set N of nonterminal symbols
  • A finite set S of terminal symbols
  • A finite set of production rules like the ones on
    the previous slide, P
  • A start symbol, S

12
Formal Grammars (cont)
  • G N, S, P, S
  • Where, P
  • S - aBSc
  • S - abc
  • Ba - aB
  • Bb - bb

13
Formal Grammars (cont)
  • S - aBSc
  • S - abc
  • Ba - aB
  • Bb - bb

S - aBSc
- aBabcc
- aaBbcc
- aabbcc
14
Formal Languages
  • Formal languages are used to describe the strings
    that the grammars generate
  • Regular Languages
  • A regular language is an language that can be
    expressed using a regular expressions
  • In other words, a finite state machine accepts it
  • EX. L a is regular

15
Formal Languages (cont)
  • Context Free Languages
  • context free languages are generated by context
    free grammars
  • In context free grammars every production (P)
    rule is of the form
  • V - w
  • V nontermimal W string
  • The term context free comes from the fact that V
    can always be replaced by w regardless context
  • Contrast Context-sensitive languages

16
Formal Languages (cont)
Context free Grammar S - aSb e generates
17
Formal Languages
  • Context-Sensitive Languages
  • In these languages all the rules in P are in the
    form
  • aAb - ayb
  • A can only be replaced based on what context
    their in because of a b
  • Where a, b, and y are strings of terminals and
    non-terminals

18
Formal Languages (cont)
Context-Sensitive Grammar S - abc aSBc cB -
Bc bB - bb generates
19
Turing Machines
Basically just Finite State Machines
TM
?
?
x y
20
Formal Languages
  • Turing-recognizable
  • or recursively enumerable
  • A language is TR if some TM recognizes it
  • Meaning the problem can be represented on a TM
  • Turing-Decidable (decidable)
  • or recursive
  • A language is decidable if some TM halts on every
    string in the language

21
Chomsky Hierarchy
  • Type 0 Recursively-enumerable
  • No restrictions
  • Type 1 Context-Sensitive
  • aCb - acB
  • Type 2 Context Free
  • A -b
  • Type 3 Regular

22
Chomsky Hierarchy
  • Every regular language is context-free
  • Every context free language is context sensitive
  • Every context-sensitive language is recursively
    enumerable

23
Chomsky Hierarchy
?(?)
Turing-Recognizable
Type 0
Decidable
Type 1
Context-Free
Regular
Type 3
Type 2
24
Direct Application to CS
  • Ability to reduce problems
  • A way of converting one problem into another
    problem in such a way that the second problem is
    used to solve the first
  • NP-C problems can be reduced to the halting
    problem
  • M is a TM and M accepts w
  • Keeps you from wasting your time!

25
Summary
  • Mini Biography Chomsky
  • Formal Grammars
  • Formal Languages
  • The Chomsky Hierarchy
  • How does it relate to CS?

26
References
  • Sipser, Micheal. Introduction to the theory of
    computation. Boston PWS Publishing Company, 1997
  • Context-Sensitive Grammars http//en.wikipedia.o
    rg/wiki/Context-sensitive_grammar March 2005
  • Altenkirch, Thorsten Turing machines and the
    rest http//www.cs.nott.ac.uk/txa/g51mal.2001/no
    tes/node41.html March 2005

27
References
  • Context-Free Grammars http//en.wikipedia.org/wi
    ki/Context-free_grammar March 2005
  • Noam Chomsky http//en.wikipedia.org/wiki/Chomsk
    y March 2005
Write a Comment
User Comments (0)
About PowerShow.com