Consider the transition diagram of a PDA given below with input alphabet ∑ = {a, b} and stack alphabet Γ = {X, Z}. Z is the initial stack symbol. Let L denote the language accepted by the PDA. Which one of the following is TRUE?

Consider the transition diagram of a PDA given below with input alphabet ∑ = {a, b} and stack alphabet Γ = {X, Z}. Z is the initial stack symbol. Let L denote the language accepted by the PDA. Which one of the following is TRUE? Correct Answer L = { a<sup>n</sup>|n ≥ 0} ∪ {a<sup>n</sup>b<sup>n</sup>|n ≥ 0} and is deterministic context-free

Concept:

Acceptance of given string by a push down automata in two ways either by

  • Acceptance by final state: if machine at the end of the string enters to one of the final states then string is accepted.

  • Acceptance by Empty state: if at the end of the string, stack is empty then string is accepted.

Explanation:

In this PDA, initial state is also the final state it means null string is accepted by the given push down automata (PDA). Consider the states as q1, q2 and q3 where q1 is the final state.

Transition of given PDA are:

1) (q1, a, Z) => (q1, XZ)

2) (q1, a, X) => (q1, XX)

3) (q1, b, X) => (q2, ϵ)

4) (q2, b, X) => (q2, ϵ)

5) (q2, ϵ, Z) => (q3, Z)

First two transition show that after giving input a at transition state remains same. With every input ‘a’ we push X into stack. It means an is always accepted for n>= 0. Transition 3 and 4 shows that for every b input a X is popped out of the stack until stack symbol is Z and string becomes empty. It means ‘b’ occurred same number of times as ‘a’. It represents language of the form {anbn for n>=0 }. It is a DCFL.

Related Questions

Which among the following options are correct? Statement 1: TMs can accept languages that are not accepted by any PDA with one stack. Statement 2: But PDA with two stacks can accept any language that a TM can accept.
Read the passage carefully and select the best answer to each question out of the given four alternatives.
Public opinion may be passive and false or active and real. It is claimed in theory that all governments are ultimately based on the opinion or sanction of the governed. But we find that in practice the people's rights are often trodden down and tyranny and oppression are allowed to continue. The government does it not because the people want it to do so but because they are too idle, too uneducated and too disunited or timid to oppose the govern ment. Such public opinion is passive and false and not an active verdict. But when we find people alert, intelligent and determined to let the government know their will, when they want to exercise actively their voice in the management of their country, we have an instance of true or active public opinion. True public opinion is formed by and expressed through the press, the platform, political parties and educational institutions. These have sacred duties to perform, duties on which depends the ultimate good of the entire community. The press today wields a tremendous influence, So it should support the causes and move ments and condemn the wrong one's and thus teach people to form correct opinion. A free and fair press ventilates the grievances of the public. Thus a healthy relationship develops between the people and the government through out an unbiased press. Political parties also help to create and regulate opinions. No less important part is played by the educational Institutions which train the minds of the young people who will be the citizens of tomorrow. It has been said that modern Germany and China have been made by their universities. It is necessary that the young and the growing minds should imbibe the spirit of fellow-feeling, the spirit of tolerance, the habit of compromise, and show due regard for the feelings and opinion of others without which a democratic society cannot function, let alone succeed. When there is true awakening of the people, we shall have the real and conscious public opinion. And justice will reign on earth and truly will the voice of the people be the voice of God.
According to the passage, which of the following is needed from the people to have true or active public opinion? 1. Alertness
2. Determination
3. Intelligence
4. Raising their voice