• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Regular languages and finite automata

Question 21

Which one of the following is TRUE? 
 

  • The language L = {anbn | n ≥ 0} is regular.

  •  The language L = {an| n is prime} is regular.

  • The language L = {w|w has 3k + 1 b's for some k ∈N with Σ = {a, b}} is regular. 

  • The language L = {ww | we Σ* with Σ = {0,1}} is regular.

Question 22

GATECS2014Q26
  • {q0, q1, q2}
  • {q0, q1}
  • {q0, q1, q2, q3}
  • {q3}

Question 23

Which of the regular expressions given below represent the following DFA? GATECS2014Q45
I) 0*1(1+00*1)*
II) 0*1*1+11*0*1
III) (0+1)*1 
  • I and II only
  • I and III only
  • II and III only
  • I, II, and III

Question 24

GATECS2014Q15 Which one of the following is CORRECT?
  • Only (I)
  • Only (II)
  • Both (I) and (II)
  • Neither (I) nor (II)

Question 25

Let L1 = {w ∈ {0,1} | w has at least as many occurrences of (110)’s as (011)’s}. 
Let L2 = { ∈ {0,1} | w has at least as many occurrences of (000)’s as (111)’s}. 
 
Which one of the following is TRUE?

  • L1 is regular but not L2

  • L2 is regular but not L!

  • Both L2 and L1 are regular

  • Neither L1 nor L2 are regular

Question 26

The length of the shortest string NOT in the language (over Σ = {a, b}) of the following regular expression is ______________.
a*b*(ba)*a*
  • 2
  • 3
  • 4
  • 5

Question 27

If s is a string over (0 + 1)* then let n0(s) denote the number of 0’s in s and n1(s) the number of 1’s in s. Which one of the following languages is not regular? GATECS2006Q297" />
  • A
  • B
  • C
  • D

Question 28

Consider the regular language L = (111 + 11111)*. The minimum number of states in any DFA accepting this languages is:

  • 3

  • 5

  • 8

  • 9

Question 29

Consider the machine M: 
 

GATECS2005Q53


The language recognized by M is :
 

  • {w ∈ {a, b}* / every a in w is followed by ex­actly two b\'s}
     

  • {w ∈ {a, b}* every a in w is followed by at least two b’}
     

  • {w ∈ {a, b}* w contains the substring \'abb\'}
     

  • {w ∈ {a, b}* w does not contain \'aa\' as a substring}
     

Question 30

Let Nf and Np denote the classes of languages accepted by non-deterministic finite automata and non-deterministic push-down automata, respectively. Let Df and Dp denote the classes of languages accepted by deterministic finite automata and deterministic push-down automata, respectively. Which one of the following is TRUE?
  • Df ⊂ Nf and Dp ⊂ Np
  • Df ⊂ Nf and Dp = Np
  • Df = Nf and Dp = Np
  • Df = Nf and Dp ⊂ Np

There are 154 questions to complete.

Last Updated :
Take a part in the ongoing discussion