computer-nec-license
  • NEC-Computer
  • 1. Concept of Basic Electrical and Electronics Engineering
    • 1.1 Basic Concepts
    • 1.2 Network Theorems
    • 1.3 Alternating Current Fundamentals
    • 1.4 Semiconductor Device
    • 1.5 Signal Generator
    • 1.6 Amplifiers
    • MCQs
      • MCQs On Basic Electrical
        • set-1
        • set-2
      • MCQs On Basic Electronics
        • set-1
        • set-2
  • 2. Digital Logic and Microprocessor
    • 2.1 Digital Logic
    • 2.2 Combinational & Arithmetic Circuit
    • 2.3 Sequential Logic Circuits
    • 2.4 Microprocessor
    • 2.5 Microprocessor System
    • 2.6 Interrupt Operations
    • MCQs
      • MCQs On Digital Logic
        • set-1
        • set-2
        • set-3
        • set-4
        • set-5
        • set-6
        • set-7
        • set-8
        • set-9
        • set-10
        • set-11
        • set-12
      • MCQs On Microprocessor
        • set-1
        • set-2
        • set-3
        • set-4
        • set-5
        • set-6
        • set-7
        • set-8
        • set-9
  • 3. Programming Language and Its Applications
    • 3.1 Introduction to C Programming
    • 3.2 Pointers, Structures, and Data Files
    • 3.3 C++ Language Constructs with Objects and Classes
    • 3.4 Features of Object-Oriented Programming
    • 3.5 Pure Virtual Functions and File Handling
    • 3.6 Generic Programming and Exception Handling
    • MCQs
      • set-1
      • set-2
      • set-3
      • set-4
      • set-5
  • 4. Computer Organization and Embedded System
    • 4.1 Control and CPU
    • 4.2 Computer Arithmetic and Memory System
    • 4.3 I/O Organization and Multiprocessor
    • 4.4 Embedded System Design
    • 4.5 Real-Time Operating and Control Systems
    • 4.6 Hardware Description Language (VHDL) and IC Technology
    • MCQs
      • set-1
      • set-2
      • set-3
      • set-4
      • set-5
      • set-6
      • set-7
      • set-8
      • set-9
      • set-10
      • set-11
  • 5. Concept of Computer Network and Network Security System
    • 5.1 Introduction to Computer Networks
    • 5.2 Data Link Layer
    • 5.3 Network Layer
    • 5.4 Transport Layer
    • 5.5 Application Layer
    • 5.6 Network Security
    • MCQs
      • Basic Networking
        • set-1
        • set-2
      • Advanced Networking
        • set-1
        • set-2
        • set-3
        • set-4
        • set-5
        • set-6
  • 6. Theory of Computation and Computer Graphics
    • 6.1 Introduction to Finite Automata
    • 6.2 Introduction to Context-Free Languages (CFL)
    • 6.3 Turing Machines (TM)
    • 6.4 Introduction to Computer Graphics
    • 6.5 Two-Dimensional Transformation
    • 6.6 Three-Dimensional Transformation
    • MCQs
      • MCQs on Theory of Computation
        • set-1
        • set-2
        • set-3
      • MCQs On Computer Graphics
        • set-1
        • set-2
        • set-3
        • set-4
        • set-5
        • set-6
  • 7. Data Structures and Algorithm, Database System and Operating System
    • 7.1 Introduction to Data Structures, Lists, Linked Lists, and Trees
    • 7.2 Sorting, Searching, Hashing and Graphs
    • 7.3 Introduction to Data Models, Normalization, and SQL
    • 7.4 Transaction Processing, Concurrency Control, and Crash Recovery
    • 7.5 Introduction to Operating System and Process Management
    • 7.6 Memory Management, File Systems, and System Administration
    • MCQs
      • MCQs ON DSA
        • set-1
        • set-2
        • set-3
        • set-4
        • set-5
        • set-6
      • MCQs On DBMS
        • set-1
        • set-2
      • MCQs On Operating System
        • set-1
        • set-2
        • set-3
        • set-4
        • set-5
        • set-6
        • set-7
        • set-8
        • set-9
        • set-10
        • set-11
        • set-12
  • 8. Software Engineering and Object-Oriented Analysis & Design
    • 8.1 Software Process and Requirements
    • 8.2 Software Design
    • 8.3 Software Testing, Cost Estimation, Quality Management, and Configuration Management
    • 8.4 Object-Oriented Fundamentals and Analysis
    • 8.5 Object-Oriented Design
    • 8.6 Object-Oriented Design Implementation
    • MCQs
      • set-1
      • set-2
      • set-3
      • set-4
      • set-5
      • set-6
      • set-7
      • set-8
      • set-9
  • 9. Artificial Intelligence and Neural Networks
    • 9.1 Introduction to AI and Intelligent Agents
    • 9.2 Problem Solving and Searching Techniques
    • 9.3 Knowledge Representation
    • 9.4 Expert System and Natural Language Processing
    • 9.5 Machine Learning
    • 9.6 Neural Networks
    • MCQs
      • set-1
      • set-2
      • set-3
      • set-4
      • set-5
      • set-6
      • set-7
      • set-8
      • set-9
  • 10. Project Planning, Design and Implementation
    • 10.1 Engineering Drawings and Its Concepts
    • 10.2 Engineering Economics
    • 10.3 Project Planning and Scheduling
    • 10.4 Project Management
    • 10.5 Engineering Professional Practice
    • 10.6 Engineering Regulatory Body
    • MCQs
      • MCQs On Engineering Drawing
        • set-1
        • set-2
      • MCQs On Engineering Economics
      • MCQs On Project Planning & Scheduling
      • MCQs On Project Mangement
      • MCQs On Engineering Professional Practice
      • MCQs On Engineering Regulatory Body
  • Questions Sets
    • Set 1 (Chaitra, 2080)
      • Short Questions (60*1=60 Marks)
      • Long Questions (20*2=40 Marks)
    • Set 2 (Aasadh, 2081)
      • Short Questions (60*1=60 Marks)
      • Long Questions (20*2=40 Marks)
    • Set 3 (Asojh, 2080)
      • Short Questions (60*1=60 Marks)
      • Long Questions (20*2=40 Marks)
    • Model Set - Computer Engineering By NEC
      • Short Questions (60*1=60 Marks)
      • Long Questions (20*2=40 Marks)
    • Model Set - Software Engineering By NEC
      • Short Questions (60*1=60 Marks)
      • Long Questions (20*2=40 Marks)
  • Tips & Tricks
Powered by GitBook
On this page
  1. 6. Theory of Computation and Computer Graphics
  2. MCQs
  3. MCQs on Theory of Computation

set-2

51. Let LLL be set of strings from alphabet. The Kleen closure of LLL is given as

  1. L′=⋃i=0LiL' = \bigcup_{i=0} L^iL′=⋃i=0​Li

  2. L+=⋃i=1LiL^+ = \bigcup_{i=1} L^iL+=⋃i=1​Li

  3. L′=⋃i=0LiL' = \bigcup_{i=0} L^iL′=⋃i=0​Li

  4. L+=⋃i=1LiL^+ = \bigcup_{i=1} L^iL+=⋃i=1​Li

Show me the answer

Answer: 3. L′=⋃i=0LiL' = \bigcup_{i=0} L^iL′=⋃i=0​Li

Explanation:

  • The Kleene closure of LLL is defined as L′=⋃i=0LiL' = \bigcup_{i=0} L^iL′=⋃i=0​Li.

52. If a source language supports some macro pre-processor functions then these functions can be implemented in

  1. Lexical analysis phase

  2. Code generation

  3. Parsing

  4. Syntax analysis phase

Show me the answer

Answer: 1. Lexical analysis phase

Explanation:

  • Macro pre-processor functions are typically implemented in the lexical analysis phase.

53. If e1e1e1 and e2e2e2 are the regular expressions denoting the language L1L1L1 and L2L2L2 respectively, then which of the following is wrong?

  1. {e1}+{e2}\{e_1\} + \{e_2\}{e1​}+{e2​} is regular expression denoting L1∪L2L1 \cup L2L1∪L2

  2. e2e3e2 e3e2e3 regular expression denoting L1L2L1L2L1L2

  3. ∅\emptyset∅ is not regular expression

  4. {e1}∗\{e_1\}^*{e1​}∗ is regular expression denoting L∗L^*L∗

Show me the answer

Answer: 3. ∅\emptyset∅ is not regular expression

Explanation:

  • The empty set ∅\emptyset∅ is a valid regular expression.

54. The regular expression (a+b)∗(a + b)^*(a+b)∗ denotes all strings

  1. With zero or more instances of aaa and bbb both simultaneously

  2. With one or more instances of aaa and bbb

  3. Equal to regular expression (a∗+b)∗(a^* + b)^*(a∗+b)∗

  4. Any combination of aaa's and bbb's including null string

Show me the answer

Answer: 4. Any combination of aaa's and bbb's including null string

Explanation:

  • The regular expression (a+b)∗(a + b)^*(a+b)∗ denotes any combination of aaa's and bbb's, including the null string.

55. Every CFG can be transferred into equivalent

  1. Greiback normal form

  2. Either (a) or (b)

  3. CNF

  4. All of the above

Show me the answer

Answer: 4. All of the above

Explanation:

  • Every context-free grammar (CFG) can be converted into Greibach Normal Form (GNF) or Chomsky Normal Form (CNF).

56. Consider the following regular expression

R=(ab+abb)∗R = (ab + abb)^*R=(ab+abb)∗ Which of the following is not in RRR?

  1. Ababab

  2. Abbab

  3. Abababbbab

  4. Abbabbbab

Show me the answer

Answer: 1. Ababab

Explanation:

  • The string ababababababababab does not fit the pattern (ab+abb)∗(ab + abb)^*(ab+abb)∗.

57. In the figure shown, a DFA mmm has start state AAA and accepting state DDD. Which of the following regular expression denoted the set of all words accepted by mmm?

  1. 001

  2. (0+1)∗011(0 + 1)^* 011(0+1)∗011

  3. 10∗1∗010^* 1^* 010∗1∗0

  4. 1∗0∗0011^* 0^* 0011∗0∗001

Show me the answer

Answer: 2. (0+1)∗011(0 + 1)^* 011(0+1)∗011

Explanation:

  • The regular expression (0+1)∗011(0 + 1)^* 011(0+1)∗011 matches the language accepted by the DFA.

58. Which of the following is most general phase-structured grammar?

  1. Regular

  2. Context-free

  3. Context-sensitive

  4. None of these

Show me the answer

Answer: 3. Context-sensitive

Explanation:

  • Context-sensitive grammars are the most general phase-structured grammars.

59. Context-free grammar can be recognized by

  1. Finite state automation

  2. 2-way linear bounded automata

  3. Push down automata

  4. Both (B) and (C) above

Show me the answer

Answer: 4. Both (B) and (C) above

Explanation:

  • Context-free grammars can be recognized by pushdown automata and 2-way linear bounded automata.

60. Context sensitive grammar (CSG) can be recognized by

  1. Finite state automata

  2. Push down automata

  3. 2-way linear bounded automata

  4. None of these

Show me the answer

Answer: 3. 2-way linear bounded automata

Explanation:

  • Context-sensitive grammars are recognized by 2-way linear bounded automata.

61. Consider the grammar GGG, where the productions are numbered as shown

  1. E→E+TE \rightarrow E + TE→E+T

  2. E→TE \rightarrow TE→T

  3. T→T∗FT \rightarrow T^* FT→T∗F

  4. T→FT \rightarrow FT→F

  5. F→eF \rightarrow eF→e

  6. F→aF \rightarrow aF→a

If a shift-reduce (bottom-up) parser writes the production number used immediately after performing any reduction, what will be printed if the parser input is a+a∗aa + a * aa+a∗a?

  1. 62461

  2. 6262441

  3. 64642331

  4. 64264631

Show me the answer

Answer: 2. 6262441

Explanation:

  • The sequence of reductions for the input a+a∗aa + a * aa+a∗a corresponds to the production numbers 6, 2, 6, 2, 4, 4, 1.

62. Which sentence can be generated by

S→As/bAS \rightarrow As/bAS→As/bA A→d/ccAA \rightarrow d/ccAA→d/ccA

  1. Becddd

  2. abbbd

  3. aabccd

  4. ababccd

Show me the answer

Answer: 3. aabccd

Explanation:

  • The string aabccdaabccdaabccd can be generated by the given grammar.

63. Which of the following recognizes variables prefixes of the grammar?

  1. DFA

  2. NFA

  3. Both errors can be detected

  4. None of these

Show me the answer

Answer: 1. DFA

Explanation:

  • A Deterministic Finite Automaton (DFA) can recognize variable prefixes of the grammar.

64. Dynamic errors can be detected

  1. Only at compile time

  2. Only at run time

  3. Both at compile time and at run time

  4. None of these

Show me the answer

Answer: 2. Only at run time

Explanation:

  • Dynamic errors are detected during the execution (run time) of the program.

65. Compiler is a software which converts

  1. High level language program into low level language program

  2. Source program into object program

  3. Program in high level language into program in low level language

  4. Program in source language into program in object language

Show me the answer

Answer: 2. Source program into object program

Explanation:

  • A compiler converts the source program into an object program.

66. The language L={anbmcnbm/n≥1,m≥1}L = \{a^n b^m c^n b^m / n \geq 1, m \geq 1\}L={anbmcnbm/n≥1,m≥1}.

  1. Is a context free

  2. Both (a) and (b)

  3. Is not context free

  4. None of these

Show me the answer

Answer: 3. Is not context free

Explanation:

  • The language LLL is not context-free as it requires matching counts of aaa's, bbb's, and ccc's.

67. The language L={0n1n2n where n>0}L = \{0n 1n 2n \text{ where } n > 0\}L={0n1n2n where n>0} is a

  1. CFL

  2. Context-sensitive language

  3. Regular language

  4. Recursive enumerable language

Show me the answer

Answer: 2. Context-sensitive language

Explanation:

  • The language LLL is context-sensitive as it requires matching counts of 000's, 111's, and 222's.

68. Which of the choice in an operator grammar equivalent for

S→SAS/aS \rightarrow SAS/aS→SAS/a A→bSb/bA \rightarrow bSb/bA→bSb/b Assume SSS is start symbol

  1. S→SAS/a,A→bSb/bS \rightarrow SAS/a, A \rightarrow bSb/bS→SAS/a,A→bSb/b

  2. S→SbAbS/a,A→bS \rightarrow SbAbS/a, A \rightarrow bS→SbAbS/a,A→b

  3. S→SbSbS/SbS/aS \rightarrow SbSbS/SbS/aS→SbSbS/SbS/a

  4. S→SbS/bS \rightarrow SbS/bS→SbS/b

Show me the answer

Answer: 3. S→SbSbS/SbS/aS \rightarrow SbSbS/SbS/aS→SbSbS/SbS/a

Explanation:

  • The grammar S→SbSbS/SbS/aS \rightarrow SbSbS/SbS/aS→SbSbS/SbS/a is equivalent to the given operator grammar.

69. Let SSS and TTT be language over Σ={a,b}\Sigma = \{a, b\}Σ={a,b} represent by regular expression (a+b∗)∗(a + b^*) *(a+b∗)∗ and (a+b)∗(a + b)^*(a+b)∗ respectively then

  1. S⊂TS \subset TS⊂T

  2. T⊂ST \subset ST⊂S

  3. S=TS = TS=T

  4. S∩T=0S \cap T = 0S∩T=0

Show me the answer

Answer: 3. S=TS = TS=T

Explanation:

  • The regular expressions (a+b∗)∗(a + b^*) *(a+b∗)∗ and (a+b)∗(a + b)^*(a+b)∗ are equivalent.

70. Let LLL denote the language generated by the grammar S→050100S \rightarrow 050100S→050100 then

  1. L=0∗L = 0^*L=0∗

  2. LLL is regular but not 0∗0^*0∗

  3. LLL is context free but not regular

  4. LLL is not context free

Show me the answer

Answer: 3. LLL is context free but not regular

Explanation:

  • The language LLL generated by the grammar is context-free but not regular.

71. Consider the regular expression (0+1)(0+1)∗(0 + 1) (0 + 1)^*(0+1)(0+1)∗......n times. The minimum state finite automation that recognizes the language represented by this regular expression contains

  1. nnn states

  2. n+2n + 2n+2 states

  3. n+1n + 1n+1 states

  4. None of these

Show me the answer

Answer: 3. n+1n + 1n+1 states

Explanation:

  • The minimum state finite automaton for the regular expression (0+1)(0+1)∗(0 + 1) (0 + 1)^*(0+1)(0+1)∗ repeated nnn times requires n+1n + 1n+1 states.

72. A grammar that is both left and right recursive for non-terminal is

  1. Ambiguous

  2. Information is not sufficient

  3. Unambiguous

  4. None of these

Show me the answer

Answer: 1. Ambiguous

Explanation:

  • A grammar that is both left and right recursive for a non-terminal is ambiguous.

73. If the regular set AAA is represented by A=(01+1)∗A = (01 + 1)^*A=(01+1)∗ and the regular set BBB represented by B=[(01)∗1∗]B = [(01)^* 1^*]B=[(01)∗1∗] then

  1. A⊂BA \subset BA⊂B

  2. AAA and BBB are uncomparable

  3. B⊂AB \subset AB⊂A

  4. A=BA = BA=B

Show me the answer

Answer: 4. A=BA = BA=B

Explanation:

  • The regular sets AAA and BBB are equivalent.

74. Which of the following can be recognized by a DFA

  1. The number 1, 2, 4 ......xnx^nxn......written in binary

  2. The number 1, 2, 4, ......xnx^nxn......written in un binary

  3. The set of binary strings in which the number of zeros is the same as the number of ones

  4. The set {1,101,11011,1110111...}\{1, 101, 11011, 1110111 ...\}{1,101,11011,1110111...}

Show me the answer

Answer: 1. The number 1, 2, 4 ......xnx^nxn......written in binary

Explanation:

  • A DFA can recognize the set of numbers written in binary.

75. The string 1101 does not belong to the set represented by

  1. 110′(0+1)110'(0+1)110′(0+1)

  2. (10)∗(01)∗(00+11)∗(10)^* (01)^* (00 + 11)^*(10)∗(01)∗(00+11)∗

  3. 1(0+1)∗1011(0 + 1)^* 1011(0+1)∗101

  4. [00+(11)∗0][00+(11)^* 0][00+(11)∗0]

Show me the answer

Answer: 2. (10)∗(01)∗(00+11)∗(10)^* (01)^* (00 + 11)^*(10)∗(01)∗(00+11)∗

Explanation:

  • The string 1101 does not fit the pattern (10)∗(01)∗(00+11)∗(10)^* (01)^* (00 + 11)^*(10)∗(01)∗(00+11)∗.

76. Regarding the power of recognition of language, which of the following statements is false?

  1. The NDFA is equivalent to DFA

  2. NPDA is equivalent to DPDA

  3. Non-deterministic Turing machines are equivalent to deterministic push-down automata

  4. Multi-tape Turing-machine are equivalent to Single-Tape Turing machine

Show me the answer

Answer: 3. Non-deterministic Turing machines are equivalent to deterministic push-down automata

Explanation:

  • Non-deterministic Turing machines are more powerful than deterministic push-down automata.

77. Let ∗*∗ be defined as a∗b=a+ya * b = a + ya∗b=a+y. Let c=a∗bc = a * bc=a∗b; value of c∗ac * ac∗a is

  1. a+ba + ba+b

  2. aaa

  3. 000

  4. 111

Show me the answer

Answer: 2. aaa

Explanation:

  • The operation c∗ac * ac∗a results in aaa.

78. Which one of the following regular expressions over {0,1}\{0, 1\}{0,1} denotes the set of all string not containing 100 as a substring?

  1. 0′(1+0)0' (1 + 0)0′(1+0)

  2. 1′011' 011′01

  3. 0′10100' 10100′1010

  4. 0′(10+1)0' (10 + 1)0′(10+1)

Show me the answer

Answer: 4. 0′(10+1)0' (10 + 1)0′(10+1)

Explanation:

  • The regular expression 0′(10+1)0' (10 + 1)0′(10+1) ensures that the substring 100 is not present.

79. Which of the following languages over {a,b,c}\{a, b, c\}{a,b,c} is accepted by deterministic push down automata?

  1. {ω⊂ωb/ω∈(a,b)}\{\omega \subset \omega^b / \omega \in (a, b)\}{ω⊂ωb/ω∈(a,b)}

  2. {ωωb/ω∈{a,b,c}}\{\omega \omega^b / \omega \in \{a, b, c\}\}{ωωb/ω∈{a,b,c}}

  3. {abcm/n≥0}\{a^b c^m / n \geq 0\}{abcm/n≥0}

  4. {ω/ω is palindrome {a,b,c}}\{\omega / \omega \text{ is palindrome } \{a, b, c\}\}{ω/ω is palindrome {a,b,c}}

Show me the answer

Answer: 1. {ω⊂ωb/ω∈(a,b)}\{\omega \subset \omega^b / \omega \in (a, b)\}{ω⊂ωb/ω∈(a,b)}

Explanation:

  • The language {ω⊂ωb/ω∈(a,b)}\{\omega \subset \omega^b / \omega \in (a, b)\}{ω⊂ωb/ω∈(a,b)} is accepted by a deterministic pushdown automaton.

80. Two of following four regular expressions are equivalent, which two?

  1. (00)∗(ϵ+0)(00)^* (\epsilon + 0)(00)∗(ϵ+0)

  2. (00)∗(00)^*(00)∗

  3. 0∗0^*0∗

  4. 0(00)∗0(00)^*0(00)∗

Show me the answer

Answer: 2. (00)∗(00)^*(00)∗ and 3. 0∗0^*0∗

Explanation:

  • The regular expressions (00)∗(00)^*(00)∗ and 0∗0^*0∗ are equivalent.

81. The major difference between a Moore and Mealy machine is that

  1. The output of the former depends only on the present state and present input

  2. The output of the former depends only on the present state

  3. The output of the former depends only on the present input

  4. All of these

Show me the answer

Answer: 2. The output of the former depends only on the present state

Explanation:

  • In a Moore machine, the output depends only on the present state, while in a Mealy machine, it depends on both the present state and input.

82. Finite state machine can recognize

  1. Any grammar

  2. Any unambiguous grammar

  3. Only CG

  4. Only regular grammar

Show me the answer

Answer: 4. Only regular grammar

Explanation:

  • Finite state machines can recognize only regular grammars.

83. Pumping Lemma is generally used for proving

  1. A given grammar is regular

  2. A given grammar is not regular

  3. Whether two given regular expressions are equivalent or not

  4. None of these

Show me the answer

Answer: 2. A given grammar is not regular

Explanation:

  • The Pumping Lemma is used to prove that a language is not regular.

84. Which of the following is not regular?

  1. String of 0's whose length is a perfect square

  2. Set of all palindrome made up of 0's and 1's

  3. Set of all 0's whose length is prime

  4. All of these

Show me the answer

Answer: 4. All of these

Explanation:

  • None of the given languages are regular.

85. Choose the correct statements

  1. A={anbn/n=0,1,2,3,…}A = \{a^n b^n / n = 0, 1, 2, 3, \ldots\}A={anbn/n=0,1,2,3,…} is regular language

  2. The set BBB of all strings of equal number of aaa's and bbb's defines a regular language

  3. L(A∗B∗)∩BL(A^* B^*) \cap BL(A∗B∗)∩B gives the set AAA

  4. None of these

Show me the answer

Answer: 4. None of these

Explanation:

  • None of the statements are correct regarding regular languages.

86. The basic limitations of finite state machine is that

  1. It cannot remember arbitrary large amount of information

  2. It cannot recognize grammars are regular

  3. It sometimes recognize grammars are not regular

  4. All of these

Show me the answer

Answer: 1. It cannot remember arbitrary large amount of information

Explanation:

  • Finite state machines have limited memory and cannot remember arbitrarily large amounts of information.

87. Palindrome cannot be recognized by any FSM because

  1. An FSM can't remember arbitrary information

  2. An FSM can't deterministically fix the mid point

  3. Both (A) and (B)

  4. None of these

Show me the answer

Answer: 3. Both (A) and (B)

Explanation:

  • Finite state machines cannot recognize palindromes due to their inability to remember arbitrary information and fix the mid-point.

88. An FSM can be considered to be a TM (Turing machine)

  1. Of finite tape length, rewinding capability and unidirectional tape movement

  2. Of finite tape length, without rewinding and unidirectional tape movement

  3. Of finite tape length, rewinding capability and bidirectional tape movement

  4. All of these

Show me the answer

Answer: 2. Of finite tape length, without rewinding and unidirectional tape movement

Explanation:

  • A finite state machine can be considered a Turing machine with finite tape length, no rewinding, and unidirectional tape movement.

89. Turing machine is more powerful than FSM because

  1. Tape movement is confined to one direction

  2. It has no finite state control

  3. It has the capability to remember arbitrary long sequence of input symbols

  4. None of these

Show me the answer

Answer: 3. It has the capability to remember arbitrary long sequence of input symbols

Explanation:

  • Turing machines are more powerful due to their ability to remember arbitrarily long sequences of input symbols.

90. For given picture the FSM recognizes

  1. All strings

  2. ϵ\epsilonϵ-alone

  3. No strings

  4. None of these

Show me the answer

Answer: 2. ϵ\epsilonϵ-alone

Explanation:

  • The FSM recognizes only the empty string ϵ\epsilonϵ.

91. In given picture, the FSM represents

  1. Mealy machine

  2. Kleen machine

  3. Moore machine

  4. All of these

Show me the answer

Answer: 1. Mealy machine

Explanation:

  • The FSM represents a Mealy machine as its output depends on both the current state and input.

92. The language of all words with at least 2a2a2a's can be described by the regular expression:

  1. (ab)∗a(ab)^*a(ab)∗a and a(ba)∗a(ba)^*a(ba)∗

  2. b∗a∗b∗a(a+b)∗b^*a^*b^*a(a + b)^*b∗a∗b∗a(a+b)∗

  3. (a+b)∗ab∗a(a+b)∗(a + b)^*ab^*a(a + b)^*(a+b)∗ab∗a(a+b)∗

  4. All of these

Show me the answer

Answer: 4. All of these

Explanation:

  • All the given regular expressions describe the language of words with at least 2a2a2a's.

93. Which of the following pairs of regular expressions are not equivalent?

  1. (ab)∗a(ab)^*a(ab)∗a and a(ba)∗a(ba)^*a(ba)∗

  2. b∗a∗b∗a(a+b)∗b^*a^*b^*a(a + b)^*b∗a∗b∗a(a+b)∗

  3. (a+b)∗ab∗a(a+b)∗(a + b)^*ab^*a(a + b)^*(a+b)∗ab∗a(a+b)∗

  4. All of these

Show me the answer

Answer: 2. b∗a∗b∗a(a+b)∗b^*a^*b^*a(a + b)^*b∗a∗b∗a(a+b)∗

Explanation:

  • The regular expression b∗a∗b∗a(a+b)∗b^*a^*b^*a(a + b)^*b∗a∗b∗a(a+b)∗ is not equivalent to the others.

94. Any given transition graph has an equivalent

  1. Regular expression

  2. NDFSM

  3. DFSM

  4. All of these

Show me the answer

Answer: 4. All of these

Explanation:

  • A transition graph can be converted into a regular expression, NDFSM, or DFSM.

95. The following CFG

S→aS/bS/a/bS \rightarrow aS/bS/a/bS→aS/bS/a/b is equivalent to regular expression

  1. (a+b)(a + b)(a+b)

  2. (a+b)(a+b)(a + b)(a + b)(a+b)(a+b)

  3. (a+b)(a+b)(a + b)(a + b)(a+b)(a+b)

  4. All of these

Show me the answer

Answer: 3. (a+b)(a+b)(a + b)(a + b)(a+b)(a+b)

Explanation:

  • The CFG is equivalent to the regular expression (a+b)(a+b)(a + b)(a + b)(a+b)(a+b).

96. Any string of terminals that can be generated by the following CFG is

S→XYS \rightarrow XYS→XY X→ax/bx/aX \rightarrow ax/bx/aX→ax/bx/a Y→Ya/Yb/aY \rightarrow Ya/Yb/aY→Ya/Yb/a

  1. Has at least one 'b'

  2. Has no consecutive aaa's or bbb's

  3. Should end in a 'a'

  4. Has at least two aaa's

Show me the answer

Answer: 4. Has at least two aaa's

Explanation:

  • The CFG generates strings with at least two aaa's.

97. The following CFG

S→aB/BaS \rightarrow aB/BaS→aB/Ba A→b/aS/BaaA \rightarrow b/aS/BaaA→b/aS/Baa B→a/bS/aBBB \rightarrow a/bS/aBBB→a/bS/aBB Generates strings of terminals that have

  1. Equal number of aaa's and bbb's

  2. Odd number of aaa's and odd number of bbb's

  3. Even number of aaa's and even number of aaa's

  4. Odd number of aaa's and even number of aaa's

Show me the answer

Answer: 1. Equal number of aaa's and bbb's

Explanation:

  • The CFG generates strings with an equal number of aaa's and bbb's.

98. The set {anbn/n=1,2,3,…}\{a^n b^n / n = 1, 2, 3, \ldots\}{anbn/n=1,2,3,…} can be generated by the CFG

  1. S→ab/aSbS \rightarrow ab/aSbS→ab/aSb

  2. S→ab/aSb/ϵS \rightarrow ab/aSb/\epsilonS→ab/aSb/ϵ

  3. S→aaSbb/abS \rightarrow aaSbb/abS→aaSbb/ab

  4. None of these

Show me the answer

Answer: 1. S→ab/aSbS \rightarrow ab/aSbS→ab/aSb

Explanation:

  • The CFG S→ab/aSbS \rightarrow ab/aSbS→ab/aSb generates the set {anbn/n=1,2,3,…}\{a^n b^n / n = 1, 2, 3, \ldots\}{anbn/n=1,2,3,…}.

99. Choose the correct statement

  1. All language can be generated CFG

  2. Any regular language has an equivalent CFG

  3. Some non-regular languages can't be generated by an CFG

  4. Some regular language can't be simulated by an FSM

Show me the answer

Answer: 2. Any regular language has an equivalent CFG

Explanation:

  • Every regular language can be represented by a context-free grammar (CFG).

100. Which of the following CFG's can't be simulated by an FSM?

  1. S→Sa/aS \rightarrow Sa/aS→Sa/a

  2. S→abX,X→cY,Y→a/aXS \rightarrow abX, X \rightarrow cY, Y \rightarrow a/aXS→abX,X→cY,Y→a/aX

  3. S→aSb/abS \rightarrow aSb/abS→aSb/ab

  4. None of these

Show me the answer

Answer: 3. S→aSb/abS \rightarrow aSb/abS→aSb/ab

Explanation:

  • The CFG S→aSb/abS \rightarrow aSb/abS→aSb/ab generates a non-regular language and cannot be simulated by an FSM.

Previousset-1Nextset-3

Last updated 4 months ago