Questions 21–30 of 83. Imported answers require independent review unless marked reviewed.

Topic practice 83 questionsPage 3 of 9

Question 23

Open question
CS1MSQ1 markNeeds review
Let

be two regular languages and

a language which is not regular. Which of the following statements is/are always TRUE?
Your answerSelect all correct options. You can choose more than one.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 38

Open question
CS1MCQ2 marksNeeds review
Consider the following grammar

, with

as the start symbol. The grammar

has three incomplete productions denoted by (1), (2), and (3).



The set of terminals is

. The FIRST and FOLLOW sets of the different non-terminals are as follows.


Which one of the following options CORRECTLY fills in the incomplete productions?
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 41

Open question
CSMCQ2 marksNeeds review
Let M be the 5-state NFA with ε-transitions shown in the diagram below.
Diagram for Computer Science and Information Technology question 41

Which one of the following regular expressions represents the language accepted by M?
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 50

Open question
CS1MSQ2 marksNeeds review
Consider the 5-state DFA

accepting the language

shown below. For any string

let

be the number of 0's in

and

be the number of 1's in

.
Diagram for Computer Science and Information Technology question 50

Which of the following statements is/are FALSE?
Your answerSelect all correct options. You can choose more than one.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 52

Open question
CSMSQ2 marksNeeds review
Consider a context-free grammar G with the following 3 rules.
S → aS, S → aSbS, S → c
Let w ∈ L(G). Let n_a(w), n_b(w), n_c(w) denote the number of times a, b, c occur in w, respectively. Which of the following statements is/are TRUE?
Your answerSelect all correct options. You can choose more than one.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 59

Open question
CS1NAT2 marksNeeds review
Let

be a context-free grammar in Chomsky Normal Form with

and

containing 10 variable symbols including the start symbol

. The string

is derivable from

. The number of steps (application of rules) in the derivation

is ________

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 61

Open question
CS1NAT2 marksNeeds review
Consider the following two regular expressions over the alphabet :


The total number of strings of length less than or equal to 5, which are neither in

nor in

, is ________.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 62

Open question
CSNAT2 marksNeeds review
Let

be the language represented by the regular expression

and

, where

denotes the length of string

. The number of strings in

which are also in

is ________

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 14

Open question
CSMCQ1 markNeeds review
Consider the Deterministic Finite-state Automaton (DFA) shown below. The DFA runs on the alphabet

, and has the set of states

, with

being the start state and

being the only final state.
Diagram for Computer Science and Information Technology question 14

Which one of the following regular expressions correctly describes the language accepted by

?
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 19

Open question
CSMCQ1 markNeeds review
Consider the following definition of a lexical token id for an identifier in a programming language, using extended regular expressions:
letter

[A–Za–z] digit

[0–9] id

letter (letter

digit)

Which one of the following Non-deterministic Finite-state Automata with

-transitions accepts the set of valid identifiers? (A double-circle denotes a final state)
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer