• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Regular languages and finite automata

Question 41

Consider the following languages [tex]L1=\\left \\{ ww|w\\in \\left \\{ a,b \\right \\}*\\right \\}[/tex] [tex]L2=\\left \\{ ww^{R}|w\\in \\left \\{ a,b \\right \\}*, w^{R} is\\ the\\ reverse\\ of\\right\\ w \\}[/tex] [tex]L3=\\left \\{ 0^{2i}| i\\ is\\ an\\ integer \\}[/tex] [tex]L4=\\left \\{ 0^{i^{2}}| i\\ is\\ an\\ integer \\}[/tex] Which of the languages are regular?

  • Only L1 and L2

  • Only L2, L3 and L4

  • Only L3 and L4

  • Only L3

Question 42

Let S and T be language over Σ = {a,b} represented by the regular expressions (a+b*)* and (a+b)*, respectively. Which of the following is true?
  • S ⊂ T
  • T ⊂ S
  • S = T
  • S ∩ T = φ

Question 43

Let L denotes the language generated by the grammar S -> 0S0/00. Which of the following is true?

  • L = 0+

  • L is regular but not 0+

  • L is context free but not regular

  • L is not context free

Question 44

What can be said about a regular language L over {a} whose minimal finite state automaton has two states?
  • L must be {an| n is odd}
  • L must be {an| n is even}
  • L must be {an| ³ O}
  • Either L must be {an | n is odd}, or L must be {an | n is even}

Question 45

Consider the following Deterministic Finite Automata Automata Which of the following is true?
  • It only accepts strings with prefix as "aababb"
  • It only accepts strings with substring as "aababb"
  • It only accepts strings with suffix as "aababb"
  • None of the above

Question 46

How many minimum states are required in a DFA to find whether a given binary string has odd number of 0\'s or not, there can be any number of 1\'s.
  • 1
  • 2
  • 3
  • 4

Question 47

Consider the DFAs M and N given above. The number of states in a minimal DFA that accepts the language L(M) ∩ L(N) is __________.

  • 0

  • 1

  • 2

  • 3

Question 48

Consider alphabet ∑ = {0, 1}, the null/empty string λ and the sets of strings X0, X1 and X2 generated by the corresponding non-terminals of a regular grammar. X0, X1 and X2 are related as follows:
X0 = 1 X1
X1 = 0 X1 + 1 X2
X2 = 0 X1 + {λ} 
Which one of the following choices precisely represents the strings in X0?
  • 10 (0* + (10)*)1
  • 10 (0* + (10)*)*1
  • 1(0* + 10)*1
  • 10 (0 + 10)*1 + 110 (0 + 10)*1

Question 49

Which of the following languages is/are regular?
L1: {wxwR ⎪ w, x ∈ {a, b}* and ⎪w⎪, ⎪x⎪ >0} wR is the reverse of string w
L2: {anbm ⎪m ≠ n and m, n≥0
L3: {apbqcr ⎪ p, q, r ≥ 0}  
  • L1 and L3 only
  • L2 only
  • L2 and L3 only
  • L3 only

Question 50

The number of states in the minimal deterministic finite automaton corresponding to the regular expression (0 + 1)*(10) is ____________
  • 2
  • 3
  • 4
  • 5
1

...

456

...

16

There are 154 questions to complete.

Last Updated :
Take a part in the ongoing discussion