

InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
51. |
It is suitable to use ____________ method/methods to convert a DFA to regular expression.(a) Transitive Closure properties(b) Brzozowski method(c) State elimination method(d) All of the mentionedI have been asked this question in a job interview.I'm obligated to ask this question of Conversion by Eliminating states in division Regular Expressions and Languages of Automata Theory |
Answer» The correct ANSWER is (d) All of the mentioned |
|
52. |
A finite automaton accepts which type of language:(a) Type 0(b) Type 1(c) Type 2(d) Type 3This question was addressed to me in my homework.This intriguing question originated from Operators of Regular Expression in division Regular Expressions and Languages of Automata Theory |
Answer» CORRECT choice is (d) TYPE 3 The best I can explain: Type 3 refers to Regular Languages which is accepted by a FINITE AUTOMATON. |
|
53. |
Concatenation of R with Ф outputs:(a) R(b) Ф(c) R.Ф(d) None of the mentionedThe question was posed to me by my college director while I was bunking the class.My doubt is from Regular Expression-Introduction in portion Regular Expressions and Languages of Automata Theory |
Answer» Correct option is (b) Ф |
|
54. |
Which of the technique can be used to prove that a language is non regular?(a) Ardens theorem(b) Pumping Lemma(c) Ogden’s Lemma(d) None of the mentionedI have been asked this question in an interview.This interesting question is from Properties-Non Regular Languages in section Regular Expressions and Languages of Automata Theory |
Answer» Right option is (b) Pumping Lemma |
|
55. |
Which among the following is not a tool to construct lexical analyzer from a regular expression?(a) lex(b) flex(c) jflex(d) none of the mentionedThis question was addressed to me in an interview for job.This is a very interesting question from Lexical Analysis in chapter Regular Expressions and Languages of Automata Theory |
Answer» Correct answer is (d) none of the mentioned |
|
56. |
Let the class of language accepted by finite state machine be L1 and the class of languages represented by regular expressions be L2 then(a) L1=L2(c) L1 U L2 = .*(d) L1=L2This question was posed to me in an internship interview.My question is based upon Regular Language & Expression in chapter Regular Expressions and Languages of Automata Theory |
Answer» Correct answer is (d) L1=L2 |
|
57. |
What does grep do in UNIX?(a) It is an editor in UNIX(b) It searches for text patterns(c) Both (a) and (b)(d) None of the mentionedI had been asked this question by my school principal while I was bunking the class.My question comes from Regular Expression in UNIX topic in division Regular Expressions and Languages of Automata Theory |
Answer» Right answer is (b) It searches for text patterns |
|
58. |
Which among the following is not a UNIX command for regular expressions?(a) ed(b) sed(c) vi(d) none of the mentionedI had been asked this question in an international level competition.The query is from Regular Expression in UNIX in chapter Regular Expressions and Languages of Automata Theory |
Answer» The correct choice is (d) NONE of the mentioned |
|
59. |
Which of the following is true?(a) (01)*0 = 0(10)*(b) (0+1)*0(0+1)*1(0+1) = (0+1)*01(0+1)*(c) (0+1)*01(0+1)*+1*0* = (0+1)*(d) All of the mentionedI got this question in exam.The question is from Regular Language & Expression topic in section Regular Expressions and Languages of Automata Theory |
Answer» The CORRECT ANSWER is (d) All of the mentioned |
|
60. |
(a+b)* is equivalent to(a) b*a*(b) (a*b*)*(c) a*b*(d) none of the mentionedThis question was addressed to me in exam.The origin of the question is Regular Language & Expression topic in section Regular Expressions and Languages of Automata Theory |
Answer» Right CHOICE is (B) (a*b*)* |
|
61. |
Regular expression {0,1} is equivalent to(a) 0 U 1(b) 0 / 1(c) 0 + 1(d) All of the mentionedThe question was posed to me in exam.I would like to ask this question from Regular Language & Expression in division Regular Expressions and Languages of Automata Theory |
Answer» The correct ANSWER is (d) All of the mentioned |
|
62. |
Generate a regular expression for the given language:lL(x): {xÎ{0,1}*| x ends with 1 nd does not contain a substring 01}(a) (0+01)*(b) (0+01)*1(c) (0+01)*(1+01)(d) All of the mentionedThis question was posed to me by my college director while I was bunking the class.The query is from DFA to Regular Expressions in portion Regular Expressions and Languages of Automata Theory |
Answer» Right option is (C) (0+01)*(1+01) |
|
63. |
State true or false:Statement: A regular expression is a sequence of characters that represent a pattern.(a) Statement: A regular expression is a sequence of characters that represent a pattern.(b) true(c) falseI got this question by my school teacher while I was bunking the class.My question comes from Regular Expression in UNIX topic in section Regular Expressions and Languages of Automata Theory |
Answer» Correct CHOICE is (a) Statement: A regular EXPRESSION is a sequence of characters that represent a pattern. |
|
64. |
Statement: A digit, when used in the CFG notation, will always be used as a terminal.(a) State true or false?(b) True(c) FalseI had been asked this question by my school teacher while I was bunking the class.My query is from Finding Patterns in Text,Algebric Laws and Derivatives in portion Regular Expressions and Languages of Automata Theory |
Answer» Correct CHOICE is (a) State true or false? |
|
65. |
The following is/are an approach to process a regexp:(a) Contruction of NFA and subsequently, a DFA.(b) Thompson’s Contruction Algorithm(c) Both (a) and (b)(d) None of the mentionedThe question was posed to me in homework.My question is from Converting Regular Expressions to Automata topic in portion Regular Expressions and Languages of Automata Theory |
Answer» The CORRECT answer is (c) Both (a) and (b) |
|
66. |
Which of the following statements is not true?(a) Every language defined by any of the automata is also defined by a regular expression(b) Every language defined by a regular expression can be represented using a DFA(c) Every language defined by a regular expression can be represented using NFA with e moves(d) Regular expression is just another representation for any automata definitionThis question was addressed to me in exam.The query is from DFA to Regular Expressions topic in chapter Regular Expressions and Languages of Automata Theory |
Answer» Correct choice is (b) Every LANGUAGE defined by a REGULAR expression can be represented using a DFA |
|
67. |
L and ~L are recursive enumerable then L is(a) Regular(b) Context free(c) Context sensitive(d) RecursiveI had been asked this question in an interview.My query is from Regular Language & Expression in portion Regular Expressions and Languages of Automata Theory |
Answer» CORRECT choice is (d) RECURSIVE Explanation: If L is recursive ENUMERABLE and its COMPLEMENT too if and only if L is recursive. |
|
68. |
A language is regular if and only if(a) accepted by DFA(b) accepted by PDA(c) accepted by LBA(d) accepted by Turing machineI got this question by my college professor while I was bunking the class.I'd like to ask this question from Regular Language & Expression in section Regular Expressions and Languages of Automata Theory |
Answer» RIGHT OPTION is (a) accepted by DFA The explanation: All of above machine can accept regular LANGUAGE but all STRING accepted by machine is regular only for DFA. |
|
69. |
a? is equivalent to(a) a(b) a+Φ(c) a+ϵ(d) wrong expressionI had been asked this question by my school teacher while I was bunking the class.This is a very interesting question from Regular Language & Expression topic in portion Regular Expressions and Languages of Automata Theory |
Answer» CORRECT OPTION is (c) a+ϵ The BEST EXPLANATION: Zero or one time REPETITION of previous character . |
|
70. |
If R represents a regular language, which of the following represents the Venn-diagram most correctly?(a) An Irregular Set(b) R*(c) R complement(d) R reverseThis question was posed to me in an internship interview.Origin of the question is Regular Expression-Introduction in portion Regular Expressions and Languages of Automata Theory |
Answer» Correct option is (b) R* |
|
71. |
Which of the following is the task of lexical analysis?(a) To build the uniform symbol table(b) To initialize the variables(c) To organize the variables in a lexical order(d) None of the mentionedThe question was asked in an online interview.My query is from Lexical Analysis topic in division Regular Expressions and Languages of Automata Theory |
Answer» The correct answer is (a) To build the UNIFORM symbol table |
|
72. |
Concatenation Operation refers to which of the following set operations:(a) Union(b) Dot(c) Kleene(d) Two of the options are correctI had been asked this question during an online interview.My query is from Regular Expression-Introduction in chapter Regular Expressions and Languages of Automata Theory |
Answer» Correct option is (b) Dot |
|
73. |
Which of the following is an utility of state elimination phenomenon?(a) DFA to NFA(b) NFA to DFA(c) DFA to Regular Expression(d) All of the mentionedI had been asked this question in class test.The above asked question is from Conversion by Eliminating states in section Regular Expressions and Languages of Automata Theory |
Answer» The correct CHOICE is (c) DFA to Regular Expression |
|
74. |
The finite automata accept the following languages:(a) Context Free Languages(b) Context Sensitive Languages(c) Regular Languages(d) All the mentionedThis question was posed to me at a job interview.Question is taken from Building Regular Expressions in chapter Regular Expressions and Languages of Automata Theory |
Answer» The correct ANSWER is (c) Regular Languages |
|
75. |
Which of the following language regular?(a) {a^ib^i|i>=0}(b) {a^ib^i|0 |
Answer» RIGHT option is (b) {a^ib^i|0 For explanation: Here, i has limits i.e. the language is finite, contains few elements and can be GRAPHED USING a deterministic finite automata. THUS, it is regular. Others can be proved non regular using Pumping LEMMA. |
|
76. |
____________ is used for grouping up of characters into token.(a) Lexical Analyzer(b) oolex(c) jflex(d) All of the mentionedThis question was posed to me during an internship interview.My question comes from Lexical Analysis in portion Regular Expressions and Languages of Automata Theory |
Answer» The CORRECT option is (d) All of the mentioned |
|
77. |
What is the significance of (dollarSign) used in regular expression in UNIX?(a) Matches the beginning of the line(b) Matches the end of lines(c) Matches any single character(d) None of the mentionedI got this question during an internship interview.My doubt is from Regular Expression in UNIX in portion Regular Expressions and Languages of Automata Theory |
Answer» Correct OPTION is (b) Matches the end of lines |
|
78. |
Lexemes can be referred to as:(a) elements of lexicography(b) sequence of alphanumeric characters in a token(c) lexical errors(d) none of the mentionedI got this question by my school teacher while I was bunking the class.I want to ask this question from Lexical Analysis in division Regular Expressions and Languages of Automata Theory |
Answer» Right choice is (b) sequence of alphanumeric CHARACTERS in a TOKEN |
|
79. |
How many strings of length less than 4 contains the language described by the regular expression (x+y)*y(a+ab)*?(a) 7(b) 10(c) 12(d) 11This question was addressed to me in an interview for job.My enquiry is from Regular Language & Expression in section Regular Expressions and Languages of Automata Theory |
Answer» Right answer is (c) 12 |
|
80. |
The given NFA represents which of the following NFA(a) (ab U a) *(b) (a*b* U a*)(c) (ab U a*)(d) (ab)* U a*I got this question in an online interview.The question is from Building Regular Expressions topic in portion Regular Expressions and Languages of Automata Theory |
Answer» Correct answer is (a) (ab U a) * |
|
81. |
State true or false:Statement: For every removed state, there is a regular expression produced.(a) true(b) falseThis question was posed to me in an interview for job.Origin of the question is Conversion by Eliminating states in chapter Regular Expressions and Languages of Automata Theory |
Answer» Correct answer is (a) true |
|
82. |
Which of the following languages have built in regexps support?(a) Perl(b) Java(c) Python(d) C++I got this question during an online exam.This interesting question is from Converting Regular Expressions to Automata topic in portion Regular Expressions and Languages of Automata Theory |
Answer» Correct choice is (a) Perl |
|
83. |
What kind of expressions do we used for pattern matching?(a) Regular Expression(b) Rational Expression(c) Regular & Rational Expression(d) None of the mentionedI have been asked this question in an interview for job.This question is from Converting Regular Expressions to Automata in section Regular Expressions and Languages of Automata Theory |
Answer» The correct answer is (c) Regular & RATIONAL Expression |
|
84. |
Regular Expression R and the language it describes can be represented as:(a) R, R(L)(b) L(R), R(L)(c) R, L(R)(d) All of the mentionedI have been asked this question in class test.Origin of the question is Building Regular Expressions topic in chapter Regular Expressions and Languages of Automata Theory |
Answer» Right OPTION is (c) R, L(R) |
|
85. |
According to the precedence rules, x-y-z is equivalent to which of the following?(a) (x-y)-z(b) x-(y-z)(c) Both (x-y)-z and x-(y-z)(d) None of the mentionedThis question was addressed to me in an internship interview.My query is from Building Regular Expressions in portion Regular Expressions and Languages of Automata Theory |
Answer» The correct choice is (a) (x-y)-Z |
|
86. |
A program that performs lexical analysis is termed as:(a) scanner(b) lexer(c) tokenizer(d) all of the mentionedI got this question in an internship interview.My question is based upon Lexical Analysis in portion Regular Expressions and Languages of Automata Theory |
Answer» The correct CHOICE is (d) all of the mentioned |
|
87. |
Are the given two patterns equivalent?(a) gray|grey(b) gr(a|e)y(c) yes(d) noI have been asked this question in an online quiz.This key question is from Converting Regular Expressions to Automata topic in chapter Regular Expressions and Languages of Automata Theory |
Answer» The correct choice is (a) gray|grey |
|
88. |
Regular grammar is(a) context free grammar(b) non context free grammar(c) english grammar(d) none of the mentionedI got this question in an online quiz.My enquiry is from Regular Language & Expression in chapter Regular Expressions and Languages of Automata Theory |
Answer» CORRECT CHOICE is (a) CONTEXT FREE grammar The best I can explain: Regular grammar is subset of context free grammar. |
|
89. |
Which of the following is true?(a) Every subset of a regular set is regular(b) Every finite subset of non-regular set is regular(c) The union of two non regular set is not regular(d) Infinite union of finite set is regularThis question was posed to me at a job interview.This key question is from Regular Language & Expression topic in division Regular Expressions and Languages of Automata Theory |
Answer» Right OPTION is (B) Every finite subset of non-regular set is regular |
|
90. |
A regular language over an alphabet a is one that can be obtained from(a) union(b) concatenation(c) kleene(d) All of the mentionedThe question was posed to me in an interview for internship.The query is from Regular Language & Expression topic in chapter Regular Expressions and Languages of Automata Theory |
Answer» RIGHT answer is (d) All of the mentioned To explain I would SAY: NONE. |
|
91. |
Generate a regular expression for the following problem statement:P(x): String of length 6 or less for å={0,1}*(a) (1+0+e)6(b) (10)6(c) (1+0)(1+0)(1+0)(1+0)(1+0)(1+0)(d) More than one of the mentioned is correctThis question was posed to me at a job interview.Query is from DFA to Regular Expressions topic in division Regular Expressions and Languages of Automata Theory |
Answer» The CORRECT CHOICE is (a) (1+0+e)6 |
|
92. |
Which among the following is not an associative operation?(a) Union(b) Concatenation(c) Dot(d) None of the mentionedThis question was addressed to me in an online interview.My doubt stems from Building Regular Expressions topic in chapter Regular Expressions and Languages of Automata Theory |
Answer» Right answer is (d) None of the mentioned |
|
93. |
(a + b*c) most correctly represents:(a) (a +b) *c(b) (a)+((b)*.c)(c) (a + (b*)).c(d) a+ ((b*).c)I have been asked this question in an interview for job.I need to ask this question from Building Regular Expressions in chapter Regular Expressions and Languages of Automata Theory |
Answer» The correct choice is (d) a+ ((B*).C) |
|
94. |
A language can be generated from simple primitive language in a simple way if and only if(a) It is recognized by a device of infinite states(b) It takes no auxiliary memory(c) Both are correct(d) Both are wrongThe question was asked in my homework.The doubt is from Regular Expression-Introduction topic in chapter Regular Expressions and Languages of Automata Theory |
Answer» Correct OPTION is (b) It takes no auxiliary memory |
|