- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Design a DFA accepting stringw so that the second symbol is zero and fourth is 1
Problem
Construct DFA which accepts a string that contains second symbol is zero and fourth symbol is 1 over an alphabet ∑={0,1}.
Solution
Input − 00110
Output is accepted; because in the given string the second symbol is ‘0’ and the fourth symbol is ‘1’.
Input − 11001
Output − string is not accepted, because the second symbol is not ‘0’.
Design DFA step by step as given below −
Step 1 -
Valid inputs − 0001
Step 2 -
Valid input − 1001
Step 3 -
Valid inputs − 0011, 1011
Step 4 -
Valid inputs − 00010, 10010, 00110, 00011, 10011, 00111, …
Step 5 -
Invalid inputs − 0101, 0100, 0010, 1100, 0000, 1000, …
Step 6 -
Valid inputs − 01010, 01000, 11111, 0100000, …
- Related Articles
- Construct DFA of a string in which the second symbol from RHS is ‘a’
- Design a DFA machine accepting odd numbers of 0’s or even numbers of 1’s
- Design a DFA accepting a language L having number of zeros in multiples of 3
- Design DFA for language over {0,1} accepting strings with odd number of 1’s and even number of 0’s
- What is the difference between DFA and NFA in compiler design?
- What is the Representation of DFA in compiler design?
- Design a DFA that accepts at most 3 a"s
- What is minimizing of DFA in compiler design?
- Design NPDA for accepting the language L = {am b(2m) | m>=1}
- C Program to build DFA accepting the languages ending with “01”
- C Program to construct DFA accepting odd numbers of 0s and 1s
- Design a DFA of a string with at least two 0’s and at least two 1’s
- Find the sum of the first51 terms of the A.P.: whose second term is 2 and fourth term is 8.
- The chemical symbol for sodium is(a) So(b) Sd(c) NA(d) Na
- What should be the symbol in the place of * be so that (V)LXXX*X is equivalent to 5089?

Advertisements