- 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 machine accepting odd numbers of 0’s or even numbers of 1’s
A Deterministic Finite automaton (DFA) is a five tuples
M=(Q, Σ, δ,q0,F)
Where,
- Q : Finite set called states.
- Σ : Finite set called alphabets.
- δ : Q × Σ → Q is the transition function.
- q0 ϵ Q is the start or initial state.
- F : Final or accept state.
Problem
Construct a DFA machine accepting odd numbers of 0’s or even numbers of 1’s.
Solution
Design two separate machines for the two conditions over an alphabet Σ={0,1} −
DFA accepting only odd number of 0’s
DFA accepting only even number of 1’s
DFA accepting only odd number of 1’s over an alphabet Σ={0,1}
The language L= {1,10,1110,1011,10101,100101,….}
DFA accepting only even number of 1’s over an alphabet Σ={0,1}
The language L= {11,101,11110,10111,101101,1001011,….}
Now merge two transition diagrams to generate a machine accepting odd number of 0’s or even number of 1’s
- Related Articles
- Design DFA for language over {0,1} accepting strings with odd number of 1’s and even number of 0’s
- Construct DFA of alternate 0’s and 1’s
- 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
- Adding only odd or even numbers JavaScript
- Design a Moore machine to generate 1's complement of a binary number.
- Count Numbers with N digits which consists of odd number of 0's in C++
- Count Numbers with N digits which consists of even number of 0's in C++
- The sum of two prime numbers $(>2)$ is(A) odd (B) even (C) prime (D) even or odd
- Design a DFA that accepts at most 3 a"s
- Even numbers at even index and odd numbers at odd index in C++
- Design a DFA accepting a language L having number of zeros in multiples of 3
- How To Do Divisibility In Odd Or Even Numbers
- State whether the following statements are True or False:(a) The sum of three odd numbers is even.(b) The sum of two odd numbers and one even number is even.(c) The product of three odd numbers is odd.(d) If an even number is divided by 2, the quotient is always odd.(e) All prime numbers are odd.(f) Prime numbers do not have any factors.(g) Sum of two prime numbers is always even.(h) 2 is the only even prime number.(i) All even numbers are composite numbers.(j) The product of two even numbers is always even.
- What is the HCF of two consecutive(a) numbers? (b) even numbers? (c) odd numbers?

Advertisements