About

I am too Lazy to update about me.

Role

Alma Mater:

Not updated.

Experience:

Not updated.
Babytud
Answer
10 months 2 weeks ago

Yes a pda can have two accepting/final states. If you look at the Formal definition of a PDA, 

A PDA is formally defined as a 7-tuple:

M=(Q,\ \Sigma ,\ \Gamma ,\ \delta ,\ q_{0},\ Z,\ F) where

\,Q is a finite set of states

  • \,\Sigma  is a finite set which is called the input alphabet
  • \,\Gamma  is a finite set which is called the stack alphabet
  • \,\delta  is a finite subset of Q\times (\Sigma \cup \{\varepsilon \})\times \Gamma \times Q\times \Gamma ^{*}, the transition relation.
  • \,q_{0}\in \,Q is the start state
  • \ Z\in \,\Gamma  is the initial stack symbol
  • F\subseteq Q is the set of accepting states

F is the set of accepting states, that means it can be any number of accepting states but should be a subset of Q.

moreless
Babytud
Doubt
10 months 2 weeks ago

Please explain how many binary trees (structurally different) can be formed using n unlabelled nodes by using just the concept of combinations and not directly using the formula of Catalan Numbers.

morelessAdd your answer
Babytud
Doubt
1 year 9 months ago

#include<stdio.h>

#include<conio.h>

void main()

{

int i=25;

clrscr();

printf("%d",scanf("%d",&i));

getch();

}

 

morelessAdd your answer
virtualgate's picture
Virtual GATE
ranita's picture
Ranita Biswas
pritam's picture
Pritam Prasun
pritam's picture
Pritam Prasun
905
7 Sep 2017 - 7:53pm

Yes a pda can have two accepting/final states. If you look at the Formal definition of a PDA, 

A PDA is formally defined as a 7-tuple:

M=(Q,\ \Sigma ,\ \Gamma ,\ \delta ,\ q_{0},\ Z,\ F) where

\,Q is a finite set of states

  • \,\Sigma  is a finite set which is called the input alphabet
  • \,\Gamma  is a finite set which is called the stack alphabet
  • \,\delta  is a finite subset of Q\times (\Sigma \cup \{\varepsilon \})\times \Gamma \times Q\times \Gamma ^{*}, the transition relation.
  • \,q_{0}\in \,Q is the start state
  • \ Z\in \,\Gamma  is the initial stack symbol
  • F\subseteq Q is the set of accepting states

F is the set of accepting states, that means it can be any number of accepting states but should be a subset of Q.

more less