DFA Category 3: Contains substring

 DFA accepts strings that contain a specific substring anywhere in the string. For Examples

  • Contains 101
  • Contains ababa
  • Contains 000

DFA Example: 

Construct a DFA that accepts all the strings over ∑ {0,1} where each contains “0” and always starts with “1”.


DFA Example

Construct DFA that accepts all the strings over alphabet ∑ {0,1} where each string contains “00”.


DFA Example: 

Construct a DFA with sigma ∑ = {0, 1}, accepts all strings that contain three consecutive 0’s.


DFA Example: 

Construct a DFA with sigma ∑ = {0, 1}, accepts all strings that do not contain three consecutive 0’s.


DFA Example: 

Construct a DFA that accepts all the strings over the alphabet ∑ {0,1} where each string contains “101” as a substring.


DFA Example: 

Draw a DFA for the language that accepts strings containing neither ’00’ nor ’11’ as a substring over the input alphabet ∑ = {0, 1}.


DFA Example:

Design a DFA that accepts strings that must contain ’01’ or ’10’ as a substring over input alphabets ∑ = {0, 1}.


DFA Example: 

Construct a DFA with sigma ∑ = {0, 1} for the language accepting strings containing exactly two ‘0’.


DFA Example:

Design a DFA with sigma ∑ = {0, 1} for the language accepting strings containing at least two ‘0’.

DFA Example: 

Draw a DFA with sigma ∑ = {0, 1} for the language accepting strings containing at most two ‘0’.


DFA Example: 

Design a DFA with sigma ∑ = {0, 1} for the language accepting strings containing an odd number of total zeros (or odd binary numbers strings).

DFA Example: 

Design a DFA for the Language (L) that accepts only the strings where every “00” is Immediately Followed by 1 over the input alphabet ∑= {0,1}



Comments

Popular posts from this blog

Theory Of Computation PCCST302 KTU Semester 3 BTech 2024 Scheme

Non deterministic Finite Automata NFA

Example DFAs University Questions