Consider the following decision problems: P1: Does a given finte state machine accept a given string P2: Does a given context free grammer generate an infinite number of strings.
Which of the following statement is true?
A
Only P2 is decidable
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
P1 and P2 are decidable
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
Neither P1 nor P2 are decidable
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
Only P1 is decidable
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution
The correct option is BP1 and P2 are decidable P1 is membership of FSM i.e., regular language. P2 is finte/infiniteness of context free grammer. Membership of FSM and finiteness of CFG, both are decidable problems.
So P1 and P2 both are decidable.