grammars languages and finite state automata n.
Download
Skip this Video
Download Presentation
Grammars, Languages and Finite-state automata

Loading in 2 Seconds...

play fullscreen
1 / 8

Grammars, Languages and Finite-state automata - PowerPoint PPT Presentation


  • 158 Views
  • Uploaded on

Grammars, Languages and Finite-state automata. Languages are described by grammars We need an algorithm that takes as input grammar sentence And gives a result: yes – if the sentence is in the language described by the grammar no - otherwise. FSA - Language recognition devices.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Grammars, Languages and Finite-state automata' - dolph


Download Now An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
grammars languages and finite state automata
Grammars, Languages and Finite-state automata

Languages are described by grammars

We need an algorithm that takes as input

grammar

sentence

And gives a result:

yes – if the sentence is in the language described by the grammar

no - otherwise

fsa language recognition devices
FSA - Language recognition devices

Finite State Automata (FSA) - the simplest model of a computing device - a language recognition device

Consists of: a set of internal states,

one initial state, one or more - final states.

Transition table: (input, state) -> state

Input: a string of symbols, written on a tape.

Operation: in a given state, FSA reads a symbol and enters some other state.

slide3
FSA

A string is accepted (recognized) by the FSA if when the last symbol is read, the FSA enters one of its final states.

example 1 the laughing machine

a

h

!

q0

Final state

Initial state

q1

q2

q3

h

Example 1:The laughing machine

recognizes the strings

ha!

ha ha !

ha ha ha…ha!

example 2
Example 2

An FSA that recognizes expressions of the form:

E  number

E  E + number

E  E - number

E  E x number

number

+, -, x

Final state

Initial state

fsas and languages
FSAs and Languages

The set of all strings over an alphabet, that are accepted by the automaton is the language accepted by the automaton.

Thus each automaton describes some language, i.e. it corresponds to a grammar.

grammars and automata
Grammars and Automata

FSA - regular grammars

Pushdown automaton - context-free grammars

Linear-bound - context sensitive automaton grammars

Turing machine - unrestricted grammars

basic characteristics
Basic characteristics

Simple FSA : have no memory

Pushdown automata: use a stack

Linear bound automata: read and write in both directions on finite tape

Computers are linear-bound automata

Turing machines: read and write in both directions on infinite tape

ad