0% found this document useful (0 votes)
2K views

Decision Properties of Regular Languages

The document discusses various decision properties of regular languages including membership, emptiness, finiteness, and equivalence problems. It provides examples and explanations of each problem. The membership problem checks if a string is accepted by a finite automaton. The emptiness problem checks if a finite automaton accepts an empty or non-empty language. The finiteness problem checks if a language is finite or infinite. The equivalence problem checks if two finite automata accept the same language.

Uploaded by

Modase Tanish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views

Decision Properties of Regular Languages

The document discusses various decision properties of regular languages including membership, emptiness, finiteness, and equivalence problems. It provides examples and explanations of each problem. The membership problem checks if a string is accepted by a finite automaton. The emptiness problem checks if a finite automaton accepts an empty or non-empty language. The finiteness problem checks if a language is finite or infinite. The equivalence problem checks if two finite automata accept the same language.

Uploaded by

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

VISHWAKARMA INSTITUTE OF TECHNOLOGY

DEPARTMENT OF COMPUTER ENGINEERING

Theory of Computation
TOPIC  Decision Properties of Regular Languages

Pprfgfevppesented by
PRESENTED BY 
Group 14

GUIDED BY 
CONTENT
 Regular Languages

 What are Decision property?

 Decision problem

 Types of Decision problems

• Membership problem
• Emptiness problem
• Finiteness problem
• Equivalence problem

 How to minimize DFA?

 Table Filling Algorithm

 References
REGULAR LANGUAGES

A regular language is a language that can be expressed


with a regular expression or a deterministic or non-
deterministic finite automata or state machine.

The properties of Regular Language are of two types :


A) Closure Properties
B) Decision Properties
WHAT IS DECISION PROPERTY?

A decision property for a class of languages is an algorithm that takes a


formal description of a language (e.g., a DFA) and tells whether or not some
property holds.

Example: Is Language L empty or not?

Types of Decision Problems are :

1. Membership problem
2. Emptiness problem
3. Finiteness problem
4. Equivalence problem
DECISION PROBLEM

Any ‘decision problem’ looks like this:

Yes
Decision
Input
Problem
(generally a
Solver
question) No

What is Problem?

Decidable
Solvable
Not
Problem
decidable
Not
Solvable
MEMBERSHIP PROBLEM
Membership is a property to verify an arbitrary string is accepted by a finite automata or not i.e. it is
a member of the language or not.

Let L is a finite automata that accepts some strings over an alphabet, and let ‘w’ be any string
defined over the alphabet

Decision problem : Does a string w belong to L? i.e. Is w ∈ L?

Possible answers : Yes or No

Approach :
1. Construct a DFA for L
2. Run w on DFA(L)
3. If there exist a transition path in L, which starts at initial state & ends in anyone of the final
state, then string ‘w’ is a member of L
4. Else ‘w’ is not a member of L
MEMBERSHIP PROBLEM
Example :
0 1 0 1 1
Next
Symbol
0 0,1

Start 1 1
A B C

Current
State
MEMBERSHIP PROBLEM
Example :
0 1 0 1 1
Next
Symbol
0 0,1

Start 1 1
A B C

Current
State
MEMBERSHIP PROBLEM
Example :
0 1 0 1 1
Next
Symbol
0 0,1

Start 1 1
A B C

Current
State
MEMBERSHIP PROBLEM
Example :
0 1 0 1 1
Next
Symbol
0 0,1

Start 1 1
A B C

Current
State
MEMBERSHIP PROBLEM
Example :
0 1 0 1 1
Next
Symbol
0 0,1

Start 1 1
A B C

Current
State
MEMBERSHIP PROBLEM
Example :
0 1 0 1 1

0 0,1

Start 1 1
A B C

Current
State
 As binary string doesn’t ends in final state, given string is not member of given language
EMPTINESS PROBLEM

Emptiness is a property to check whether finite automata accepts empty language or non-empty
language.

Decision problem : Does finite automata accepts empty language or not? i.e. L = Ø ?

Possible answers : Yes or No

Approach :
1. Construct a DFA for L
2. Select the state that cannot be reached from the initial states & delete them
(remove unreachable states)
3. If there exists at least one final state that is reachable from start state, then the finite
automata accepts the non-empty language
4. Otherwise, finite automata accepts the empty language
EMPTINESS PROBLEM
Example :

1
0
q1 1
0,1

Start
q0 1
q3

0
q2

 As there exists path from start state to final state, finite automata accepts non-empty language
FINITENESS PROBLEM

Finiteness is a property to check whether finite automata accepts finite language or not i.e. is
language finite or infinite.

Decision problem : Is L finite or infinite?

Possible answers : Yes or No

Approach :
1. Construct a DFA for L
2. select the state that cannot be reached from the initial state & delete them (remove
unreachable states)
3. select the state from which final states are not reachable & delete them (remove dead
states)
4. In the resultant finite automata if there exist any loop, then language is infinite
5. Otherwise, Language is finite
FINITENESS PROBLEM
Example 1: Is the language of this DFA finite or infinite?

