Open In App
Related Articles

GATE | GATE CS 2010 | Question 65

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report
Let w be any string of length n is {0,1}*. Let L be the set of all substrings of w. What is the minimum number of states in a non-deterministic finite automaton that accepts L? (A) n-1 (B) n (C) n+1 (D) 2n-1

Answer: (C)

Explanation: We need minimum n+1 states to build NFA that accepts all substrings of a binary string. For example, following NFA accepts all substrings of “010″ and it has 4 states. NFA_FOR_SUBSTRINGS-300x90

Quiz of this Question

Last Updated : 14 Feb, 2018
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads