Docsity

presentation on chomsky hierarchy, Slides of Advanced Computer Architecture

Partial preview of the text

Download presentation on chomsky hierarchy and more Slides Advanced Computer Architecture in PDF only on Docsity!

Presented By:

NAME: PUNEET AGARWAL

ROLL NO: 13000117076

STREAM: CSE (A)

SEM: 4

th

YEAR: 2019

CS402 (Formal Language and Automata Theory) Chomsky classification of Grammar

INTRODUCTION Formal Grammars A formal grammar of this type consists of a finite set of production rules ( left-hand side → right-hand side ), where each side consists of a finite sequence of the following symbols: a finite set of nonterminal symbols (indicating that some production rule can yet be applied) a finite set of terminal symbol (indicating that no production rule can be applied) a start symbol (a distinguished nonterminal symbol) A formal grammar provides an axiom schema for (or generates ) a formal language , which is a (usually infinite) set of finite- length sequences of symbols that may be constructed by applying production rules to another sequence of symbols (which initially contains just the start symbol). A rule may be applied by replacing an occurrence of the symbols on its left-hand side with those that appear on its right-hand side. A sequence of rule applications is called a derivation. Such a grammar defines the formal language: all words consisting solely of terminal symbols which can be reached by a derivation from the start symbol.

Formal Language

A grammar for a toy subset of English Language is given by:

Terminals

{generate, hate, great, green, ideas, linguists}

Non-terminals

{ SENTENCE, NOUNPHRASE, VERBPHRASE, NOUN, VERB, ADJ }

Production rules  SENTENCE → NOUNPHRASE VERBPHRASE  NOUNPHRASE → ADJ NOUNPHRASE  NOUNPHRASE → NOUN  VERBPHRASE → VERB NOUNPHRASE  VERBPHRASE → VERB

The Hierarchy Grammar Languages Automaton Type-0 Recursively enumera ble Turing machine Type-1 Context-sensitive Linear-bounded non-deterministic Turing machine Type-2 Context-free Non-deterministic pushdown automaton Type-3 Regular Finite state automaton

Type-2 grammars

Type-2 grammars generate the context-free languages. These are defined by

rules of the form with being a nonterminal and being a string of terminals

and/or non-terminals. These languages are exactly all languages that can be

recognized by a non-deterministic pushdown automaton.

Type-3 grammars

Type-3 grammars generate the regular languages. Such a grammar restricts its

rules to a single nonterminal on the left-hand side and a right-hand side

consisting of a single terminal, possibly followed by a single nonterminal (right

regular). Alternatively, the right-hand side of the grammar can consist of a

single terminal, possibly preceded by a single nonterminal (left regular). These

generate the same languages.

CONCLUSION After completion of this paper, a brief idea on the different types of grammars as classified by Noam Chomsky can be understood clearly. The basis of their classification can also be understood and furthermore we also get to know about the significance of it. It is an important topic in the syllabus of CS402 (Formal Language & Automata Theory). So a paper for having a brief on the topic was prepared and hence, successful.

THANK YOU