- 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 a language L having number of zeros in multiples of 3

## Problem

Construct a deterministic finite automata (DFA) that accepts a language L which has the number of zero’s is of multiple of 3 over an alphabet ∑=”{0,1}.

## Solution

If input is: 000 Output is: string is accepted

Because here the number of zero’s is multiple of 3.

### Designing DFA

In order to construct the DFA, follow the below mentioned steps −

**Step 1** -

Valid inputs: 000, 000000, 0^{9} , 0^{12} , …

**Step 2 -**

Valid inputs: 1, 1000, 100000, …

**Step 3 -**

Valid inputs: 10100, 11000, 101100, …

**Step 4 -**

101010, 1101010, 1101110110, …

Invalid inputs − 0,00,10000,01011, …

- Related Articles
- Design DFA for language over {0,1} accepting strings with odd number of 1’s and even number of 0’s
- Design NPDA for accepting the language L = {am b(2m) | m>=1}
- Design a DFA machine accepting odd numbers of 0’s or even numbers of 1’s
- Design a DFA accepting stringw so that the second symbol is zero and fourth is 1
- Design a DFA that accepts at most 3 a"s
- State the worst case number of states in DFA and NFA for a language?
- What is minimizing of DFA in compiler design?
- Methods Accepting a Variable Number of objects in Java
- C Program to construct DFA accepting odd numbers of 0s and 1s
- What is the Representation of DFA in compiler design?
- C program for DFA accepting all strings over w ∈(a,b)* containing “aba” as a substring
- C Program to build DFA accepting the languages ending with “01”
- Number of leading zeros in binary representation of a given number in C++
- Finding the multiples of a number in a given list using NumPy
- Construct a DFA recognizing the language {x | the number of 1's is divisible by 2, and 0'sby 3} over an alphabet ∑={0,1}

Advertisements