??? ????????? ??? (??????)
??? ????????? ??? (??????)
Module 3 – Grammers.
Q1 Explain Chomsky Hierarchy.
Ans.
The Chomsky Hierarchy is a classification of formal languages, proposed by linguist and cognitive scientist Noam
Chomsky in the 1950s. This hierarchy organizes formal languages into four types based on the generative power of the
grammar formalism used to describe them.
Types Of Chomsky Hierarchy:
1. Type 3: Regular Languages:
• Grammar Type: Regular grammar (or regular expressions).
• Automaton: Recognized by finite automata.
• Properties:
o Can be represented by regular expressions.
o Recognizable by deterministic and nondeterministic finite automata.
o Simplest type of language in the hierarchy.
• Example Language: L = {0,01,001,0001,…}
Module 6 – Undecidability.
Q1 Explain Rice’s Theorem.
Ans.
Statement of Rice's Theorem:
Rice's Theorem states that for any non-trivial property of partial functions, i.e., any non-trivial property about the set of
functions computed by algorithms (Turing machines), it is undecidable to determine whether an algorithm's description
belongs to the set of algorithms possessing that property.
Key Terms:
1. Non-trivial Property - A property is considered non-trivial if there exist two algorithmic descriptions, one with the
property and one without.
2. Partial Functions - The theorem deals with partial functions, which are functions that may not be defined for all
possible inputs. It includes functions that may not halt (i.e., the halting problem) or those that may diverge on certain
inputs.
Implications and Interpretation:
Undecidability - Rice's Theorem implies that there is no general algorithm that can decide, for any given algorithm,
whether it possesses a non-trivial property. The undecidability stems from the fact that determining such properties
involves analyzing the behavior of an algorithm on all possible inputs, which is not generally computable.
Limitations on Algorithmic Analysis - The theorem highlights the limitations in analyzing algorithmic properties. It
shows that there is no uniform decision procedure that can determine non-trivial properties for all possible algorithms.
Scope of Undecidability - The undecidability result applies to a broad class of properties, including properties related to
specific inputs, outputs, runtime behavior, or any other aspect of a program's computation.
Examples - Properties such as "halts on a particular input," "computes a total function," or "prints 'Hello World' on input
0" are considered non-trivial properties, and Rice's Theorem asserts that determining these properties for any arbitrary
algorithm is undecidable.
2. Table Form: