115k views
1 vote
Pls solve within one hour

design a push down automata to accept strimg of language in which
number of a is even and b is odd
Upload answer sheets Design a push down automata to accept the strings of the language in which number of a's is even and b's is odd

User Barb
by
8.1k points

1 Answer

0 votes

Final answer:

A push down automata can be designed to accept strings with an even number of a's and an odd number of b's by using a stack to keep track of the number of a's and b's encountered. The automata will have two states: one for an even number of a's and one for an odd number of b's. By following the transition table and rules, the automata will accept strings that meet the given criteria.

Step-by-step explanation:

To design a push down automata that accepts strings with an even number of a's and an odd number of b's, we can follow these steps:

Create two states: one for an even number of a's and one for an odd number of b's.Start in the state for an even number of a's.Whenever an 'a' is encountered, push a symbol onto the stack. Whenever a 'b' is encountered, pop a symbol from the stack.If the stack is empty when a 'b' is encountered, the string is not accepted. If we reach the final state with an empty stack, the string is accepted.

Here is the transition table for the push down automata:

This push down automata will accept strings with an even number of a's and an odd number of b's.

User As Diu
by
8.5k points