0% found this document useful (0 votes)
52 views45 pages

G25 TOC 15 Sept

Uploaded by

omkar.ptl556
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views45 pages

G25 TOC 15 Sept

Uploaded by

omkar.ptl556
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

DFA- Alphabet Counting Problems

11 August 2024 08:45

L2_DFA Page 1
L2_DFA Page 2
GATE CS 2008
Given below are two finite state automata (→ indicates the start state and F indicates a final state)
Which of the following represents the product automaton Z×Y?

L2_DFA Page 3
GATE CS Mock 2018
Consider the regular language La with input alphabets ‘a’ and ‘b’ in which count of ‘a’ and ‘b’ are odd as:

La = {w∈{a,b}* ∣ |w|a∈2N+1 and |w|b∈2N+1}

What will be the minimum number of states in DFA corresponding to L a

[A]. 4 [B]. 5 [C]. 3 [D]. 6

GATE-CS-2002
The smallest finite automation which accepts the language {x | length of x is divisible by 3}
has :
[A]. 2 states [B]. 3 states [C]. 4 states [D]. 5 states

GATE-CS-2007
A minimum state deterministic finite automaton accepting the language L={w | w ε {0,1} *, number of 0s
and 1s in w are divisible by 3 and 5, respectively} has

[A]. 15 states [B]. 11 states [C]. 10 states [D]. 9 states

L2_DFA Page 4
L2_DFA Page 5
DFA Minimization
11 August 2024 12:32

L2_DFA Page 6
11 August 2024 13:09

GATE CS 2011
A deterministic finite automation (DFA)D with alphabet {a,b} is given below

Which of the following finite state machines is a valid minimal DFA which accepts the same language as
D?

GATE-CS-2007
Consider the automata given in below. The minimum state
automaton equivalent to the below FSA has the following
number of states ---------

L2_DFA Page 7
number of states ---------

L2_DFA Page 8
11 August 2024 13:38

L2_DFA Page 9
Regular Expression
25 August 2024 08:56

L3_RE Page 10
Identities of RE
25 August 2024 09:09

L3_RE Page 11
25 August 2024 09:56

GATE-IT-2004
Which one of the following regular expressions is NOT equivalent to the regular expression (a + b + c) *?
[A]. (a* + b* + c*)* [B]. (a*b*c*)* [C]. ((ab)* + c*)* [D]. (a*b* + c*)*

GATE-1992
Which of the following regular expression identities are true?
(A) r(*) = r* (B) (r*s*)* = (r + s)* (C) (r + s)* = r* + s* (D) r*s* = r* + s*

GATE CS 1996
Which two of the following four regular expressions are equivalent? (ε is the empty string).
(i). (00)*(ε+0) (ii). (00)* (iii). 0* (iv). 0(00)*
(A) (i) and (ii) (B) (ii) and (iii) (C) (i) and (iii) (D) (iii) and (iv)

GATE 1991
Let r = 1(0 + 1)* , s =11*0 and t = 1*0 be three regular expressions.
Which one of the following TRUE
[A]. L (s) ⊆ L (r) and L(s) ⊆ L(t) [B]. L (r) ⊆ L (s) and L(s) ⊆ L(t)
[C]. L (s) ⊆ L (t) and L(s) ⊆ L(r) [D]. L (t) ⊆ L (s) and L(s) ⊆ L(r)

GATE-CS-2000
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?
[A]. S ⊂ T [B]. T ⊂ S [C]. S = T [D]. S ∩ T = φ

GATE-CS-2009
Which one of the following languages over the alphabet {0,1} is
described by the regular expression: (0+1)*0(0+1)*0(0+1)*?
[A]. The set of all strings containing the substring 00
[B]. The set of all strings containing at most two 0’s
[C]. The set of all strings containing at least two 0’s
[D]. The set of all strings that begin and end with either 0 or 1

L3_RE Page 12
RL to RE
25 August 2024 10:25

L3_RE Page 13
L3_RE Page 14
25 August 2024 11:15

GATE-2008-IT
Which of the following regular expressions describes the language over {0,1} consisting of strings that contain
exactly two 1's?
[A]. (0+1)*11(0+1)* [B]. 0*110* [C]. 0*10*10* [D]. (0+1)*1(0+1)*1(0+1)*

GATE CS 2010
Let L={ w in (0 + 1)* | w has even number of 1s }, i.e. L is the set of all bit strings with even number of 1s.
Which one of the regular expression below represents L?

(A) (0*10*1)* (B) 0*(10*10*)* (C) 0*(10*1*)*0* (D) 0*1(10*1)*10*

GATE-CS-2016 (Set 1)
Which one of the following regular expressions represents the language: the set of all binary strings having
two consecutive 0s and two consecutive 1s?

GATE CS 1997 - -

Which one of the following regular expressions over {0,1} denotes the set of all strings not containing
100 as a substring?
(A) 0* (1+0)* (B) 0*1010* (C) 0*1*01* (D) 0*(10+1)*

GATE CS 1998
The string 1101 does not belong to the set represented by
(A) 110* (0+1) (B) 1(0+1)* 101 (C) (10)* (01)* (00+11)* (D) (00+(11)*0)*

L3_RE Page 15
L3_RE Page 16
RE to FA
25 August 2024 12:23

L3_RE Page 17
25 August 2024 12:32

GATE-CS-2017 (Set 1)
Consider the language L given by the regular expression (a + b) *b(a +b) over the
alphabet {a, b}. The smallest number of states needed in a deterministic finite-
state automaton (DFA) accepting L is ______.

GATE-CS-2015 (Set 2)
The number of states in the minimal deterministic finite automaton
corresponding to the regular expression (0 + 1)*(10) is ______.

GATE-CS-2015 (Set 3)
Let T be the language represented by the regular expression Σ*0011Σ* where Σ = {0, 1}. What is the
minimum number of states in a DFA that recognizes L’ (complement of L)? ……………….

GATE-CS-2016 (Set 2)
The number of states in the minimum sized DFA that accepts the language defined by the regular
expression (0+1)*(0+1)(0+1)* is……………….

GATE CS 1999
Consider the regular expression (0+1)(0+1)... n times. The minimum state finite automaton that
recognizes the language represented by this regular expression contains:
[A]. n states [B]. n+1 states [C]. n+2 states [D]. None of these

GATE-CS-2006
L3_RE Page 18
GATE-CS-2006
Consider the regular language L = (111 + 11111)*. The minimum number of states in any DFA
accepting this languages is:
[A]. 3 [B]. 5 [C]. 8 [D]. 9

L3_RE Page 19
25 August 2024 13:16

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

Consider regular expression r, where r = (11 + 111)* over Ʃ = {0, 1}. Number of states in minimal NFA
and DFA respectively are:
[A]. NFA – 3, DFA – 4 [B]. NFA – 3, DFA – 3 [C]. NFA – 3, DFA – 3 [D]. NFA – 4, DFA – 4

L3_RE Page 20
FA to RE
25 August 2024 13:23

L3_RE Page 21
25 August 2024 13:45

L3_RE Page 22
25 August 2024 13:58

GATE IT 2006
Which regular expression best describes the language accepted by the non -
deterministic automaton below?

(A) (a + b)* a(a + b)b (B) (abb)* (C) (a + b)* a(a + b)* b(a + b)* (D) (a + b)*

GATE-CS-2007
Consider the following Finite State Automaton. The language accepted by this
automaton is given by

the regular expression

GATE-CS-2014-(Set-1)
Which of the regular expressions given below represent the following DFA?

I) 0*1(1+00*1)* II) 0*1*1+11*0*1 III) (0+1)*1

(A). I and II only (B). I and III only


(C). II and III only (D). I, II, and III Only

GATE CS 2013

Consider the DFA given. Which of the following are FALSE?

1. Complement of L(A) is context-free.

2. L(A) = L((11*0+0)(0 + 1)*0*1*)

3. For the language accepted by A, A is the minimal DFA.

4. A accepts all strings over {0, 1} of length at least 2.

(A) 1 and 3 only (B) 2 and 4 only (C) 2 and 3 only (D) 3 and 4 only

L3_RE Page 23
25 August 2024 14:25

L3_RE Page 24
08 September 2024 09:05

Lang Page 25
08 September 2024 09:23

GATE-CS-2007
Which of the following is TRUE?
(A). Every subset of a regular set is regular.
(B). Every finite subset of a non-regular set is regular.
(C). The union of two non-regular sets is not regular.
(D). Infinite union of finite sets is regular.

GATE CS 1998
Which of the following statement is false?
(A) Every finite subset of a non-regular set is regular
(B) Every subset of a regular set is regular
(C) Every finite subset of a regular set is regular
(D) The intersection of two regular sets is regular

GATE-CS-2009
Which one of the following is FALSE?
(A) There is unique minimal DFA for every regular language
(B) Every NFA can be converted to an equivalent PDA.
(C) Complement of every context-free language is recursive.
(D) Every nondeterministic PDA can be converted to an equivalent deterministic PDA.

GATE-CS-2001
Which of the following statements is true?
(A) If a language is context free it can always be accepted by a deterministic push-down automaton
(B) The union of two context free languages is context free
(C) The intersection of two context free languages is context free
(D) The complement of a context free language is context free

GATE CS 1989, 1999


Context-free languages and regular languages are both closed under the operation(s) of :
(A) Union (B) Intersection (C) Concatenation (D) Complementation

GATE CS 1990
Let R1 and R2 be regular sets defined over the alphabet , then :
(A) R1  R2 is not regular (B) R1  R2 is regular
(C) * − R1 is regular (D) R1* is not regular

GATE CS 1992
Context free languages are closed under-
(A) Union, Intersection (B) Union, Kleene closure
(C) Intersection, Complement (D) Complement, Kleene closure

Lang Page 26
Context free languages are closed under-
(A) Union, Intersection (B) Union, Kleene closure
(C) Intersection, Complement (D) Complement, Kleene closure

GATE-IT 2006
Let L be a context free language and M a regular language. Then the language L  M is
(A) always regular (B) never regular (C) always a DCFL (D) always a CFL

GATE CS 1996 | Question 33


If L1 and L2 are context free languages and R a regular set, one of the languages below is not
necessarily a context free language, which one?
(A) L1 . L2 (B) L1 ∩ L2 (C) L1 ∩ R (D) L1 ∪ L2

GATE CS 1999
If L1 is a context free language and L2 as a regular language, which of the following is/are False?
I. L1-L2 is not context free

II. L1 ∩ L2 is context free

III. ~L1 is context free

IV. ~L2 is regular


(A) Only II (B) Only III (C) Both I and III (D) Both II and III

GATE CS Mock 2018 | Set 2


Let L1, L2 be any two context-free languages and R be any regular language. Then which of the
following is/are False?

(I) (L1)’∪L2∪L1 is CFL

(II) R’∪L2 is CFL

(III) R∩L1∩L2 is CFL

(IV) R∩L2 is CFL

(A) I, II and IV only (B) I and III only (C) II and IV only (D) I only

Gate IT 2005
Let L be a regular language and M be a context-free language, both over the alphabet Σ.

Let Lc and Mc denote the complements of L and M respectively.

Which of the following statements about the language Lc ∪ Mc is TRUE

(A) It is necessarily regular but not necessarily context-free

(C) It is necessarily non-regular.

Lang Page 27
Which of the following statements about the language Lc ∪ Mc is TRUE

(A) It is necessarily regular but not necessarily context-free

(C) It is necessarily non-regular.

(B) It is necessarily context-free.

(D) None of the above

Lang Page 28
08 September 2024 10:16

GATE-CS-2014-(Set-2)

Which one of the following is CORRECT?


[A]. Only (I) [B]. Only (II) [C]. Both (I) and (II) [D]. Neither (I) nor (II)

GATE-CS-1995
Let  = {0, 1}, L = * and R = {0n 1n such that n > 0} then the languages L  R and R are respectively

(A) Regular, Regular

(B) Not Regular, Regular

(C) Regular, Not Regular

(D) Not Regular, Not Regular

GATE-CS-2005
Consider the languages:

L1 = {anbncm | n, m > 0}

L2 = {anbmcm | n, m > 0}

Which one of the following statements is FALSE?


(A) L1 ∩ L2 is a context-free language

(B) L1 U L2 is a context-free language

(C) L1 and L2 are context-free language

(D) L1 ∩ L2 is a context sensitive language

GATE-CS-2009
Let L = L1∩L2, where L1 and L2 are languages as defined below:
L1 = {

| m, n >= 0 } L2 = {

| i, j, k >= 0 } then L is

Lang Page 29
| m, n >= 0 } L2 = {

| i, j, k >= 0 } then L is
(A) Not recursive (B) Regular
(C) Context free but not regular (D) Recursively enumerable but not context free.

GATE CS 2013
Consider the following languages.

Which one of the following statements is FALSE?


(A) L2 is context-free.

(B) L1 intersection L2 is context-free.

(C) Complement of L2 is recursive.

(D) Complement of L1 is context-free but not regular.

GATE-CS-2017 (Set 1)
Consider the following languages over the alphabet ∑= {a,b,c}.
L1 = {an bncm | m, n >= 0 }
L2 = {ambncn| m, n >= 0}.
Which of the following are context-free languages? I. L1 ∪ L2 II. L1 ∩ L2
(A) I only (B) II only (C) I and II (D) Neither I nor II

Gate IT 2008
Consider the following languages. L 1 = {ai bj ck | i = j, k ≥ 1} L2 = {ai bj | j = 2i, i ≥ 0}
Which of the following is true?
(A) L1 is not a CFL but L2 is
(B) L1 ∩ L2 = ∅ and L1 is non-regular
(C) L1 ∪ L2 is not a CFL but L2 is
(D) There is a 4-state PDA that accepts L1, but no DPDA that accepts L2

GATE CS 2011 | Question 24

From <https://viteduin59337-my.sharepoint.com/personal/prakash_parmar_vit_edu_in/Documents/Gate%20Notes/G21/TOC%
202021/TOC%20Final/10.%20TOC-PJP-Gate-21-Closure%20Properties%20of%20RL%20&amp;%20CFL.docx>

Lang Page 30
Language Identification
08 September 2024 10:55

New Section 2 Page 31


08 September 2024 11:09

New Section 2 Page 32


08 September 2024 11:23

✓ FA have only limited memory, It cannot compare or store or count alphabet of string. The
languages which required memory for comparison or computation are not recognized by
any FA therefore such languages are not RL.
Ex. L = a*b* is RL but L = a nbn is not RL

New Section 2 Page 33


New Section 2 Page 34
08 September 2024 11:41

New Section 2 Page 35


08 September 2024 11:48

1.

2.

3.

4.

New Section 2 Page 36


08 September 2024 11:53

New Section 2 Page 37


15 September 2024 10:12

New Section 2 Page 38


15 September 2024 10:23

1.

2.

New Section 2 Page 39


15 September 2024 10:47

New Section 2 Page 40


15 September 2024 10:56

∈ ∈





New Section 2 Page 41


15 September 2024 11:15

∈ ∈ ∈

∈ ∈ ∈

∈ ∈ ∈


New Section 2 Page 42


New Section 2 Page 43
15 September 2024 11:34

New Section 2 Page 44


15 September 2024 11:59

New Section 2 Page 45

You might also like