Skip to content
Related Articles

Related Articles

GATE | GATE CS 2010 | Question 65

View Discussion
Improve Article
Save Article
  • Last Updated : 14 Feb, 2018

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.


Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!