wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

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 B P1 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.

flag
Suggest Corrections
thumbs-up
0
similar_icon
Similar questions
View More
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Accountable and Legitimate Government
CIVICS
Watch in App
Join BYJU'S Learning Program
CrossIcon