You are on page 1of 11

BCSE304L:Theory of Computation

Non-Recursively Enumerable Languages, Chomsky


Hierarchy, Computable Functions

Jyothimon C
Assistant Professor
School of Computer Science and Engineering
Vellore Institute of Technology

April 6, 2023

JYOTHIMON C BCSE304L-TOC April 6, 2023 1 / 11


Contents

1 Non-Recursively Enumerable Languages

2 Chomsky Hierarchy

3 Computable Function

JYOTHIMON C BCSE304L-TOC April 6, 2023 2 / 11


Non-Recursively Enumerable Languages

If the language L is not recursively enumerable, then there is no


algorithm for listing the members of L. It might be possible to define L by
specifying some property that all its members satisfy, but that property
can’t be computable.

That is, there can be no computer program or Turing machine that tests
whether a given string w has the property, since if there were, then we
could write a program that lists the members of L.

JYOTHIMON C BCSE304L-TOC April 6, 2023 3 / 11


Chomsky Hierarchy

Noam Chomsky, a founder of formal language theory, provided


classification languages into four types.
They are:
Type-0 languages or Unrestricted languages,
Type-1 languages or Context sensitive languages,
Type-2 languages or Context free languages,
Type-3 languages or regular languages.

JYOTHIMON C BCSE304L-TOC April 6, 2023 4 / 11


Chomsky Hierarchy

JYOTHIMON C BCSE304L-TOC April 6, 2023 5 / 11


Type 0: Unrestricted Grammar

Type 0 languages are also known as the Recursively Enumerable


languages.
Type 0 languages are recognized by Turing Machine.

Type-0 grammars have productions of the form,


α → β, such that α ∈ / ϵ.

S → ACaB
Ca → aaC
CBa → DB
aD → Da
aE → Ea
AE → ϵ

JYOTHIMON C BCSE304L-TOC April 6, 2023 6 / 11


Type-1 or Context Sensitive Languages

Type 1 languages are known as Context Sensitive languages.

LHS of a Type-1 grammar is not longer than the RHS.

Type- 1 grammars are represented by the productions


α → β, such that |α| ≤ |β|.

Type-1 languages are recognized using Linear Bounded Automata (LBA).

The following is an example for a Context Sensitive grammar:


S → SBC
S → aC
B→a
CB → BC
Ba → aa
C→b

JYOTHIMON C BCSE304L-TOC April 6, 2023 7 / 11


Type-2 or Context-free languages

Type 2 languages are known as Context Free languages.

LHS of a Context free grammar is a single non-terminal. The RHS


consists of an arbitrary string of terminals and non-terminals.

Context free grammars are represented by the productions


A → β.

Type 2 languages are recognized using Pushdown Automata (PDA).

The following is an example for a Context free grammar:


S → aSb
S→ ϵ

JYOTHIMON C BCSE304L-TOC April 6, 2023 8 / 11


Type-3 or Regular languages

Type 3 languages are known as Regular languages.

The LHS of a Type-3 grammar is a single non-terminal. The RHS is


empty, or consists of a single terminal or a single terminal followed by a
non-terminal.

Type-3 grammars are represented by the productions


A → aA or A → a.

Type-3 languages are recognized using Finite State Automata (FA).


The following is an example for a regular grammar:
A → aA
A→ϵ
A → bB
B → bB
B→ϵ
A→c
JYOTHIMON C BCSE304L-TOC April 6, 2023 9 / 11
Example of Unrestricted Grammar

Example of an unrestricted grammar.


L(G)={ an b n c n | n ≥ 0}

G = (V,T,S,P)
V={S,U,T,C}
T={a,b,c}
P={ S → UT
U → ϵ| aUbC
Cb → bC
CT → Tc
T→ϵ}
Derive the string ’aaabbbccc’.

JYOTHIMON C BCSE304L-TOC April 6, 2023 10 / 11


Computable Functions

Computable functions are exactly the functions that can be calculated


using a mechanical calculation device given unlimited amounts of time and
storage space.
Equivalently, Church Turing thesis states that a function is computable if
and only if it has an algorithm.

JYOTHIMON C BCSE304L-TOC April 6, 2023 11 / 11

You might also like