

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.
1. |
A___________ is context free grammar with atmost one non terminal in the right handside of the production.(a) linear grammar(b) linear bounded grammar(c) regular grammar(d) none of the mentionedThe question was asked during an online interview.My question is based upon CFL- Closure Properties/Decision Properties in division Properties of Context Free Languages of Automata Theory |
Answer» The correct option is (a) LINEAR GRAMMAR |
|
2. |
Let G be a grammar. When the production in G satisfy certain restrictions, then G is said to be in ___________.(a) restricted form(b) parsed form(c) normal form(d) all of the mentionedThis question was addressed to me during an online interview.This intriguing question originated from Chomsky Normal Form topic in division Properties of Context Free Languages of Automata Theory |
Answer» Correct CHOICE is (C) normal form |
|
3. |
In which of the following, does the CNF conversion find its use?(a) CYK Algorithm(b) Bottom up parsing(c) Preprocessing step in some algorithms(d) All of the mentionedI have been asked this question by my school principal while I was bunking the class.Enquiry is from Chomsky Normal Form in division Properties of Context Free Languages of Automata Theory |
Answer» Right option is (d) All of the mentioned |
|
4. |
Using the pumping constant n, If there is a string in the language of length between _____ and ____ then the language is infite else not.(a) n, 2n-1(b) 2n, n(c) n+1, 3n+6(d) 0, n+1The question was posed to me during an online interview.Asked question is from CFL- Closure Properties/Decision Properties topic in division Properties of Context Free Languages of Automata Theory |
Answer» The correct answer is (a) N, 2n-1 |
|
5. |
If L1 and L2 are context free languages, L1-L2 are context free:(a) always(b) sometimes(c) never(d) none of the mentionedThis question was posed to me in quiz.This intriguing question comes from CFL- Closure Properties/Decision Properties topic in portion Properties of Context Free Languages of Automata Theory |
Answer» The correct CHOICE is (c) never |
|
6. |
What is the pumping length of string of length x?(a) x+1(b) x(c) x-1(d) x2This question was addressed to me during an online interview.This interesting question is from Pumping Lemma for Context Free Language in division Properties of Context Free Languages of Automata Theory |
Answer» Correct option is (a) x+1 |
|
7. |
The pumping lemma is often used to prove that a language is:(a) Context free(b) Not context free(c) Regular(d) None of the mentionedThis question was posed to me in homework.I want to ask this question from Pumping Lemma for Context Free Language in section Properties of Context Free Languages of Automata Theory |
Answer» Right CHOICE is (b) Not context free |
|
8. |
Which of the following does not have left recursions?(a) Chomsky Normal Form(b) Greibach Normal Form(c) Backus Naur Form(d) Allof the mentionedI have been asked this question in a national level competition.Enquiry is from Chomsky Normal Form in portion Properties of Context Free Languages of Automata Theory |
Answer» Right answer is (b) Greibach Normal Form |
|
9. |
The use of variable dependency graph is in:(a) Removal of useless variables(b) Removal of null productions(c) Removal of unit productions(d) None of the mentionedI have been asked this question in unit test.This key question is from Eliminating Epsilon Productions topic in section Properties of Context Free Languages of Automata Theory |
Answer» The CORRECT option is (a) Removal of USELESS variables |
|
10. |
Inorder to simplify a context free grammar, we can skip the following operation:(a) Removal of null production(b) Removal of useless symbols(c) Removal of unit productions(d) None of the mentionedI got this question in homework.This interesting question is from CFG-Eliminating Useless Symbols in chapter Properties of Context Free Languages of Automata Theory |
Answer» Correct choice is (d) None of the mentioned |
|
11. |
Which of the following belong to the steps to prove emptiness?(a) Remove useless variable(b) Check if a start variable S is useless(c) Both (a) and (b)(d) None of the mentionedThe question was posed to me in class test.My enquiry is from Intersection with Regular Languages in section Properties of Context Free Languages of Automata Theory |
Answer» CORRECT option is (c) Both (a) and (b) Explanation: The empty-language question can be stated as: For context free GRAMMAR G FIND if L(G) =f? |
|
12. |
Which of the following is not context free?(a) {w: nA=nB=nC}(b) {a*b*c*}(c) {a^100b^100}(d) All of the mentionedI have been asked this question in a national level competition.This interesting question is from Intersection with Regular Languages in section Properties of Context Free Languages of Automata Theory |
Answer» Right choice is (d) All of the mentioned |
|
13. |
Which of the following is called Bar-Hillel lemma?(a) Pumping lemma for regular language(b) Pumping lemma for context free languages(c) Pumping lemma for context sensitive languages(d) None of the mentionedI have been asked this question by my school principal while I was bunking the class.My question is from Pumping Lemma for Context Free Language topic in portion Properties of Context Free Languages of Automata Theory |
Answer» Correct option is (B) Pumping lemma for CONTEXT free languages |
|
14. |
Which of the production rule can be accepted by Chomsky grammar?(a) A->BC(b) A->a(c) S->e(d) All of the mentionedThe question was asked in my homework.This intriguing question comes from Chomsky Normal Form in section Properties of Context Free Languages of Automata Theory |
Answer» Correct choice is (d) All of the mentioned |
|
15. |
Let G=(V, T, P, S) be a CFG such that _____________. Then there exists an equivalent grammar G’ having no e productions.(a) e ∈ L(G)(b) w ∉ L(G)(c) e ∉ L(G)(d) w ∈ L(G)I got this question in class test.Origin of the question is Eliminating Epsilon Productions in division Properties of Context Free Languages of Automata Theory |
Answer» Correct answer is (C) e ∉ L(G) |
|
16. |
Statement:(a) For A-> e ,A can be erased. So whenever it appears on the left side of a production, replace with another production without the A.(b) State true or false:(c) true(d) falseThe question was posed to me in my homework.This intriguing question originated from Eliminating Epsilon Productions in section Properties of Context Free Languages of Automata Theory |
Answer» Correct answer is (B) State true or FALSE: |
|
17. |
Which of the following can be used to prove a language is not context free?(a) Ardens theorem(b) Power Construction method(c) Regular Closure(d) None of the mentionedThis question was addressed to me in exam.Origin of the question is Intersection with Regular Languages topic in section Properties of Context Free Languages of Automata Theory |
Answer» Right option is (c) REGULAR CLOSURE |
|
18. |
The standard version of CYK algorithm operates only on context free grammars in the following form:(a) Greibach Normal form(b) Chomsky Normal form(c) Backus Naur form(d) All of the mentionedI had been asked this question in final exam.My enquiry is from CFL- Other Normal Forms in section Properties of Context Free Languages of Automata Theory |
Answer» Correct option is (b) CHOMSKY Normal FORM |
|
19. |
Which of the following can generate Unrestricted grammars?(a) Pentonnen Normal form(b) Floyd Normal form(c) Greibach Normal form(d) None of the mentionedThe question was posed to me during an online interview.The above asked question is from CFL- Other Normal Forms in section Properties of Context Free Languages of Automata Theory |
Answer» Correct choice is (a) Pentonnen NORMAL form |
|
20. |
The format: A->aB refers to which of the following?(a) Chomsky Normal Form(b) Greibach Normal Form(c) Backus Naur Form(d) None of the mentionedThe question was asked during an interview.I'd like to ask this question from Chomsky Normal Form topic in chapter Properties of Context Free Languages of Automata Theory |
Answer» The correct answer is (b) GREIBACH Normal Form |
|
21. |
Which of the following steps are wrong with respect to infiniteness problem?(a) Remove useless variables(b) Remove unit and epsilon production(c) Create dependency graph for variables(d) If there is a loop in the dependency graph the the language is finite else infiniteI have been asked this question in examination.My question is based upon Intersection with Regular Languages topic in division Properties of Context Free Languages of Automata Theory |
Answer» Right option is (d) If there is a LOOP in the dependency graph the the language is finite else INFINITE |
|
22. |
Every Kuroda Normal form grammar generates ___________(a) Context free grammar(b) Context sensitive grammar(c) Unrestricted grammar(d) None of the mentionedThis question was addressed to me in class test.Origin of the question is CFL- Other Normal Forms topic in chapter Properties of Context Free Languages of Automata Theory |
Answer» Correct answer is (b) Context sensitive grammar |
|
23. |
The intersection of context free language and regular language is _________(a) regular language(b) context free language(c) context sensitive language(d) non of the mentionedThis question was posed to me in an interview for internship.The origin of the question is Intersection with Regular Languages topic in chapter Properties of Context Free Languages of Automata Theory |
Answer» The CORRECT option is (b) CONTEXT free language |
|
24. |
Which of the following is true for CYK Algorithm?(a) Triangular Table(b) Circular Chart(c) Linked List(d) None of the mentionedThe question was asked by my college director while I was bunking the class.My enquiry is from Intersection with Regular Languages topic in section Properties of Context Free Languages of Automata Theory |
Answer» The CORRECT OPTION is (a) Triangular Table |
|
25. |
Context free languages are not closed under:(a) Intersection(b) Intersection with Regular Language(c) Complement(d) All of the mentionedI had been asked this question by my college professor while I was bunking the class.I want to ask this question from CFL- Closure Properties/Decision Properties topic in chapter Properties of Context Free Languages of Automata Theory |
Answer» Correct option is (d) All of the mentioned |
|
26. |
The variable which produces an epsilon is called:(a) empty variable(b) nullable(c) terminal(d) all of the mentionedThe question was posed to me in an online quiz.My question is based upon Eliminating Epsilon Productions topic in chapter Properties of Context Free Languages of Automata Theory |
Answer» RIGHT CHOICE is (b) NULLABLE Easy explanation: Any variable A for which the DERIVATION: A->*e is POSSIBLE is called Nullable. |
|
27. |
Which of the following are valid membership algorithms?(a) CYK algorithm(b) Exhaustive search parser(c) Both (a) and (b)(d) None of the mentionedI have been asked this question in exam.This intriguing question originated from Intersection with Regular Languages topic in section Properties of Context Free Languages of Automata Theory |
Answer» The CORRECT ANSWER is (c) Both (a) and (B) |
|
28. |
Every grammar in Chomsky Normal Form is:(a) regular(b) context sensitive(c) context free(d) all of the mentionedThis question was posed to me during an interview for a job.I'm obligated to ask this question of Chomsky Normal Form in portion Properties of Context Free Languages of Automata Theory |
Answer» Correct option is (c) context free |
|
29. |
Which among the following can parse a context free grammar?(a) top down parser(b) bottom up parser(c) CYK algorithm(d) all of the mentionedI got this question in examination.I want to ask this question from CFL- Other Normal Forms in chapter Properties of Context Free Languages of Automata Theory |
Answer» Correct answer is (d) all of the mentioned |
|
30. |
Given grammar G:S->aAS-> A| B| CA-> aAa| BB-> bB|bbC->aCaa|DD->baD|abD|aaEliminate e and unit productions and state the number of variables left?(a) 5(b) 4(c) 3(d) 2The question was asked during an internship interview.I need to ask this question from Eliminating Unit Productions in division Properties of Context Free Languages of Automata Theory |
Answer» Right choice is (a) 5 |
|
31. |
A can be A-> derivable if and only if __________(a) A-> A is actually a production(b) A->B, B-> A exists(c) Both (a) and (b)(d) None of the mentionedI have been asked this question by my school teacher while I was bunking the class.Query is from Eliminating Unit Productions in portion Properties of Context Free Languages of Automata Theory |
Answer» Right option is (a) A-> A is actually a production |
|
32. |
If grammar G is unambiguous, G’ produced after the removal of Unit production will be:(a) ambiguous(b) unambiguous(c) finite(d) cannot be saidThis question was posed to me in an international level competition.The origin of the question is Eliminating Unit Productions in portion Properties of Context Free Languages of Automata Theory |
Answer» Right answer is (b) unambiguous |
|
33. |
Which among the following is the format of unit production?(a) A->B(b) A->b(c) B->Aa(d) None of the mentionedThe question was asked in homework.This key question is from Eliminating Unit Productions topic in portion Properties of Context Free Languages of Automata Theory |
Answer» The correct option is (a) A->B |
|
34. |
Which of the following is regular?(a) a^100b^100(b) (a+b)*-{a^100b^100}(c) Both (a) and (b)(d) None of the mentionedI got this question in an interview for internship.My query is from Intersection with Regular Languages in section Properties of Context Free Languages of Automata Theory |
Answer» The correct choice is (C) Both (a) and (b) |
|
35. |
Which of the following is not a negative property of Context free languages?(a) Intersection(b) Complement(c) Both (a) and (b)(d) None of the mentionedI had been asked this question in an interview for job.Origin of the question is Intersection with Regular Languages topic in division Properties of Context Free Languages of Automata Theory |
Answer» The correct ANSWER is (c) Both (a) and (b) |
|
36. |
State true or false:Statement: We cannot use Ogden’s lemma when pumping lemma fails.(a) Statement: We cannot use Ogden’s lemma when pumping lemma fails.(b) true(c) falseThe question was posed to me in an interview for internship.My question is taken from Pumping Lemma for Context Free Language in division Properties of Context Free Languages of Automata Theory |
Answer» The correct answer is (B) true |
|
37. |
Simplify the given grammar:A-> a| aaA| abBcB-> abba| b (a) A-> a| aaA| ababbAc| abbc(b) A-> a| aaA| ababbAc| abbc, B-> abba|b(c) A-> a| aaA| abbc, B->abba(d) None of the mentionedThe question was asked in an online interview.My enquiry is from CFG-Eliminating Useless Symbols in division Properties of Context Free Languages of Automata Theory |
Answer» Correct CHOICE is (a) A-> a| aaA| ababbAc| abbc |
|
38. |
Given a grammar in GNF and a derivable string in the grammar with the length n, any ___________will halt at depth n.(a) top-down parser(b) bottom-up parser(c) multitape turing machine(d) none of the mentionedI have been asked this question by my college professor while I was bunking the class.The query is from CFL- Other Normal Forms in section Properties of Context Free Languages of Automata Theory |
Answer» The CORRECT option is (a) top-down parser |
|
39. |
Suppose A->xBz and B->y, then the simplified grammar would be:(a) A->xyz(b) A->xBz|xyz(c) A->xBz|B|y(d) none of the mentionedI got this question by my school principal while I was bunking the class.I would like to ask this question from CFG-Eliminating Useless Symbols topic in section Properties of Context Free Languages of Automata Theory |
Answer» The correct choice is (a) A->XYZ |
|
40. |
Which of the following is/are CFL not closed under?(a) Reverse(b) Homomorphism(c) Inverse Homomorphism(d) All of the mentionedThe question was asked in quiz.I would like to ask this question from CFL- Closure Properties/Decision Properties in chapter Properties of Context Free Languages of Automata Theory |
Answer» CORRECT CHOICE is (d) All of the mentioned The best I can EXPLAIN: CFL is closed under UNION, kleene and concatenation along with the properties reversal,homomorphism and inverse homomorphism but not difference and intersection. |
|
41. |
Which of the following is true for Valiants algorithm?(a) an extension of CYK(b) deals with efficient multiplication algorithms(c) matrices with 0-1 entries(d) all of the mentionedI have been asked this question by my college director while I was bunking the class.This question is from CFL- Other Normal Forms in division Properties of Context Free Languages of Automata Theory |
Answer» The correct answer is (d) all of the mentioned |
|
42. |
Which of the expressions correctly is an requirement of the pumping lemma for the context free languages?(a) uv^nwx^ny(b) uv^nw^nx^ny(c) uv^2nwx^2ny(d) All of the mentionedI had been asked this question in an interview for job.This interesting question is from Pumping Lemma for Context Free Language in division Properties of Context Free Languages of Automata Theory |
Answer» Correct ANSWER is (b) uv^nw^nx^ny |
|
43. |
The context free languages are closed under:(a) Intersection(b) Complement(c) Kleene(d) None of the mentionedI got this question in examination.I'd like to ask this question from CFL- Closure Properties/Decision Properties in division Properties of Context Free Languages of Automata Theory |
Answer» Right ANSWER is (C) Kleene |
|
44. |
If the start symbol is one of those symbols which produce no terminal through any sequence, the CFL is said to be(a) nullable(b) empty(c) eliminated(d) none of the mentionedThis question was addressed to me in my homework.This is a very interesting question from CFL- Closure Properties/Decision Properties in chapter Properties of Context Free Languages of Automata Theory |
Answer» The correct choice is (B) EMPTY |
|
45. |
Which of the following grammars are in Chomsky Normal Form:(a) S->AB|BC|CD, A->0, B->1, C->2, D->3(b) S->AB, S->BCA|0|1|2|3(c) S->ABa, A->aab, B->Ac(d) All of the mentionedThis question was addressed to me in a job interview.This intriguing question comes from Chomsky Normal Form topic in division Properties of Context Free Languages of Automata Theory |
Answer» The correct ANSWER is (a) S->AB|BC|CD, A->0, B->1, C->2, D->3 |
|
46. |
Which of the following grammars is similar to Floyd Normal form?(a) Backus Naur Form(b) Kuroda Normal Form(c) Greibach Normal Form(d) Chomsky Normal FormI have been asked this question in a job interview.My doubt stems from CFL- Other Normal Forms in chapter Properties of Context Free Languages of Automata Theory |
Answer» Right answer is (a) Backus NAUR Form |
|
47. |
Using pumping lemma, which of the following cannot be proved as ‘not a CFL’?(a) {a^ib^ic^i|i>=0}(b) {ss|s∈{a,b}*}(c) The set legal C programs(d) None of the mentionedThis question was addressed to me in my homework.My question is based upon Pumping Lemma for Context Free Language topic in division Properties of Context Free Languages of Automata Theory |
Answer» CORRECT option is (d) NONE of the mentioned For explanation: There are few rules in C that are context dependent. For EXAMPLE, declaration of a variable before it can be used. |
|
48. |
Which of the following gives a positive result to the pumping lemma restrictions and requirements?(a) {a^ib^ic^i|i>=0}(b) {0^i1^i|i>=0}(c) {ss|s∈{a,b}*}(d) None of the mentionedI got this question in my homework.Enquiry is from Pumping Lemma for Context Free Language in division Properties of Context Free Languages of Automata Theory |
Answer» The correct choice is (b) {0^i1^i|i>=0} |
|
49. |
If C is A-derivable, C->B is a production, and B ¹ A, then B is(a) nullable(b) Non-derivable(c) A-derivable(d) None of the mentionedThe question was asked during an internship interview.My question is based upon Eliminating Unit Productions topic in chapter Properties of Context Free Languages of Automata Theory |
Answer» Correct ANSWER is (C) A-derivable |
|