0% found this document useful (0 votes)
9 views4 pages

Last One Afl

The document discusses the differences between Recursive Languages (REC) and Recursively Enumerable Languages (RE), highlighting that REC languages are Turing decidable while RE languages may not halt for non-member strings. It also outlines the Chomsky Hierarchy of grammars, detailing four types of grammars and their corresponding languages and automata. Additionally, it explains the concepts of decidable, undecidable, and semi-decidable problems in relation to Turing machines.

Uploaded by

Aryan Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views4 pages

Last One Afl

The document discusses the differences between Recursive Languages (REC) and Recursively Enumerable Languages (RE), highlighting that REC languages are Turing decidable while RE languages may not halt for non-member strings. It also outlines the Chomsky Hierarchy of grammars, detailing four types of grammars and their corresponding languages and automata. Additionally, it explains the concepts of decidable, undecidable, and semi-decidable problems in relation to Turing machines.

Uploaded by

Aryan Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

1 Others

1.1 Recursive Languages(REC) vs. Recursively Enumerable Languages (RE)


 Recursive Language (REC) : A recursive language (subset of RE) can be
decided by Turing machine which means it will enter into final state for the
strings of language and rejecting state for the strings which are not part of the
language. e.g.; L= {anbncn|n>=1} is recursive because we can construct a turing
machine which will move to final state if the string is of the form anbncn else
move to non-final state. So the TM will always halt in this case. REC
languages are also called as Turing decidable languages.
 Recursively Enumerable Languages (RE) : An RE language can be accepted
or recognized by Turing machine which means it will enter into final state for
the strings of language and may or may not enter into rejecting state for the
strings which are not part of the language. It means TM can loop forever for
the strings which are not a part of the language. RE languages are also called
as Turing recognizable languages.
 Relationship

 Difference
Sl. Comparision Recursive Language Recursively Enumerable
No. Base (REC) Languages (RE)
1 Also Known Turing decidable Turing recognizable
as languages languages
2 Definition In Recursive Languages, In Recursively enumerable
the Turing machine languages, the Turing
accepts all valid strings machine accepts all valid
that are part of the strings that are part of the
language and rejects all language and rejects all the
the strings that are not strings that are not part of
part of a given language the given language but do
and halt. not halt and starts an
infinite loop.
3 States i. Halt and accept i. Halt and accept
ii. Halt and Reject ii. Halt and Reject
iii. Never Halt (Infinite
loop)
4 Loop Finite Loop Infinite loops of machine
are possible
5 Halting Halting Turing Machine Non Halting Turing
Machine
context-sensitive RE languages or type-0
language language
1.2 Chomsky Classification of Grammar & Languages.
 Chomsky Hierarchy: Different types of rules, allow one to describe different
aspects of natural language. These grammars form a hierarchy.
 According to Noam Chomosky, there are four types of grammars − Type 0,
Type 1, Type 2, and Type 3. The following table shows how they differ from
each other:


Type Grammar Language Automation Production Type Examples
Unrestricted Recursively Turing The productions S → ACaB
Grammar enumerable Machine have no restrictions. Bc → acB
(UG) language (TM) α→β CB → DB
where aD → Db
Type-0 α ∈ (V + T)* V (V + T)* ….…………...
i.e. α can not be ε, there L={w|w
must be atleast one describes a
variable.
terminating
β ∈ (V + T)*
turing machine}
V - Variables
T - Termials
Context- Context- Linear- First of all Type 1 AB → AbBc
grammar should be Type 0
Sensitive sensitive Bounded with the restriction- A → bcA
Grammar language Automata α→β B→b
(CSG) (LBA) |α| ≤ |β| ….…………
That is the count of L={anbncn|n>0}
Type-1 symbol in α is less than or
equal to β.
and
α ∈ (V + T)* V (V + T)*
β ∈ (V + T)+
i.e. β can not be ε.
Context-Free Context-free Push Down First of all, it should be S→Xa
Type 1 and The left-hand
Grammar language Automata side of production can X→a
(CFG) (PDA) have only one variable X → aX
(|α|=1) and there is no X → abc
Type-2 restriction on β.
X→ε
α→β
Where, ….………….
α∈V L={anbn|n>0}
β ∈ (V + T)*.

Regular Regular Finite A → a, A→ aB S → aB |b


Or
Grammar language Automata A → a, A→ Ba B → bB|a
Type-3 (RG) (FA) Where, ….…………
A, B ∈ V L={an|n>0}
a∈T
1.3 Introduction to Undecidability, Undecidable Problems about Tuting
Machine (TM)
 Decidable Problems: A problem is said to be decidable if we can always
construct a corresponding algorithm that can answer the problem correctly.
Decidability in terms of a Turing machine, a problem is said to be a decidable
problem if there exists a corresponding Turing machine which halts on every
input with an answer- yes or no. Such problems are termed as Turing
Decidable problems.
Examples:
a) Equivalence of two regular languages: Given two regular languages,
there is an algorithm and Turing machine to decide whether two regular
languages are equal or not.
b) Finiteness of regular language: Given a regular language, there is an
algorithm and Turing machine to decide whether regular language is
finite or not.
c) Emptiness of context free language: Given a context free language,
there is an algorithm whether CFL is empty or not.
 Undecidable Problems: The problems for which we can’t construct an
algorithm that can answer the problem correctly in finite time are termed as
Undecidable Problems. A problem is undecidable if there is no Turing machine
which will always halt in finite amount of time to give answer as ‘yes’ or ‘no’.
An undecidable problem has no algorithm to determine the answer for a given
input.
Examples:
a) Ambiguity of context-free languages: Given a context-free language,
there is no Turing machine which will always halt in finite amount of
time and give answer whether language is ambiguous or not.
b) Equivalence of two context-free languages: Given two context-free
languages, there is no Turing machine which will always halt in finite
amount of time and give answer whether two context free languages are
equal or not.
c) Everything or completeness of CFG: Given a CFG and input alphabet,
whether CFG will generate all possible strings of input alphabet (?*)is
undecidable.
d) Regularity of CFL, CSL, REC and REC: Given a CFL, CSL, REC or
REC, determining whether this language is regular is undecidable.
 Semi- Decidable Problems: Semi-Decidable problems are those for which a
Turing machine halts on the input accepted by it but it can either halt or loop
forever on the input which is rejected by the Turing Machine. Such problems
are termed as Turing Recognisable problems. In other words, A semi-
decidable problem is subset of undecidable problems for which Turing
machine will always halt in finite amount of time for answer as ‘yes’ and may
or may not halt for answer as ‘no’.
 Relationship

You might also like