Discrete I - Test 1
Finite state machine ___ recognize palindromes a) Can b) Cannot c) May d) May not
b
Consider the following two statementsL S1: {0^2n | n >= 1} is a regular language S2: {0^m 0^n 0^(m+n) is a regular language Which of the following statements is correct? a) Only S1 is correct b) Only S2 is correct c) Both S1 and S2 is correct d) Neither are correct
c
The regular expressions denote zero or more instances of an x or y is a) (x+y) b) (x+y) * c) (x * + y) d) (xy) *
b
A language is regular if and only if it is accepted by a finite automation? a) the given statement is true b) the given statement is false c) the given statement is partially true d) Sometimes true, sometimes false
a
Let L = {a^i b^j c^k | i <= k or j <= k}. Min(L) is a) {a^i b^j c^k | , i, j >= 0, k=min(i, j)} b) {} c) {lambda} d) {a^i b^j c^k | i,j >= 0, k = max(i, j)}
a
The basic limitation of a FSM is that a) It cannot remember arbitrary large amounts of information b) It sometimes recognizes grammar that are not regular c) It sometimes fails to recognize grammars that are regular d) All of the above
a
The behavior of a NFA can be simulated by DFA a) Always b) Sometimes c) Never d) Depend on NFA
a
The logic of pumping lemma is a good example of a) The pigeon hole principle b) Divide and conquer method c) Iteration d) Recursion
a
The number of eight-bit strings beginning with either 111 or 101 is a) 64 b) 128 c) 265 d) None of the above
a
Which of the following string can be obtained by the language L = {a^ib^2i | i >= 1}? a) aaabbbbbb b) aabbb c) abbabbba d) aaabbbabb
a
Let R1 and R2 be regular sets defined over alphabet (S) then a) R1 union R2 is regular b) R1 intersection R2 is regular c) S intersection R2 is not regular d) R2 * is not regular
a and b
Which of the following are not regular? a) Strings 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) String of odd numbers of zeros
a, b and c
Which of the following pairs of regular expressions are equivalent? a) 1(01) * and (10) * 1 b) x(xx) * and (xx) * x c) (ab) * and a * b * d) x * and x * x *
a, b, and d
Palindromes cannot be recognized by any FSM because a) an FSM does not have the capability to remember information b) an FSM cannot deterministically fix the mid-point c) even if the mid-point is known, an FSM can't find whether the second half of the string matches the first half d) none of the above
a,b, and c
Consider the regular expression (a+b)(a+b)...(a+b) (n times). The minimum number of state in a finite automaton that recognizes the language represented by this regular expression contains a) n states b) (n+1) states c) (n+2) states d) 2n states
b
Define Min(L) = {w | w belongs to L and no proper prefix of w is in L} = {w | w belongs to L and if w=xy, where x belongs to S' and y belongs to S, then x does not belong to L} and Max(L) = {w | w belongs to L and w is not the proper prefix of any word in L} = {w | w belongs to L and if y belongs to S' then wy does not belong to L}. Min(0(0+1)*) and Max(01+0+10), respectively: a) {} and {01, 10} b) {0} and {01, 10} c) {0} and {0, 10} d) {} and {1, 10}
b
Given an arbitrary non-deterministic finite automaton (NFA) with N states, the maximum number of states in an equivalent minimized DFA is at most: a) N^2 b) 2^N c) 2N d) N!
b
Pumping lemma is generally used for proving a) a given language is regular b) a given language is not regular c) whether two given regular expressions are not equivalent d) none of the above
b
The graphical representation of the transition of a finite automaton is a) finite diagram b) state diagram c) node diagram d) E-R diagram
b
The regular expression having all strings in which any number of 0's is followed by any number of 1's followed by any number of 2's is a) (0 + 1 + 2) * b) 0 * 1 * 2 * c) 0 * + 1 + 2 d) (0+1) * 2 *
b
The regular expression with all strings of 0's and 1's with at at least two consecutive 0's is a) 1 + (10) * b) (0+1) * 00(0+1) * c) (0+1) * 011 d) 0 * 1 * 2 *
b
What is the complement of the language accepted by the NFA shown below? Assume the alphabet = {a} and lambda is the empty string. a) empty set b) lambda c) a d) {a, lambda}
b
Write the regular expression to denote the language L over an alphabet S = {a, b} such that all the strings do not contain the substring ab a) a * b * b) b * a * c) (ab) * d) (ba) *
b
Assume L is regular and L=L(A), where A=(Q, S, T, q, F) is a DFA with no state unreachable from q0. Min(L) is regular because we can construct A(m|n) ={Q union {dead}, S, T(m|n), q0, F} where a belongs to S a) T(m|n) (q, a) = T(q,a), if q belongs to Q; T(m|n) (q, a) = dead, if q belongs to F, T(m|n) (dead, a) = dead b) T(m|n) (q, a) = T(q,a), if q belongs to Q-F; T(m|n) (q, a) = dead, if q belongs to Q, T(m|n) (dead, a) = dead c) T(m|n) (q, a) = T(q,a), if q belongs to Q-F; T(m|n) (q, a) = dead, if q belongs to F, T(m|n) (dead, a) = dead d) T(m|n) (q, a) = T(q,a), if q belongs to Q-F; T(m|n) (q, a) = dead, if q belongs to F-Q, T(m|n) (dead, a) = dead
c
Given the language L = {ab, aa, baa}, which of the following strings are in L *? 1) abaabaaabaa 2) aaaabaaaa 3) baaaaabaaaab 4) baaaaabaa a) 1, 2 and 3 b) 2, 3 and 4 c) 1, 2 and 4 d) a, 3 and 4
c
Let A1 = {Q1,Sum,T1, q0, F1}, A2={Q2,Sum,T2, q0, F2} be arbitrary DFA's. L(A1) = L(A2) is a regular because we can construct A3 = {Q1 x Q2, Sum, T3, < q0, s0 >, F3} where T3(<q, s>, a) = <T1(q, a), T2(q, a)>; q belongs to Q, s belongs to Q, a belongs to 1 and F3 is a) (F1 x Q2) union (Q1 x F2)A2 b) F1xF2 c) F1x(Q2-F2) d) F1x(Q2-F2) union (Q1-F1)xF2
c
Let S and T be languages over {a, b} represented by the regular expressions (a+b*)* and (a+b) * respectively. Which of the following is true? a) S is a subset of T b) T is subset of S c) S = T d) S intersect T is the empty set
c
The recognizing capabilities of NDFSM and DFSM a) is different b) sometimes different c) is the same d) none of these
c
The regular expression having all strings of 0's and 1's with no two consecutive 0's is a) (0+1) b) (0+1) * c) (0 + lambda)(1+10) * d) (0+1) * 011
c
Which of the following languages over the alphabet {0, 1} is described by the regular expression (0+1) * 0(0+1) * 0(0+1) * ? a) The set of all strings containing the substring 00 b) The set of all strings containing at most two 0's c) The set of all strings containing at least two 0's d) The set of all strings that begin and end with either 0 or 1
c
Write a regular expression denoting a language L which accepts all the strings which begins or ends with either 00 or 11 a) [(00(0+1) * 11] + [11(0+1) * 00] b) [(00+11)(0+1) * ]+[(0+1) * (00+11)] c) [(00+11)(0+1) * ]+[(0+1) * (00+11)] d) (00+11)(0+1) * (00+11)
c
Any given transition graph (diagram) has an equivalent a) Regular expressions b) DFSM (Deterministic Finite State Machine) c) NDFSM d) All of them
d
Assume some class of languages, C, is closed under concatenation, intersection with regular and substitution of members of C. Let S' = {a' | a belongs to S}, h(a)=a, h(a') = lambda, g(a) = a, f(a)={a, a} where a belongs to S. Define EXTERIOR(L) = {xz | there exists a y that belongs to S' where xyz belongs to L}. EXTERIOR(L) is regular because it can be defined as: a) h( f(L) intersection (S' dot g(S'))) b) h( f(L) intersection ( g(S') dot S')) c) h( f(L) intersection ( g(S') dot S' dot g(S'))) d) h( f(L) intersection ( S' dot g(S') dot S'))
d
Given L1={a * baa * } and L2={ab * }. The regular expression corresponding ton language L3=L1/L2 (right quotient) is given by a) a * b b) a * baa * c) a * ba * d) None of the above
d
Regular expression for the language L = {w belongs to {0, 1} * | w has no pair of consecutive zeros} is a) {1 + 010} * b) {01 + 10}* c) {1 + 010} * (0 + lambda) d) {1 + 01} * (0 + lambda)
d
Set of regular languages over a given alphabet set is not closed under a) Union b) Complementation c) Intersection d) None of the above
d
The regular expression denotes a language comprising all of possible strings of even length over the alphabet {0, 1} a) 1 + 0(1+0) * b) (0 + 1)(1 + 0) * c) (1 + 0) d) (00 + 0111 + 10) *
d
The regular sets are closed under a) Union b) Concatentation c) Kleen closure d) All of the above
d
Which of the following is NOT the set of regular expression R={ab+abb) * bbab? a) ababbbbab b) abbbab c) ababbabbbab d) abababab
d