GATE||Regular Language and Finite Automata|| Pyq (2010 to2025)

Last Updated :
Discuss
Comments

Question 1

Consider the 5-state DFA 𝑀 accepting the language 𝐿(𝑀) βŠ‚ (0 + 1) βˆ— shown below. For any string 𝑀 ∈ (0 + 1) βˆ— let 𝑛0(𝑀) be the number of 0 β€² 𝑠 in 𝑀 and 𝑛1(𝑀) be the number of 1′𝑠 in 𝑀.

Screenshot-2025-09-01-113527
.


Which of the following statements is/are FALSE?

[GATE 2024||SET-1 MSQ|| 2-mark]


  • States 2 and 4 are distinguishable in 𝑀

  • States 3 and 4 are distinguishable in 𝑀

  • States 2 and 5 are distinguishable in 𝑀

  • Any string 𝑀 with 𝑛0 (𝑀) = 𝑛1(𝑀) is in 𝐿(𝑀)

Question 2

Let Ξ£ = {π‘Ž, 𝑏, 𝑐}. For π‘₯ ∈ Ξ£ βˆ— , and 𝛼 ∈ Ξ£, let #𝛼(π‘₯) denote the number of occurrences of 𝛼 in π‘₯. Which one or more of the following option(s) define(s) regular language(s)?

[GATE 2025||SET-2 MSQ|| 2-mark]

  • {π‘Ž π‘šπ‘ 𝑛 | π‘š, 𝑛 β‰₯ 0}

  • {π‘Ž, 𝑏} βˆ— ∩ {π‘Žπ‘šπ‘π‘› π‘π‘šβˆ’π‘› | π‘š β‰₯ 𝑛 β‰₯ 0}

  • {𝑀 | 𝑀 ∈ {π‘Ž, 𝑏} βˆ— , #π‘Ž (𝑀) ≑ 2 (mod 7), and #𝑏 (𝑀) ≑ 3 (mod 9)}

  • {𝑀 | 𝑀 ∈ {π‘Ž, 𝑏} βˆ— , #π‘Ž (𝑀) ≑ 2 (mod 7), and #π‘Ž (𝑀) = #𝑏(𝑀)}

Question 3

Consider the two lists List I and List II given below:

List 1

List 2

(i) Context free languages

(a) Closed under union

(ii) Recursive languages

(b) Not closed under complementation

(iii) Regular languages

(c) Closed under intersection

For matching of items in List I with those in List II, which of the following option(s) is/are CORRECT?

[GATE 2025||SET-2 MSQ|| 1-mark]


  • (i) – (a), (ii) – (b), and (iii) – (c)

  • (i) – (b), (ii) – (a), and (iii) – (c)

  • (i) – (b), (ii) – (c), and (iii) – (a)

  • (i) – (a), (ii) – (c), and (iii) – (b)

Question 4

Consider a finite state machine (FSM) with one input 𝑋 and one output 𝑓, represented by the given state transition table. The minimum number of states required to realize this FSM is ________. (Answer in integer)

Screenshot_2025-09-01_121813-removebg-preview
.


[GATE 2025||SET-1 NAT|| 2-mark]

  • 5

Question 5

Consider the following deterministic finite automaton (DFA) defined over the alphabet, Ξ£ = {π‘Ž, 𝑏}. Identify which of the following language(s) is/are accepted by the given DFA.

Screenshot-2025-10-17-125247
.

[GATE 2025||SET-2 MSQ|| 2-mark]


  • The set of all strings containing an even number of 𝑏’s.

  • The set of all strings containing the pattern π‘π‘Žπ‘.

  • The set of all strings ending with the pattern π‘π‘Žπ‘.

  • The set of all strings not containing the pattern π‘Žπ‘π‘Ž.

Question 6

Consider the following two languages over the alphabet {π‘Ž, 𝑏}:
𝐿1 = { 𝛼𝛽𝛼 | 𝛼 ∈ {π‘Ž, 𝑏}+ AND 𝛽 ∈ {π‘Ž, 𝑏}+ }
𝐿2 = { 𝛼𝛽𝛼 | 𝛼 ∈ {π‘Ž}+ AND 𝛽 ∈ {π‘Ž, 𝑏}+ }

Which ONE of the following statements is CORRECT?

[GATE 2025||SET-1 MCQ|| 2-mark]


  • Both 𝐿1 and 𝐿2 are regular languages.

  • 𝐿1 is a regular language but 𝐿2 is not a regular language.

  • 𝐿1 is not a regular language but 𝐿2 is a regular language.

  • Neither 𝐿1 nor 𝐿2 is a regular language.

Question 7

Let 𝑆 be the set of all ternary strings defined over the alphabet {π‘Ž, 𝑏, 𝑐}. Consider all strings in 𝑆 that contain at least one occurrence of two consecutive symbols, that is, β€œaa”, β€œbb” or β€œcc”. The number of such strings of length 5 that are possible is _______. (Answer in integer)

[GATE 2025||SET-1 NAT|| 1-mark]


  • 195

Question 8

A regular language 𝐿 is accepted by a non-deterministic finite automaton (NFA) with 𝑛 states. Which of the following statement(s) is/are FALSE?

[GATE 2025||SET-1 MSQ|| 1-mark]



  • 𝐿 may have an accepting NFA with < 𝑛 states.

  • 𝐿 may have an accepting DFA with < 𝑛 states.

  • There exists a DFA with ≀ 2𝑛 states that accepts 𝐿.

  • Every DFA that accepts 𝐿 has > 2𝑛 states.

Question 9

Consider the following two regular expressions over the alphabet {0,1}:
π‘Ÿ = 0 βˆ— + 1 βˆ—
𝑠 = 01 βˆ— + 10 βˆ—
The total number of strings of length less than or equal to 5, which are neither in π‘Ÿ nor in 𝑠, is _________

[GATE 2024||SET-1 NAT|| 2-mark]



  • 44

Question 10

Let Ξ£ = {1,2,3,4}. For π‘₯ ∈ Ξ£ βˆ— , let π‘π‘Ÿπ‘œπ‘‘(π‘₯) be the product of symbols in π‘₯ modulo 7. We take π‘π‘Ÿπ‘œπ‘‘(πœ–) = 1, where πœ– is the null string.
For example, π‘π‘Ÿπ‘œπ‘‘(124) = (1 Γ— 2 Γ— 4) mod 7 = 1.
Define 𝐿 = {π‘₯ ∈ Ξ£ βˆ— | π‘π‘Ÿπ‘œπ‘‘(π‘₯) = 2}.
The number of states in a minimum state DFA for 𝐿 is ___________. (Answer in integer)

[GATE 2025||SET-2 NAT|| 2-mark]

  • 6

There are 66 questions to complete.

Take a part in the ongoing discussion