Docsity

Defining Languages in Automata Theory, Slides of Theory of Automata

Partial preview of the text

Download Defining Languages in Automata Theory and more Slides Theory of Automata in PDF only on Docsity!

Automata Theory

By: ZAIDULLAH

Lecturer(Computer Science) University of Engineering & Technology Mardan

Course Code: CS

Lecture 03

“Defining languages”

Outline

Topic: Defining Languages

  • (^) Objectives
  • (^) Defining languages
    • (^) Using Descriptive Definition
    • (^) Using Recursive Definition
    • (^) Using Regular Expression
    • (^) Using Finite Automata

Defining Languages

 (^) The languages can be defined in different ways , such as

  • (^) Descriptive definition
  • (^) Recursive definition
  • Using Regular Expressions(RE)
  • (^) Using Finite Automaton(FA).

Descriptive definition of language

 (^) The language is defined, describing the conditions imposed on its words.

Recursive definition of language

 (^) The following three steps are used in recursive definition

  1. Some basic words are specified in the language.
  2. Rules for constructing more words are defined in the language.
  3. No strings except those constructed in above, are allowed to be in the language. Course: Theory of Automata CS311-- Instructor: ZAIDULLAH, Asst. Prof. Institute of Computing , KUST -- Email: [email protected]

 (^) Defining language of INTEGER

  1. 1 is in INTEGER.
  2. If x is in INTEGER then x+1 and x-1 are also in INTEGER.
  3. No strings except those constructed in above, are allowed to be in INTEGER.

Recursive definition of language

Examples

Defining Languages using Regular

Expression

 (^) Language L={Λ, x, xx, xxx,…} of strings, defined over Σ = {x}

  • (^) x*.  (^) Language L={x, xx, xxx,…}, defined over Σ = {x}
  • (^) x+.

 (^) Language L, consisting of all possible strings, defined over Σ = {a, b}.

  • (^) (a + b)*.  (^) Language L, of strings having exactly double a, defined over Σ = {a, b}
  • (^) baab

Defining Languages using Regular

Expression

Examples

 (^) Σ = {a,b}  (^) States: x, y, z where x is an initial state and z is final state.  (^) Transitions:

  1. At state x reading a go to state z ,
  2. At state x reading b go to state y ,
  3. At state y reading a , b go to state y
  4. At state z reading a , b go to state z

Defining Language using Finite

Automata

Examples

 (^) These transitions can be expressed by the following table called transition table

Defining Language using Finite Automata

Examples

Old States New States Reading a Reading b x - z y y y y z + z z

Summary Topic: Defining Languages

  • (^) Studied how we can describe languages using different methods
    • (^) Descriptive definition
    • (^) Recursive definition
    • Using regular expression
    • (^) Using Finite automata