0
q2 0
0,1

Start 0,1 0,1


q0 q1 q4 q5
1

0 1 0,1
q3
q6 1
FINITE
FINITENESS PROBLEM
Example 2: Is the language of this DFA finite or infinite?

0
q2 0
0,1

Start 0,1 0,1


q0 q1 q4 q5
1

1 0
q3

1 due to this
INFINITE
EQUIVALENCE PROBLEM

Equivalence is a property to check whether two finite automata accepts same language or not.

Decision problem : Is L1 = L2?

Possible answers : Yes or No

Approach :
1. Construct a DFA(L1) and DFA(L2)
2. Make pair of every final states and every non-final states
3. Make a comparison table and look 1-hop away for every state
4. If output of all the final states and all non-final states is equal, then two finite automata
accepts same language
5. Otherwise, it accepts different languages
EQUIVALENCE PROBLEM
Example : Are two languages equal ?

2 0 2
1 C D 0
2 2
0 A B 1 0
1
1
2
0 E
Non-final state : A Non-final states : C, D
Final state : B Final state : E
1

Non-final states Final states


0 1 0 1

{A,C} {A,D} {B,E} {B,E} {A,C} {B,E}

{A,D} {A,D} {B,E}

 Both languages are same, as output for pair of every non-final state is equal
EQUIVALENCE PROBLEM

Another Approach :
1. Construct a DFA(L1) and DFA(L2)
2. Reduce them to their minimal DFAs, MinDFA(L1) and MinDFA(L2)
3. If MinDFA(L1) = MinDFA(L2), then L1 = L2
4. Else L1 ≠ L2
HOW TO MINIMIZE DFA?

Approach :
1. Construct a DFA(L1)
2. Eliminate states that are unreachable from the start state
3. Identify and remove equivalent states using Table filling algorithm
4. Output is the minimal DFA
TABLE FILLING ALGORITHM

A =
B =
C =
D =
E X X X X =
F X =
G X =
1. Mark X between accepting vs. non-accepting state H X =
A B C D E F G H
TABLE FILLING ALGORITHM

A =
B =
C X =
D X =
E X X X X =
F X X =
G X X =
1. Mark X between accepting vs. non-accepting state H X X =
A B C D E F G H
2. Look 1- hop away for distinguishing states or strings
TABLE FILLING ALGORITHM

A =
B =
C X X =
D X X =
E X X X X =
F X X X =
G X X X =
1. Mark X between accepting vs. non-accepting state H X X X =
A B C D E F G H
2. Look 1- hop away for distinguishing states or strings
TABLE FILLING ALGORITHM

A =
B =
C X X =
D X X X =
E X X X X =
F X X X X =
G X X X X =
1. Mark X between accepting vs. non-accepting state H X X = X =
A B C D E F G H
2. Look 1- hop away for distinguishing states or strings
TABLE FILLING ALGORITHM

A =
B =
C X X =
D X X X =
E X X X X =
F X X X X X =
G X X X = X =
1. Mark X between accepting vs. non-accepting state H X X = X X =
A B C D E F G H
2. Look 1- hop away for distinguishing states or strings
TABLE FILLING ALGORITHM

A =
B =
C X X =
D X X X =
E X X X X =
F X X X X X =
G X X X = X X =
1. Mark X between accepting vs. non-accepting state H X X = X X X =
A B C D E F G H
2. Look 1- hop away for distinguishing states or strings
TABLE FILLING ALGORITHM

A =
B =
C X X =
D X X X =
E X X X X =
F X X X X X =
G X X X = X X =
1. Mark X between accepting vs. non-accepting state H X X = X X X X =
A B C D E F G H
2. Look 1- hop away for distinguishing states or strings
TABLE FILLING ALGORITHM

A =
B = =
C X X =
D X X X =
E X X X X =
F X X X X X =
G X X X = X X =
1. Mark X between accepting vs. non-accepting state H X X = X X X X =
A B C D E F G H
2. Look 1- hop away for distinguishing states or strings

3. Look 1 hop away again for distinguishing states or strings


continue…
TABLE FILLING ALGORITHM

A =
B = =
C X X =
D X X X =
E X X X X =
F X X X X X =
G X X X = X X =
1. Mark X between accepting vs. non-accepting state H X X = X X X X =
A B C D E F G H
2. Look 1- hop away for distinguishing states or strings

3. Look 1 hop away again for distinguishing states or strings


continue… Equivalences :
•A=B
•C=H
•D=G
MINIMAL DFA

(Minimal DFA)

Equivalences :
•A=B
•C=H
•D=G
REFERENCES

• http://infolab.stanford.edu/~ullman/ialc/spr10/slides/rs1.pdf
• https://swaminathanj.github.io/fsm/rlproperties.html
• https://www.youtube.com/watch?v=9B0i9GuFFwk
• https://www.geeksforgeeks.org/closure-properties-of-regular-languages/
• https://eecs.wsu.edu/~ananth/CptS317/Lectures/RegularLanguageProperties.pdf
THANK
YOU

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy