0% found this document useful (0 votes)
60 views79 pages

Theory of Computation MCQs

Uploaded by

jyash1293
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)
60 views79 pages

Theory of Computation MCQs

Uploaded by

jyash1293
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/ 79

List of Theory of Computation MCQs

1. What is a Finite automaton?

a. A Finite automaton is an automaton having an infinite number of states.

b. A Finite automaton is an automaton having a finite number of states

Answer: B) A Finite automaton is an automaton having a finite number of states

2. An automaton is made up of ____.

A. States
B. Transitions
C. Both

Answer: C) Both

3. In the theory of automation, how do we represent states?

A. Rectangle
B. Arrow
C. Circles

Answer: C) Circles

In the theory of automation, how do we represent transitions?

A. Triangle
B. Circles
C. Double circles
D. Arrows

Answer: D) Arrows

____ are entities or single objects that can be any letter, alphabet, or picture.

A. Objects
B. Transitions
C. Symbols
D. Alphabets

Answer: C) Symbols

What are the alphabets in the theory of computations?

A. Alphabets are a finite set of symbols


B. Alphabets are an infinite set of symbols

Answer: A) Alphabets are a finite set of symbols

Which of the following is used to denote alphabets?

A. W
B. ∑
C. |W|
D. ~

Answer: B) ∑

Explanation:

Alphabets are a finite set of symbols. It is denoted by ∑.

___ is a finite collection of symbols from the alphabet.

A. Switch
B. String
C. State
D. Symbols

Answer: B) String

The string is denoted by ____.

A. w
B. A
C. G
D. s

Answer: A) w

Explanation:

The string is denoted by w.

10. A string with zero occurrences of symbols is known as an ____ string.

A. Unfilled string
B. End string
C. Empty string

Answer: C) Empty string

Explanation:

A string with zero occurrences of symbols is known as an empty string.

11. Empty string is denoted by ____.

A. 0
B. E
C. $
D. ε

Answer: D) ε

Explanation:

Empty string is represented by ε.

Discuss this Question

12. Length of a string is represented by ____.

A. Null
B. L
C. |Length|
D. |w|

Answer: D) |w|

Explanation:

The length of a string is defined as the number of symbols in a string w. It's


represented by |w|.

Discuss this Question

13. Suppose w= 110. So, what would be the length of a string?

A. 2
B. 0
C. 3
D. None

Answer: C) 3

Explanation:

w = 110 Number of String |w| = 3.

Discuss this Question

14. How many states do finite automata have?

A. 1
B. 2
C. 3
D. None

Answer: B) 2
Explanation:

Finite automata have two states: Accept and Reject.

Discuss this Question

15. A finite automaton is a collection of how many tuples?

A. 5
B. 4
C. 3
D. 2

Answer: A) 5

Explanation:

A finite automaton is a collection of 5-tuple (Q, ∑, δ, q0, F).

Discuss this Question

16. How many types of finite automata are there?

A. 4
B. 3
C. 5
D. 2

Answer: D) 2

Explanation:

There are two types of finite automata:

• DFA(deterministic finite automata)


• NFA(non-deterministic finite automata)
Discuss this Question

17. In the ____, the machine only goes to one state for each input character.

A. DFA
B. NFA

Answer: A) DFA

Explanation:

In the DFA, the machine only goes to one state for each input character.

Discuss this Question

18. Does DFA accepts null moves?

A. Yes
B. No

Answer: B) No

Explanation:

The null move is not accepted by DFA.

Discuss this Question

19. Does NFA accepts null moves?

A. Yes
B. No

Answer: A) Yes
Explanation:

The null move is accepted by NFA.

Discuss this Question

20. Which of the following statement is True?

A. Every DFA is NFA, also every NFA is DFA


B. Every DFA is NFA, but NFA is not DFA

Answer: B) Every DFA is NFA, but NFA is not DFA.

Explanation:

Every DFA is NFA, but NFA is not DFA.

Discuss this Question

21. In both NFA and DFA, several end states are possible.

A. True
B. False

Answer: A) True

Explanation:

There can be multiple final states in both NFA and DFA.

Discuss this Question

22. Which of the following is utilized in Lexical Analysis in Compiler?

A. DFA
B. NFA

Answer: A) DFA

Explanation:

DFA is used in Lexical Analysis in Compiler.

Discuss this Question

23. Which of the following indicates accepting or final states?

A. Double circles
B. Triangle
C. Double dash
D. circle

Answer: A) Double circles

Explanation:

Double circles indicate accepting or final states.

Discuss this Question

24. A transition diagram or state transition diagram is a ____ graph?

A. Undirected
B. Directed

Answer: B) Directed

Explanation:

A transition diagram or state transition diagram is a directed graph.

Discuss this Question


25. For specified input, there can be how many paths from the current state
to the next state in DFA?

A. Many
B. None
C. One
D. Zero

Answer: C) One

Explanation:

For specified input, there is only one path from the current state to the next state
in DFA.

Discuss this Question

26. DFA Transition function can be defined as ____.

A. δ: Q x ∑→Q
B. W: Q x ∑→Q
C. δ: Q x ∑→W
D. δ: Q x ∑→F

Answer: A) δ: Q x ∑→Q

Explanation:

DFA Transition function can be defined as: δ: Q x ∑→Q.

Discuss this Question

27. In a ring topology, data flows in a ____ manner.

A. Anti clockwise
B. Clockwise

Answer: B) Clockwise

Explanation:

In a ring topology, data flows in a clockwise manner.

Discuss this Question

28. NFA has how many states?

A. 2
B. 3
C. 4
D. 5

Answer: D) 5

Explanation:

NFA also has five states same as DFA.

Discuss this Question

29. How do you define a transition function of NFA?

A. δ: Q x ∑ →3Q
B. δ: Q x ∑ →2Q
C. δ: Q x ∑ →4Q
D. δ: Q x ∑ →FQ

Answer: B) δ: Q x ∑ →2Q

Explanation:
The five states of NFA are identical to those of DFA but have distinct transition
functions δ: Q x ∑ →2Q.

Discuss this Question

30. The language accepted by finite automata can be easily described by


simple expressions called ____.

A. Constant expression
B. Frequent expression
C. Regular expression
D. Conventional expression

Answer: C) Regular expression

Explanation:

The language accepted by finite automata can be easily described by simple


expressions called Regular Expressions.

Discuss this Question

31. Which types of languages are accepted by regular expressions?

A. Regular language
B. Consistent language
C. Kleen language
D. Series language

Answer: A) Regular language

Explanation:

Regular languages are the languages that are accepted by some regular
expressions.

Discuss this Question


32. If L is a regular language, then its Kleen closure L1* will ____.

A. will not be a regular language


B. will also be a regular language

Answer: B) will also be a regular language.

Explanation:

If L is a regular language, then its Kleen closure L1* will also be a regular
language.

Discuss this Question

33. What will be the regular expression for the language accepting all the
strings which are starting with 1 and ending with 0, over ∑ = {0, 1}?

A. R = 1 (0+1)* 1
B. R = 1 (0+1)+ 0
C. R = 1 (0+1)* 0
D. R = 1 (0+1)+1

Answer: C) R = 1 (0+1)* 0

Explanation:

The initial symbol in a regular expression should be 1, and the last symbol should
be 0, so the regular expression will be R = 1 (0+1)* 0.

Discuss this Question

34. A ____ machine is a finite state machine in which the current state and
current input symbol determine the future state.

A. Moore
B. Mealy

Answer: A) Moore

Explanation:

A Moore machine is a finite-state machine in which the current state and current
input symbol determine the future state.

Discuss this Question

35. Moore machine is described by how many tuples?

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

Answer: D) 6

Explanation:

Moore machine can be described by 6 tuples (Q, q0, ∑, O, δ, λ) where,

• Q: a finite set of states


• q0: the initial state of the machine
• ∑: a finite set of input symbols
• O: output alphabet
• δ: transition function where Q × ∑ → Q
• λ: output function where Q → O

Discuss this Question

36. What is the Mealy machine?


A. A Mealy machine is a machine in which the output symbol depends upon
the present input symbol and the present state of the machine
B. A Mealy machine is a machine in which the output symbol depends upon
the present input symbol and the next stage of the machine
C. A Mealy machine is a machine in which the output symbol depends upon
the next input symbol and the next stage of the machine
D. A Mealy machine is a machine in which the output symbol depends upon
the next input symbol and the present state of the machine

Answer: A) A Mealy machine is a machine in which the output symbol depends


upon the present input symbol and the present state of the machine.

Explanation:

A Mealy machine is a machine in which the output symbol depends upon the
present input symbol and the present state of the machine.

Discuss this Question

37. Mealy machine has how many tuples?

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

Answer: D) 6

Explanation:

The Mealy machine can be described by 6 tuples (Q, q0, ∑, O, δ, X') where

• Q: a finite set of states


• q0: the initial state of the machine
• ∑: a finite set of the input alphabet
• O:output alphabet
• δ: transition function where Q × ∑ → Q
• X:is the output transition function which maps Q × ∑ into O

Discuss this Question

38. What do you mean by CFG in the theory of computations?

A. Common free grammar


B. Context form grammar
C. Context full grammar
D. Content-free grammar

Answer: D) Content-free grammar

Explanation:

CFG stands for context-free grammar.

Discuss this Question

39. CFG has how many tuples?

A. 2
B. 3
C. 4
D. 5

Answer: C) 4

Explanation:

Context-free grammar G can be defined by four tuples:G = (V, T, P, S):

• G is the grammar
• T is the final set of a terminal symbol
• V is the final set of a non-terminal symbol
• P is a set of production rules
• S is the start symbol

Discuss this Question

40. In CFG terminal symbols are denoted by ____.

A. Lowercase letter
B. Upper case letter
C. Camel case letter

Answer: A) Lowercase letter

Explanation:

In CFG, the terminal symbols are denoted by lowercase letters.

Discuss this Question

41. How do we denote the non-terminal symbol?

A. Lowercase letter
B. Upper case letter
C. Camel case letter

Answer: B) Upper case letter

Explanation:

Non-terminal symbols are denoted by capital letters.

Discuss this Question

42. The input is scanned and replaced with the production rule from left to
right in the ____ derivation.
A. Right most deviation
B. Left most deviation

Answer: B) Left most deviation

Explanation:

The input is scanned and replaced with the production rule from left to right in
the leftmost derivation.

Discuss this Question

43. How do we read the input string in the rightmost derivation?

A. From right to left


B. From left to right

Answer: A) From right to left

Explanation:

We read the input string from right to left in the rightmost derivation.

Discuss this Question

44. The derivation tree is also known as ____.

A. Comprehend tree
B. Deviated tree
C. Decipher tree
D. Parse tree

Answer: D) Parse tree

Explanation:

The derivation tree is also known as the parse tree.


Discuss this Question

45. In a parse tree, the root node always represents a ____ symbol.

A. T (the final set of a terminal symbol)


B. V (the final set of a non-terminal symbol)
C. P (a set of production rules)
D. S (the start symbol)

Answer: D) S (the start symbol).

Explanation:

The root node is always a node that represents a start symbol.

Discuss this Question

46. In a parse tree, the leaf node always contains ____.

A. Non-terminal node
B. Terminal node

Answer: B) Terminal node

Explanation:

In a parse tree, the leaf node always has terminal nodes.

Discuss this Question

47. A grammar is said to be ambiguous if ____.

A. There exists more than one leftmost derivation


B. More than one rightmost derivation
C. More than one parse tree for the given input string
D. None
E. All of the above

Answer: E) All of the above

Explanation:

A grammar is said to be ambiguous if there exists more than one leftmost


derivation or more than one rightmost derivation or more than one parse tree for
the given input string.

Discuss this Question

48. What do you mean by CNF?

A. Chomsky's normal form


B. Chimpken normal form
C. Campbell's normal form

Answer: A) Chomsky's normal form

Explanation:

CNF stands for Chomsky's normal form.

Discuss this Question

49. The extra memory in pushdown automata is known as ____.

A. Heap
B. Array
C. Stack
D. None

Answer: C) Stack

Explanation:
Pushdown automaton is a finite automaton with additional memory known as a
stack.

Discuss this Question

50. Among PDA and FA which is more powerful?

A. PDA
B. FA

Answer: A) PDA

Explanation:

A PDA (pushdown automata) is more powerful than FA (finite automata).

Discuss this Question

51. Which of the following statement is True?

A. Any language which can be acceptable by FA can also be acceptable by


PDA
B. Any language which can be acceptable by FA cannot be acceptable by PDA

Answer: A) Any language which can be acceptable by FA can also be acceptable


by PDA.

Explanation:

Any language which can be acceptable by FA can also be acceptable by PDA.

Discuss this Question

52. The CFG that accepts deterministic PDAs also allows non-deterministic
PDAs?
A. False
B. True

Answer: B) True

Explanation:

The CFG that accepts deterministic PDAs also allows non-deterministic PDAs.

Discuss this Question

53. Which is more powerful NPDA (non-deterministic PDA) and DPDA


(deterministic PDA)?

A. NPDA
B. DPDA

Answer: A) NPDA

Explanation:

Some CFGs can only be accepted by NPDA and not by DPDA. As a result, NPDA is
more potent than DPDA.

Discuss this Question

54. According to Chomsky's hierarchy which of the following represents


unrestricted grammar?

A. TYPE 3
B. TYPE 2
C. TYPE 1
D. TYPE 0

Answer: D) TYPE 0

Explanation:
According to Chomsky's hierarchy TYPE 0 represents unrestricted grammar.

Discuss this Question

55. According to Chomsky's hierarchy which of the following represents


context-free grammar?

A. TYPE 3
B. TYPE 2
C. TYPE 1
D. TYPE 0

Answer: B) TYPE 2

Explanation:

According to Chomsky's hierarchy TYPE 2 represents context-free grammar.

Discuss this Question

56. According to Chomsky's hierarchy which of the following represents


Regular grammar?

A. TYPE 3
B. TYPE 2
C. TYPE 1
D. TYPE 0

Answer: A) TYPE 3

Explanation:

According to Chomsky's hierarchy TYPE 3 represents regular grammar.

Discuss this Question


57. According to Chomsky's hierarchy which of the following represents
context-sensitive grammar?

A. TYPE 3
B. TYPE 2
C. TYPE 1
D. TYPE 0

Answer: C) TYPE 1

Explanation:

According to Chomsky's hierarchy TYPE 1 represents context-sensitive grammar.

Discuss this Question

58. Which of the following statement is True?

A. Every type 2 language is also a type 1 and a type 3


B. Every type 2 language is also a type 3 and a type 0
C. Every type 2 language is also a type 1 and a type 0

Answer: C) Every type 2 language is also a type 1 and a type 0

Explanation:

Every type 2 language is also a type 1 and a type 0.

Discuss this Question

59. Which of the following automatons is the most powerful?

A. Finite Automaton
B. Pushdown Automaton
C. Turing Machine
D. None of the above
Answer: C) Turing Machine

Explanation:

The turing machine is the most powerful.

Discuss this Question

60. Context-free grammar can be recognized by ____.

A. Finite Automaton
B. Pushdown Automaton
C. Turing Machine

Answer: B) Pushdown Automaton

Explanation:

Context-free grammar can be recognized by the pushdown automaton.

1. In the finite automaton with minimum state deterministic that accepts a


given language L={w | w ε {0,1} *, the total number of 0s as well as 1s in w that
would be divisible by 3 & 5, respectively} would have:

a. 9 states

b. 10 states

c. 11 states

d. 15 states

Answer: (d) 15 states

2. If we consider an arbitrary NFA (non-deterministic finite automaton) with N


states in total, the maximum number of states that are there in an equivalent
DFA (minimised) is at least:

a. N!
b. 2N

c. 2^N

d. N^2

Answer: (c) 2^N

3. Which one of these given regular expressions isn’t equivalent to this regular
expression:

(m + n + o) *

a. (m*n* + o*)*

b. ((mn)* + o*)*

c. (m*n*o*)*

d. (m* + n* + o*)*

Answer: (b) ((mn)* + o*)*

4. Consider that we have a G ambiguous grammar along with its D


disambiguated version. If the language that is recognized by these two
grammars is denoted by L(G) and L(D), then which one of these would be
true?

a. L (D) = L (G)

b. L (D) ⊂ L (G)

c. L (D) is empty

d. L (D) ⊃ L (G)

Answer: (a) L (D) = L (G)

5. If you consider a regular expression r, in which r = (11 + 111)* over Ʃ = {0, 1},
then the number of states in minimal DFA and NFA respectively are:

a. DFA – 4, NFA – 3
b. DFA – 3, NFA – 3

c. DFA – 3, NFA – 4

d. DFA – 4, NFA – 4

Answer: (a) DFA – 4, NFA – 3

6. The language that a Pushdown Automation accepts in which the stack


stays limited to about 10 items is described best as:

a. Recursive

b. Deterministic Context Free

c. Regular

d. Context Free

Answer: (c) Regular

7. The C language is a:

a. Regular language

b. Context free language

c. Language parsable fully by a Turing machine only

d. Context sensitive language

Answer: (b) Context free language

8. Consider the language given below:

{a^m b^n C^(m+n) | m, n ≥ 1}

It is a ___________ language.

a. regular

b. not context free but context sensitive


c. not context sensitive but type-0

d. not regular but context-free

Answer: (d) not regular but context-free

9. Which of these is a regular set?

a. I

b. IV

c. I and III

d. I and IV

Answer: (d) I and IV

10. Consider the following languages:

L1 = {0^i1^j | i != 2j}

L2 = {0^i1^j | i = 2j+1}

L3 = {0^i1^j | i = j}

L4 = {0^i1^j | i != j}

Which of these is/are context free:

a. Only L3

b. Only L3 & L2

c. Only L4 & L3
d. All LA, L2, L3, and L4

Answer: (d) All LA, L2, L3, and L4

11. The L= {0^i21^i | i≥0 } language over the {0,1, 2} alphabet is:

a. a CFL but not a deterministic CFL

b. a regular language

c. is recursive as well as a deterministic CFL

d. not recursive

Answer: (c) is recursive as well as a deterministic CFL

12. If G is the CFG, r is the total number of rightmost derivations, l is the total
number of leftmost derivations, as well as P refers to the total number of
parse trees, then assume that r, l, and P are computed for some given
particular string. Here, for a given ‘G’ CFG and given ‘w’ string, what is the
relation between all three of these?

a. r ≤ P ≥ l

b. r = P = l

c. r ≥ P ≤ l

d. None

Answer: (b) r = P = l

13. When L and L’ happen to be recursively enumerable, here L is:

a. context-free

b. regular

c. recursive

d. context-sensitive
Answer: (c) recursive

14. Which of these problems given below is undecidable?

a. The Ambiguity problem for the CFGs

b. The Membership problem for the CFGs

c. The Equivalence problem for the FSAs

d. The Finiteness problem for the FSAs

Answer: (a) The Ambiguity problem for the CFGs

15. If L refers to the language that is generated by S – OSO/00, then which of


these is true?

a. L is not O but regular

b. L is regular but not context-free

c. L is not context-free

d. L = O

Answer: (b) L is regular but not context-free

List of Theory of Computation MCQs


1. What is a Finite automaton?

A. A Finite automaton is an automaton having an infinite number of states.


B. A Finite automaton is an automaton having a finite number of states

Answer: B) A Finite automaton is an automaton having a finite number of states

Explanation:

A Finite automaton is an automaton having a finite number of states.

Discuss this Question


2. An automaton is made up of ____.

A. States
B. Transitions
C. Both

Answer: C) Both

Explanation:

An automaton is made up of states and transitions.

Discuss this Question

3. In the theory of automation, how do we represent states?

A. Rectangle
B. Arrow
C. Circles

Answer: C) Circles

Explanation:

States are represented by circles.

Discuss this Question

4. In the theory of automation, how do we represent transitions?

A. Triangle
B. Circles
C. Double circles
D. Arrows
Answer: D) Arrows

Explanation:

In the theory of automation, arrows represent transitions.

Discuss this Question

5. ____ are entities or single objects that can be any letter, alphabet, or
picture.

A. Objects
B. Transitions
C. Symbols
D. Alphabets

Answer: C) Symbols

Explanation:

Symbols are entities or single objects that can be any letter, alphabet, or picture.

Discuss this Question

6. What are the alphabets in the theory of computations?

A. Alphabets are a finite set of symbols


B. Alphabets are an infinite set of symbols

Answer: A) Alphabets are a finite set of symbols

Explanation:

Alphabets are a finite set of symbols.

Discuss this Question


7. Which of the following is used to denote alphabets?

A. W
B. ∑
C. |W|
D. ~

Answer: B) ∑

Explanation:

Alphabets are a finite set of symbols. It is denoted by ∑.

Discuss this Question

8. ____ is a finite collection of symbols from the alphabet.

A. Switch
B. String
C. State
D. Symbols

Answer: B) String

Explanation:

A string is a finite collection of symbols from the alphabet.

Discuss this Question

9. The string is denoted by ____.

A. w
B. A
C. G
D. s

Answer: A) w

Explanation:

The string is denoted by w.

Discuss this Question

10. A string with zero occurrences of symbols is known as an ____ string.

A. Unfilled string
B. End string
C. Empty string

Answer: C) Empty string

Explanation:

A string with zero occurrences of symbols is known as an empty string.

Discuss this Question

11. Empty string is denoted by ____.

A. 0
B. E
C. $
D. ε

Answer: D) ε

Explanation:
Empty string is represented by ε.

Discuss this Question

12. Length of a string is represented by ____.

A. Null
B. L
C. |Length|
D. |w|

Answer: D) |w|

Explanation:

The length of a string is defined as the number of symbols in a string w. It's


represented by |w|.

Discuss this Question

13. Suppose w= 110. So, what would be the length of a string?

A. 2
B. 0
C. 3
D. None

Answer: C) 3

Explanation:

w = 110 Number of String |w| = 3.

Discuss this Question


14. How many states do finite automata have?

A. 1
B. 2
C. 3
D. None

Answer: B) 2

Explanation:

Finite automata have two states: Accept and Reject.

Discuss this Question

15. A finite automaton is a collection of how many tuples?

A. 5
B. 4
C. 3
D. 2

Answer: A) 5

Explanation:

A finite automaton is a collection of 5-tuple (Q, ∑, δ, q0, F).

Discuss this Question

16. How many types of finite automata are there?

A. 4
B. 3
C. 5
D. 2
Answer: D) 2

Explanation:

There are two types of finite automata:

• DFA(deterministic finite automata)


• NFA(non-deterministic finite automata)

Discuss this Question

17. In the ____, the machine only goes to one state for each input character.

A. DFA
B. NFA

Answer: A) DFA

Explanation:

In the DFA, the machine only goes to one state for each input character.

Discuss this Question

18. Does DFA accepts null moves?

A. Yes
B. No

Answer: B) No

Explanation:

The null move is not accepted by DFA.

Discuss this Question


19. Does NFA accepts null moves?

A. Yes
B. No

Answer: A) Yes

Explanation:

The null move is accepted by NFA.

Discuss this Question

20. Which of the following statement is True?

A. Every DFA is NFA, also every NFA is DFA


B. Every DFA is NFA, but NFA is not DFA

Answer: B) Every DFA is NFA, but NFA is not DFA.

Explanation:

Every DFA is NFA, but NFA is not DFA.

Discuss this Question

21. In both NFA and DFA, several end states are possible.

A. True
B. False

Answer: A) True

Explanation:
There can be multiple final states in both NFA and DFA.

Discuss this Question

22. Which of the following is utilized in Lexical Analysis in Compiler?

A. DFA
B. NFA

Answer: A) DFA

Explanation:

DFA is used in Lexical Analysis in Compiler.

Discuss this Question

23. Which of the following indicates accepting or final states?

A. Double circles
B. Triangle
C. Double dash
D. circle

Answer: A) Double circles

Explanation:

Double circles indicate accepting or final states.

Discuss this Question

24. A transition diagram or state transition diagram is a ____ graph?

A. Undirected
B. Directed

Answer: B) Directed

Explanation:

A transition diagram or state transition diagram is a directed graph.

Discuss this Question

25. For specified input, there can be how many paths from the current state
to the next state in DFA?

A. Many
B. None
C. One
D. Zero

Answer: C) One

Explanation:

For specified input, there is only one path from the current state to the next state
in DFA.

Discuss this Question

26. DFA Transition function can be defined as ____.

A. δ: Q x ∑→Q
B. W: Q x ∑→Q
C. δ: Q x ∑→W
D. δ: Q x ∑→F

Answer: A) δ: Q x ∑→Q
Explanation:

DFA Transition function can be defined as: δ: Q x ∑→Q.

Discuss this Question

27. In a ring topology, data flows in a ____ manner.

A. Anti clockwise
B. Clockwise

Answer: B) Clockwise

Explanation:

In a ring topology, data flows in a clockwise manner.

Discuss this Question

28. NFA has how many states?

A. 2
B. 3
C. 4
D. 5

Answer: D) 5

Explanation:

NFA also has five states same as DFA.

Discuss this Question

29. How do you define a transition function of NFA?


A. δ: Q x ∑ →3Q
B. δ: Q x ∑ →2Q
C. δ: Q x ∑ →4Q
D. δ: Q x ∑ →FQ

Answer: B) δ: Q x ∑ →2Q

Explanation:

The five states of NFA are identical to those of DFA but have distinct transition
functions δ: Q x ∑ →2Q.

Discuss this Question

30. The language accepted by finite automata can be easily described by


simple expressions called ____.

A. Constant expression
B. Frequent expression
C. Regular expression
D. Conventional expression

Answer: C) Regular expression

Explanation:

The language accepted by finite automata can be easily described by simple


expressions called Regular Expressions.

Discuss this Question

31. Which types of languages are accepted by regular expressions?

A. Regular language
B. Consistent language
C. Kleen language
D. Series language

Answer: A) Regular language

Explanation:

Regular languages are the languages that are accepted by some regular
expressions.

Discuss this Question

32. If L is a regular language, then its Kleen closure L1* will ____.

A. will not be a regular language


B. will also be a regular language

Answer: B) will also be a regular language.

Explanation:

If L is a regular language, then its Kleen closure L1* will also be a regular
language.

Discuss this Question

33. What will be the regular expression for the language accepting all the
strings which are starting with 1 and ending with 0, over ∑ = {0, 1}?

A. R = 1 (0+1)* 1
B. R = 1 (0+1)+ 0
C. R = 1 (0+1)* 0
D. R = 1 (0+1)+1

Answer: C) R = 1 (0+1)* 0

Explanation:
The initial symbol in a regular expression should be 1, and the last symbol should
be 0, so the regular expression will be R = 1 (0+1)* 0.

Discuss this Question

34. A ____ machine is a finite state machine in which the current state and
current input symbol determine the future state.

A. Moore
B. Mealy

Answer: A) Moore

Explanation:

A Moore machine is a finite-state machine in which the current state and current
input symbol determine the future state.

Discuss this Question

35. Moore machine is described by how many tuples?

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

Answer: D) 6

Explanation:

Moore machine can be described by 6 tuples (Q, q0, ∑, O, δ, λ) where,

• Q: a finite set of states


• q0: the initial state of the machine
• ∑: a finite set of input symbols
• O: output alphabet
• δ: transition function where Q × ∑ → Q
• λ: output function where Q → O

Discuss this Question

36. What is the Mealy machine?

A. A Mealy machine is a machine in which the output symbol depends upon


the present input symbol and the present state of the machine
B. A Mealy machine is a machine in which the output symbol depends upon
the present input symbol and the next stage of the machine
C. A Mealy machine is a machine in which the output symbol depends upon
the next input symbol and the next stage of the machine
D. A Mealy machine is a machine in which the output symbol depends upon
the next input symbol and the present state of the machine

Answer: A) A Mealy machine is a machine in which the output symbol depends


upon the present input symbol and the present state of the machine.

Explanation:

A Mealy machine is a machine in which the output symbol depends upon the
present input symbol and the present state of the machine.

Discuss this Question

37. Mealy machine has how many tuples?

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

Answer: D) 6
Explanation:

The Mealy machine can be described by 6 tuples (Q, q0, ∑, O, δ, X') where

• Q: a finite set of states


• q0: the initial state of the machine
• ∑: a finite set of the input alphabet
• O:output alphabet
• δ: transition function where Q × ∑ → Q
• X:is the output transition function which maps Q × ∑ into O

Discuss this Question

38. What do you mean by CFG in the theory of computations?

A. Common free grammar


B. Context form grammar
C. Context full grammar
D. Content-free grammar

Answer: D) Content-free grammar

Explanation:

CFG stands for context-free grammar.

Discuss this Question

39. CFG has how many tuples?

A. 2
B. 3
C. 4
D. 5

Answer: C) 4
Explanation:

Context-free grammar G can be defined by four tuples:G = (V, T, P, S):

• G is the grammar
• T is the final set of a terminal symbol
• V is the final set of a non-terminal symbol
• P is a set of production rules
• S is the start symbol

Discuss this Question

40. In CFG terminal symbols are denoted by ____.

A. Lowercase letter
B. Upper case letter
C. Camel case letter

Answer: A) Lowercase letter

Explanation:

In CFG, the terminal symbols are denoted by lowercase letters.

Discuss this Question

41. How do we denote the non-terminal symbol?

A. Lowercase letter
B. Upper case letter
C. Camel case letter

Answer: B) Upper case letter

Explanation:
Non-terminal symbols are denoted by capital letters.

Discuss this Question

42. The input is scanned and replaced with the production rule from left to
right in the ____ derivation.

A. Right most deviation


B. Left most deviation

Answer: B) Left most deviation

Explanation:

The input is scanned and replaced with the production rule from left to right in
the leftmost derivation.

Discuss this Question

43. How do we read the input string in the rightmost derivation?

A. From right to left


B. From left to right

Answer: A) From right to left

Explanation:

We read the input string from right to left in the rightmost derivation.

Discuss this Question

44. The derivation tree is also known as ____.

A. Comprehend tree
B. Deviated tree
C. Decipher tree
D. Parse tree

Answer: D) Parse tree

Explanation:

The derivation tree is also known as the parse tree.

Discuss this Question

45. In a parse tree, the root node always represents a ____ symbol.

A. T (the final set of a terminal symbol)


B. V (the final set of a non-terminal symbol)
C. P (a set of production rules)
D. S (the start symbol)

Answer: D) S (the start symbol).

Explanation:

The root node is always a node that represents a start symbol.

Discuss this Question

46. In a parse tree, the leaf node always contains ____.

A. Non-terminal node
B. Terminal node

Answer: B) Terminal node

Explanation:
In a parse tree, the leaf node always has terminal nodes.

Discuss this Question

47. A grammar is said to be ambiguous if ____.

A. There exists more than one leftmost derivation


B. More than one rightmost derivation
C. More than one parse tree for the given input string
D. None
E. All of the above

Answer: E) All of the above

Explanation:

A grammar is said to be ambiguous if there exists more than one leftmost


derivation or more than one rightmost derivation or more than one parse tree for
the given input string.

Discuss this Question

48. What do you mean by CNF?

A. Chomsky's normal form


B. Chimpken normal form
C. Campbell's normal form

Answer: A) Chomsky's normal form

Explanation:

CNF stands for Chomsky's normal form.

Discuss this Question


49. The extra memory in pushdown automata is known as ____.

A. Heap
B. Array
C. Stack
D. None

Answer: C) Stack

Explanation:

Pushdown automaton is a finite automaton with additional memory known as a


stack.

Discuss this Question

50. Among PDA and FA which is more powerful?

A. PDA
B. FA

Answer: A) PDA

Explanation:

A PDA (pushdown automata) is more powerful than FA (finite automata).

Discuss this Question

51. Which of the following statement is True?

A. Any language which can be acceptable by FA can also be acceptable by


PDA
B. Any language which can be acceptable by FA cannot be acceptable by PDA
Answer: A) Any language which can be acceptable by FA can also be acceptable
by PDA.

Explanation:

Any language which can be acceptable by FA can also be acceptable by PDA.

Discuss this Question

52. The CFG that accepts deterministic PDAs also allows non-deterministic
PDAs?

A. False
B. True

Answer: B) True

Explanation:

The CFG that accepts deterministic PDAs also allows non-deterministic PDAs.

Discuss this Question

53. Which is more powerful NPDA (non-deterministic PDA) and DPDA


(deterministic PDA)?

A. NPDA
B. DPDA

Answer: A) NPDA

Explanation:

Some CFGs can only be accepted by NPDA and not by DPDA. As a result, NPDA is
more potent than DPDA.

Discuss this Question


54. According to Chomsky's hierarchy which of the following represents
unrestricted grammar?

A. TYPE 3
B. TYPE 2
C. TYPE 1
D. TYPE 0

Answer: D) TYPE 0

Explanation:

According to Chomsky's hierarchy TYPE 0 represents unrestricted grammar.

Discuss this Question

55. According to Chomsky's hierarchy which of the following represents


context-free grammar?

A. TYPE 3
B. TYPE 2
C. TYPE 1
D. TYPE 0

Answer: B) TYPE 2

Explanation:

According to Chomsky's hierarchy TYPE 2 represents context-free grammar.

Discuss this Question

56. According to Chomsky's hierarchy which of the following represents


Regular grammar?
A. TYPE 3
B. TYPE 2
C. TYPE 1
D. TYPE 0

Answer: A) TYPE 3

Explanation:

According to Chomsky's hierarchy TYPE 3 represents regular grammar.

Discuss this Question

57. According to Chomsky's hierarchy which of the following represents


context-sensitive grammar?

A. TYPE 3
B. TYPE 2
C. TYPE 1
D. TYPE 0

Answer: C) TYPE 1

Explanation:

According to Chomsky's hierarchy TYPE 1 represents context-sensitive grammar.

Discuss this Question

58. Which of the following statement is True?

A. Every type 2 language is also a type 1 and a type 3


B. Every type 2 language is also a type 3 and a type 0
C. Every type 2 language is also a type 1 and a type 0

Answer: C) Every type 2 language is also a type 1 and a type 0


Explanation:

Every type 2 language is also a type 1 and a type 0.

Discuss this Question

59. Which of the following automatons is the most powerful?

A. Finite Automaton
B. Pushdown Automaton
C. Turing Machine
D. None of the above

Answer: C) Turing Machine

Explanation:

The turing machine is the most powerful.

Discuss this Question

60. Context-free grammar can be recognized by ____.

A. Finite Automaton
B. Pushdown Automaton
C. Turing Machine

Answer: B) Pushdown Automaton

Explanation:

Context-free grammar can be recognized by the pushdown automaton.

1:

Number of states of the FSM required to simulate behaviour of a computer with a memory
capable of storing "m" words, each of length 'n'
A. m x 2n

B. 2mn

C.2m+n

D.all of these

Answer Report Discuss

Option: B

Explanation :

For every data here length is ‘n’ and memory's states are defined in terms of power of 2,
Here the total memory capability for all the words = mn
Hence number of states are 2mn

Click on Discuss to view users comments.

2:

An FSM with

A. 1 stack is more powerful than an FSM with no stack

B. 2 stacks is more powerful than a FSM with 1 stack

C.both (a) and (b)

D.None of these

Answer Report Discuss

Option: C

Explanation :

Click on Discuss to view users comments.

3:

If two finite states machine M and N are isomorphic, then

A. M can be transformed to N, merely re-labelling its states

B. M can be transformed to N, merely re-labelling its edges

C.Both (a) and (b)


D.None of these

Answer Report Discuss

Option: A

Explanation :

Click on Discuss to view users comments.

4:

Power of

A. DFSM and NDFSM are same

B. DFSM and NDFSM are different

C.DPDM and NDPDM are diferent

D.Both (A) and (C)

Answer Report Discuss

Option: D

Explanation :

Click on Discuss to view users comments.

5:

Which of the folowing pairs of regular expressions are equivalent ?

A. 1 (01)* and (10)* 1

B. x (xx) * and (xx) * x

C.x+ and x+x*+

D.All of these

Answer Report Discuss

Option: D

Explanation :

Option (a) and option (b) are similar deriving expressions using rule :- (pq)*p = p(qp)*
Option (c) will also be valid since:-

(x+x*+) will be

--->(xx*)(x*x**)

--->(xx*)(x*x*) (Using x** = x*)

--->(xx*)(x*) (Using x*x* = x*)

--->(xx*) (Using x*x* = x*)

--->x+

So, the answer will be all of these (Option d)

6:

A finite state machine with the following state table has a single input x and a single output z. If
initial state is unknown, then shortest input sequence to reach the inal state C is

Present state Next state, z

X=1 X =0

A D, 0 B, 0

B B, 1 C, 1

C B, 0 D, 1

D B, 1 C, 0

A. 01

B. 10

C.110

D.110
Answer Report Discuss

Option: B

Explanation :

Click on Discuss to view users comments.

7:

An FSM can be used to add how many given integers ?

A. 1

B. 3

C.4

D.2

Answer Report Discuss

Option: D

Explanation :

Finite Automata (FA) or Finite State Machine to add two integers can be constructed using
two states:
q0: Start state to represent carry bit is 0
q1: State to represent carry bit is 1

Click on Discuss to view users comments.

8:

If two finite state machines are equivalent, they should have the same number of

A. states

B. edges

C.states and edges

D.none of these

Answer Report Discuss

Option: D
Explanation :

Click on Discuss to view users comments.

9:

For which of the following applications regular expressions can be used ?

A. Designing compilers

B. Developing text editors

C.Simulating sequential circuits

D.All of these

Answer Report Discuss

Option: D

Explanation :

Click on Discuss to view users comments.

10:

L = {aP | p ; } is prime is

A. regular

B. not regular

C.accepted by DFA

D.accepted by PDA

Answer Report Discuss

Option: B

11:

In an incompletely specified automata

A. no edge should be labelled epsilon

B. from any given state, there can't be any token leading to two different states

C.both (a) and (b)


D.start state may not be there

Answer Report Discuss

Option: D

Explanation :

Click on Discuss to view users comments.

12:

If f : {a, b}* —> (a, b}* be given by f (n) = ax for every value of n ∈ (a, b}, then f is

A. one to one not onto

B. one to one and onto

C.not one to one and not onto

D.not one to one and onto

Answer Report Discuss

Option: A

Explanation :

Click on Discuss to view users comments.

13:

The word 'formal' in formal languages means

A. the symbols used have well-defined meaning

B. they are unnecessary, in reality

C.only form of the string of symbols is significant

D.Both (a) and (b)

Answer Report Discuss

Option: C

Explanation :

Click on Discuss to view users comments.

14:
Running time of NFA to DFA conversion including the case where NFA has e-transition is

A. 0 (n3)

B. 0 (n332)

C.0 (n32n)

D.0 (n22n)

Answer Report Discuss

Option: C

Explanation :

Click on Discuss to view users comments.

15:

Which of the following statements is/are false ?

A. The task of lexical analyzer is to translate the input source language text into tokens
and determine the groups of tokens are inter-related.
B. Two basic approaches to translation are generation and interpretation.

C.A load-and-go compiler is capable o translating the source language text on a host
machine A that can be later run on any target machine B.
D.None of these

Answer Report Discuss

Option: D

16:

Which of the following are not regular ?

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

B. Set of all palindromes made up of 0's and 1's

C.Strings of 0's, whose length is a prime number

D.All of these

Answer Report Discuss


Option: D

Explanation :
Strings of odd number of zeroes can be generated by the regular expression (00)
*0.Pumping lemma can be used to prove the non-regularity of the other options.

Click on Discuss to view users comments.

17:

The main difference between a DFSA and an NDFSA is

A. in DFSA, ε transition may be present

B. in NDFSA, ε transitions may be present

C.in DFSA, from any given state, there can't be any alphabet leading to two diferent states

D.in NDFSA, from any given state, there can't be any alphabet leading to two diferent states

Answer Report Discuss

Option: C

Explanation :

Click on Discuss to view users comments.

18:

If w ∈ (a, b)* satisfy abw = wab, then (w) is

A. even

B. odd

C.null

D.none of these

Answer Report Discuss

Option: A

Explanation :

Click on Discuss to view users comments.

19:
A PDM behaves like an FSM wnen the number of auxiliary memory it has, is

A. 0

B. 1

C.2

D.None of these

Answer Report Discuss

Option: A

Explanation :

Click on Discuss to view users comments.

20:

Finite state machine can recognize

A. any grammar

B. only context-free grammar

C.Both (a) and (b)

D.only regular grammar

Answer Report Discuss

Option: D

21:

The major difference between a moore and mealy machine is that

A. output of the former depends on the present state and present input

B. output of the former depends only on the present state

C.output of former depends only on the present input

D.all of these

Answer Report Discuss

Option: B
Explanation :

Click on Discuss to view users comments.

22:

Any given transition graph has an equivalent

A. regular expression

B. DFSM

C.NDFSM

D.all of these

Answer Report Discuss

Option: D

Explanation :

Click on Discuss to view users comments.

23:

For which of the following application, regular expressions cannot be used ?

A. Designing computers

B. Designing compilers

C.Both (a) and (b)

D.Developing computers

Answer Report Discuss

Option: D

Explanation :
Click on Discuss to view users comments.

24:

If S be an infinite set and be sets such that S1 ∪ S2 ∪ .....∪ SN = S, then

A. atleast one of the set Si is a finite set

B. not more than one of the sets Si can be finite

C.atleast one of the sets Si is an infinite set

D.not more than one of the sets Si can be infinite

Answer Report Discuss

Option: C

Explanation :

Click on Discuss to view users comments.

25:

Vienna Definition Language is an example of language definition facility based on

A. Mathematical semantics

B. Interpretative semantics

C.Translational semantics

D.Axiomatic semantics

Answer Report Discuss

Option: A

26:
Which of the following regular expressions denotes a language comprising all possible
strings over the alphabet {a, b } ?

A. a* b*

B. (a | b)*

C. (ab)+

D. (a | b*)

Answer Report Discuss

Option: B

Explanation :

Click on Discuss to view users comments.

27:

An FSM (Finite State Machine) can be considered to be a TM (Turing Machine) of finite tape
length

A. without rewinding capability and unidirectional tape movement.

B. rewinding capacity, and unidirectional tape movement

C.without rewinding capability and bidirectional tape movement

D.rewinding capability and bidirectional tape movement

Answer Report Discuss

Option: A

Explanation :

Click on Discuss to view users comments.

28:

Palindromes can't be recognized by any FSM because

A. FSM can't remember arbitrarily large of information

B. FSM can't deterministically fix the mid-point


C.even if mid-point is known, FSM be can't be found whether, second half of the
string matches the first half

D.all of these

Answer Report Discuss

Option: D

Explanation :

Click on Discuss to view users comments.

29:

If ∑ = {a, b, c, d, e, f } then number of strings in ∑ of length 4 such that no symbol is used more
than once in a string is

A. 35

B. 360

C.49

D.720

Answer Report Discuss

Option: B

Explanation :

Here string length is 4 so we can create string of length 4 by 6 values. Suppose at first place
we can arrange any value by 6 methods.so 6. then Remaining total numbers are 5 so we
can arrange them by 5 methods at second place. then remaining total numbers are 4 so
we can arrange them by 4 methods. now remaining total numbers are 3 and we can
arrange them by 3 methods. so according to permutation technique. We multiply them i.e.
6*5*4*3=360. So, 'B'

Click on Discuss to view users comments.

30:

A language L is accepted by a finite automaton if and only if it is

A. context - free

B. context-sensitive
C.recursive

D.Right-linear

Answer Report Discuss

Option: D

31:

Can a DFA simulate NFA?

A. NO

B. YES

C.SOMETIMES

D.Depends on NFA

Answer Report Discuss

Option: B

Explanation :

Click on Discuss to view users comments.

32:

Which of the following statements is wrong ?

A. The language accepted by finite automata are the languages denoted by regular
expressions

B. For every DFA there is a regular expression denoting its language

C.For a regular expression r, there does not exist NFA with L(r) any transit that accept

D.None of these

Answer Report Discuss

Option: C

Explanation :
Click on Discuss to view users comments.

33:

Regular expression a / b denotes the set

A. {a}

B. { ∈ , a, b }

C.{a, b}

D.{ ab }

Answer Report Discuss

Option: C

Explanation :

Click on Discuss to view users comments.

34:

Regular expression (a | b ) (a | b) denotes the set

A. { a, b, ab, aa }

B. { a, b, ba, bb }

C.{ a, b }

D.{ aa, ab, ba, bb }

Answer Report Discuss

Option: D

Explanation :

Click on Discuss to view users comments.

35:

Which of the following regular expressions denotes zero or more instances of an a or b ?

A. a | b

B. (ab)*
C. (a | b)*

D.a* I b

Answer Report Discuss

Option: C

36:

Which of the following regular expressions denotes a language comprising all possible
strings of even length over the alphabet ( 0 , 1 ) ?

A. (0 | 1) *

B. (0 | 1) (0 | 1)*

C.(00 01 10 11 )*

D.(0 | 1 ) (0 | 1)(0 | 1 ) *

Answer Report Discuss

Option: C

Explanation :

Click on Discuss to view users comments.

37:

The regular expression (a | b)* denotes the set of all strings

A. with zero or more instances of a or b

B. with one or more instances of a or b

C.equal to regular expression (a* b*)*

D.both (a) and (c)

Answer Report Discuss


Option: D

Explanation :

Click on Discuss to view users comments.

38:

The string (a) | ((b) * (c)) is equivalent to

A. set of strings with either a or zero or more b's and one c

B. set of strings with either a or one or more b's and one c

C.b* c l a

D.both (a) and (c)

Answer Report Discuss

Option: C

Explanation :

Click on Discuss to view users comments.

39:

An automation is a __________ device and a grammar is a __________ device.

A. generative, cognitive

B. generative, acceptor

C.acceptor, cognitive

D.cognitive, generative

Answer Report Discuss

Option: D

Explanation :

Click on Discuss to view users comments.


40:

In the figure given below, a deterministic finite automation M has start state A and
accepting state D. Which of the following regular expression denoted the set of all words
accepted by
M?

A. 001

B. 10 * 1 * 0

C.( 0 | 1) * 011

D.1* 0 * 001

Answer Report Discuss

Option: C

41:

The regular sets are closed under

A. union

B. concatenation

C.Kleene's closure

D. all of these

Answer Report Discuss

Option: D
Explanation :

Click on Discuss to view users comments.

42:

Dynamic errors can be detected at

A. compile time

B. Run time

C.both (a) and (b)

D.none of these

Answer Report Discuss

Option: B

Explanation :

Click on Discuss to view users comments.

43:

If a and b be the regular expressions, then ( a* ∪ b* ) * is equivalent to

A. (a ∪ b) *

B. (b* ∪ a*)*

C. (b ∪ a)*

D.All of above

Answer Report Discuss

Option: D

Explanation :

Click on Discuss to view users comments.

44:

Finite state machines _________ recognize palindromes


A. can

B. can't

C.may

D.may not

Answer Report Discuss

Option: B

Explanation :

Click on Discuss to view users comments.

45:

If S and T be language over Σ = {a, b } represented by regular expression (a + b * ) * and (a + b)


* , respectively, then

A. S ⊂ T

B. T⊂ S

C. S = T

D.S ∩ T= φ

Answer Report Discuss

Option: C

46:

Consider regular expression (0 + 1) (0 + 1) ....... n times. 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

Answer Report Discuss


Option: B

Explanation :

Click on Discuss to view users comments.

47:

If regular set A is represented by A = (01 + 1)* and the regular set 'B' is represented by B =
((01)*1*)*, then

A. A ⊂ B

B. B ⊂ A

C.A and B are uncomparable

D. A=B

Answer Report Discuss

Option: D

Explanation :

Click on Discuss to view users comments.

48:

Which of the following can be recognized by a Deterministic Finite-state Automaton ?

A. Numbers, 1,2,4, ....... zN ..... written in binary.

B.

Numbers 1, 2, 4, ........, zN ...... written in unbinary.


C.Set of binary string in which number of zeros is same as the number of ones.

D. Set (1,101,11011,1110111, ......}

Answer Report Discuss

Option: A

Explanation :

Click on Discuss to view users comments.

49:
Which of the following are not regular ?

A. String of 0’s whose length is a perfect square

B. Set of all palindromes made up of 0’s and 1's

C.Strings of 0’s, whose length is a prime number

D.All of these

Answer Report Discuss

Option: D

Explanation :

Click on Discuss to view users comments.

50:

An FSM with

A. 1 stack is more powerful than an FSM with no stack

B. 2 stacks is more powerful than a FSM with 1 stack

C.both (a) and (b)

D.none of these

Answer Report Discuss

Option: C

51:

If w ∈ (a, b)* satisfy abw = wab, then (w) is

A. even

B. odd

C.null

D.none of these

Answer Report Discuss

Option: A
Explanation :

Click on Discuss to view users comments.

52:

A PDM behaves like an FSM wnen the number of auxiliary memory it has, is

A. 0

B. 1

C.2

D.none of these

Answer Report Discuss

Option: A

Explanation :

Click on Discuss to view users comments.

53:

A finite state machine with the following state table has a single input x and a single output z

Present state Next state, z

If the initial state is unknown, then shortest


x=1 x=0
input sequence to reach the final state C is

A D, 0 B, 0 A. 01

B. 10
B B,1 C,1
C.10

C B, 0 D, 1 D.110

Answer Report Discuss


D B, 1 C, 0
Option: B
Explanation :

Click on Discuss to view users comments.

54:

FSM shown in the figure

A. all strings

B. no string

C. ε- alone

D.none of these

Answer Report Discuss

Option: C

Explanation :

Click on Discuss to view users comments.

55:

If f : {a, b}* ---> {a , b } * be given by f(n) = ax for every value of n ∈ {a, b}, then f is

A. one to one not onto

B. one to one and onto

C.not one to one and not onto

D.not one to one and onto

Answer Report Discuss

Option: A

56:

If two finite states machine M and N are isomorphic, then

A. M can be transformed to N, merely re-labelling its states

B. M can be transformed to N, merely re-labelling its edges

C.M can be transformed to N, merely re-labelling its edges


D.none of these

Answer Report Discuss

Option: A

Explanation :

Click on Discuss to view users comments.

57:

Regular expression corresponding to the state diagram given in the figure is

A. (0+1(1 + 01)* 00)*

B. (1 + 0 (0 + 10) 00)*

C.(0 + 1 (1 + 10) 00)*

D.(1 + 0(1 + 00) 11)*

Answer Report Discuss

Option: A

Explanation :

Click on Discuss to view users comments.

58:

Two finite state machines are said to be equivalent if they

A. have same number of states

B. have same number of edges

C.have same number of states and edges

D.recognize same set of tokens

Answer Report Discuss

Option: C

You might also like