+ All Categories
Home > Documents > · Web viewb) ((e|a)b*)* The expression denotes the set of all strings over the alphabet...

· Web viewb) ((e|a)b*)* The expression denotes the set of all strings over the alphabet...

Date post: 24-Mar-2018
Category:
Upload: vannhu
View: 233 times
Download: 5 times
Share this document with a friend
168
MIDTERM EXAMINATION Spring 2009 CS402- Theory of Automata (Session - 1) Question No: 1 ( Marks: 1 ) - Please choose one Alphabet S = {a,bc,cc} has number of letters. One Two Three Four Questi on No: 2 ( Marks: 1 ) - Please choose one In which of the following language Rev(s)=s EQUAL INTEGER PALINDROME FACTORIAL Question No: 3 ( Marks: 1 ) - Please choose one If S = {ab, bb}, then S* will not contain
Transcript

MIDTERM EXAMINATION

Spring 2009CS402- Theory of Automata (Session - 1)

Question No: 1 ( Marks: 1 ) - Please choose one

Alphabet S = {a,bc,cc} has number of letters.

One

Two

Three

Four

Question No: 2 ( Marks: 1 ) - Please choose one

In which of the following language Rev(s)=s

EQUAL

INTEGER

PALINDROME

FACTORIAL

Question No: 3 ( Marks: 1 ) - Please choose one

If S = {ab, bb}, then S* will not contain

abbbab

bbba

bbbbab

ababbb

Question No: 4 ( Marks: 1 ) - Please choose one

a,b

1 – 2 +

a,bAbove given FA generates the language having strings of

ODD length

EVEN length

Equal number of a’s and b’s

None of these

Question No: 5 ( Marks: 1 ) - Please choose one

a+b a+b

- aa+bb+

Above given GTG accepts the language in which strings

Contains double a or double b

Contains both a and double b

Depends on the alphabet

None of these

Question No: 6 ( Marks: 1 ) - Please choose one

aa+bb

3- 1

ab+b

a

ab+ba

aa+bb

2

4+If above given TG is drawn like

aa+bb

3 1X

4Then what will be written in place of X.

(ab+ba)(aa+bb)(ba+ab)

(ab+ba)(aa+bb)(ab+ba)

(ab+ba)(aa+bb)*(ab+ba)

(ab+ba)(aa+bb)(ab+ba)*

Question No: 7 ( Marks: 1 ) - Please choose one

FA3 expresses r1r2. Then initial state of FA3 will consist of

Initial state of FA2

Initial state of FA1

Initial states of both FA1 & FA2

Depends on FA’s

Question No: 8 ( Marks: 1 ) - Please choose one

FA3 expresses r1r2. Then there will be at least one final state of FA3 that consist of final state of FA1 and initial state of FA2.

True

False

Depends on language

None of these

Question No: 9 ( Marks: 1 ) - Please choose one

Two machines are said to be equivalent if they print the same output string when the different input string is run on them

True

False

Depends on language

May be or may not be

Question No: 10 ( Marks: 1 ) - Please choose one

Running the string abbabbba on this Moore machine. The outputs will be

q1/0 b q2/1

a a b

q0/1b

b b

aa

q 1/1

a

2q3/0

101111010

01111010

01011110

01010101

Question No: 12 ( Marks: 1 ) - Please choose one

TG can have more than one initial state.

True

False

Depends on alphabets

None of these

Question No: 13 ( Marks: 1 ) - Please choose one

a

a–– +

a b b

b

Above given FA accepts null string.

True

False

FA is not valid

None of these

Question No: 14 ( Marks: 1 ) - Please choose one

If in an NFA, is allowed to be a label of an edge then that NFA is called .

Will not remain NFA

NFA with

NFA with null string

Either "NFA with null string" OR "NFA with "

Question No: 15 ( Marks: 1 ) - Please choose one

One FA has n states and m letters in the alphabet. Then FA will have

number of transitions in the diagram.

(n)+(m)

(m)(n) OR (n)(m)

None of the given options

(m)-(n)

Question No: 16 ( Marks: 1 ) - Please choose one

(a+b)*a(a+b)*b(a+b)* is the RE of language defined over S={a,b} having at least one a and one b

True

False

Such a language does not exist

None of the given options

Question No: 17 ( Marks: 1 )

Is the following statement trure?A regular language can not be infinite.

Question No: 18 ( Marks: 1 )

Can you say that for a certain string there may be more than one paths in a TG?

Question No: 19 ( Marks: 2 )

If a language can be accepted by an FA then it can be accepted by a TG as well. What are the other two statements of kleenes’s theorem?

Question No: 20 ( Marks: 3 )

Describe the method of NFA corresponding to Concatenation of FAs.

Question No: 22 ( Marks: 10 )

Let L be any language. Let us define the transpose of L to be the language of exactly those words that are the words in L spelled backward. If w L then reverse (w) L. for example, if L = {a, abb, bbaab, bbbaa}Then Transpose (L) = {a, bba, baabb, aabbb,

Prove that if there is an FA that accepts L, then there is a TG that accepts the transpose ofL.

MIDTERM EXAMINATION

Spring 2009CS402- Theory of Automata (Session - 2)

Question No: 1 ( Marks: 1 ) - Please choose one

If an alphabet has n number of letter, then number of strings of length m will be

n+m

(n)(m)

mn

nm

Question No: 2 ( Marks: 1 ) - Please choose one

Languages generated by kleene star are always .

Finite

Infinite

Sometimes finite & sometimes infinite

None of the these

Question No: 3 ( Marks: 1 ) - Please choose one

1*(1 + ) = 1* this statement is

True

False

Sometimes true & sometimes false

None of these

Question No: 4 ( Marks: 1 ) - Please choose one

a*b* = (ab)* this expression is

True

False

Can’t be assumed

None of these

Question No: 7 ( Marks: 1 ) - Please choose one

If a language is expressed through TG, then that language will have its RE.

True

False

Depends on language

None of these

Question No: 8 ( Marks: 1 ) - Please choose one

In TG there may exist more than one path for certain string.

True

False

Depends on the language

None of these

Question No: 9 ( Marks: 1 ) - Please choose one

In TG there may exist no paths for certain string.

True

False

Depends on the languageNone of these

Question No: 10 ( Marks: 1 ) - Please choose one

GTG can have final state.

0

1

More than 1

All of the given

Every FA should be

Deterministic

Non- Deterministic

Deterministic & Non- Deterministic

None of these

Question No: 15 ( Marks: 1 ) - Please choose one

If in an NFA, is allowed to be a label of an edge then that NFA is called .

Will not remain NFA

NFA with

NFA with null string

Either "NFA with null string" OR "NFA with "

Question No: 17 ( Marks: 1 )

In transition diagram of an FA, how can we represent initail and final states?

Question No: 18 ( Marks: 1 )

How can we say that two REs are equal?

Question No: 19 ( Marks: 2 )

Can you accept the following statement? Or there is a condition to accept it? For every Mealy machine there is a Moore machine that is equivalent to it.

Question No: 20 ( Marks: 3 )

Let S be all string of a’s and b’s with odd length. What is S*?

Question No: 22 ( Marks: 10 )

Give the recursive deflations for the following languages over the alphabet {a, b}: (i) The language EVENSTRING of all words of even length.(ii) The language ODDSTRING of all words of odd length.

MIDTERM EXAMINATION

Spring 2009CS402- Theory of Automata (Session - 3)

Question No: 1 ( Marks: 1 ) - Please choose one

Length of null string is

Always not equal to 0

Always equal to 0

It has variable length

All are true

Question No: 2 ( Marks: 1 ) - Please choose one

If an alphabet has n number of letter, then number of strings of length m will be

n+m

(n)(m)

mn

nm

Question No: 3 ( Marks: 1 ) - Please choose one

Languages generated by kleene star are always .

Finite

Infinite

Sometimes finite & sometimes infinite

None of the these

Question No: 4 ( Marks: 1 ) - Please choose one

“Every finite language can be expressed by FA”. This statement is .

True

False

Depends on language

None of these

Question No: 5 ( Marks: 1 ) - Please choose one

In FA, if one enters in a specific state but there is no way to leave it, then that specific state is called

Dead States

Waste Baskets

Davey John Lockers

All of these

Question No: 6 ( Marks: 1 ) - Please choose one

In TG there may exist no paths for certain string.

True

False

Depends on the language

None of these

Question No: 7 ( Marks: 1 ) - Please choose one

In GTG’s there may exist no path for a certain string.

True

False

Depends on alphabet

None of these

Question No: 8 ( Marks: 1 ) - Please choose one

In drawing FA3 (which is equal to FA1 + FA2), a state will be declared final if

States of both FA’s are final

At least one state is final

Depends on language

None of the given

Question No: 11 ( Marks: 1 ) - Please choose one

In TG, there may be a transition for null string.

True

False

Can’t show transition for string

None of these

Question No: 12 ( Marks: 1 ) - Please choose one

The machine helps in building a machine that can perform the addition of binary numbers.

Incrementing

Complementing

Decrementing

None of the given

Question No: 13 ( Marks: 1 ) - Please choose one

GTG can have initial state.

Zero

One

More than One

One OR more than One

Question No: 14 ( Marks: 1 ) - Please choose one

One FA has n states and m letters in the alphabet. Then FA will have number of transitions in the diagram.

(n)+(m)

(m)(n) OR (n)(m)

None of the given options

(m)-(n)

Question No: 15 ( Marks: 1 ) - Please choose one

If L1 and L2 are expressed by regular expressions r1 and r2, respectively then the language expressed by r1 + r2 will be

Regular

Ir-regular

Can’t be decided

Another Language which is not listed here

Question No: 16 ( Marks: 1 ) - Please choose one

Which statement is true?

All words are strings

All strings are words

Both are always same

None of these

Question No: 17 ( Marks: 1 )

In transition diagram of an FA, how can we represent initail and final states?

Question No: 18 ( Marks: 1 )

What the Kleene’s Theorem Part I says?

Question No: 20 ( Marks: 3 )

Show that there are exactly 5832 different finite automat with three states x, y, z over the alphabet {a, b}, where x is always the start state.

Question No: 21 ( Marks: 5 )

For proving Kleen's theorm part-II:"If there are more than one transition edges between two states then we can reduce all these transition edges with a single transition edge"

Explain this statement with the help of an example.Question No: 22 ( Marks: 10 )

i) Let S = {ab, bb} and let T = {ab, bb, bbbb} Show that S* = T* ii) Let S = {ab, bb} and let T = {ab, bb, bbb} Show that S* T* iii) What principle does this illustrate?

MIDTERM EXAMINATION

Spring 2009CS402- Theory of Automata (Session - 3)

Question No: 1 ( Marks: 1 ) - Please choose one

Alphabet S = {a,bc,cc} has number of letters.

One

Two

Three

Four

Question No: 2 ( Marks: 1 ) - Please choose one

One language can be represented by more than one RE” this statement is

False

True

Can’t be assumed

None of these

Question No: 3 ( Marks: 1 ) - Please choose one

(a + b)*b is RE for the language defined over S={a,b} having words not ending in a

True

False

Such a language is not regular

None of these

Question No: 4 ( Marks: 1 ) - Please choose one

a,b1

a,b

2+

Above given FA accepts strings defined over S={a , b}

All

Some

All but not null

None of these

Question No: 6 ( Marks: 1 ) - Please choose one

According to 3rd part of the Kleene’s theorem, If a language can be accepted by an RE then it can be accepted by a as well

TG

FA

TG and FA

None of these

Question No: 7 ( Marks: 1 ) - Please choose one

r1 r2

…. 5 ….…

rn .

r1+r2 + …

…. 5 ….

+rn

Above given GTG’s are

Equivalent

Non-equivalent

Non-valid

None of the given

Question No: 8 ( Marks: 1 ) - Please choose one

If FA1 accepts no string and FA2 accepts many strings, then FA1 + FA2 will be equal to

FA1

FA2

May be both

None of the given

Question No: 9 ( Marks: 1 ) - Please choose one

a b b

- +a

a, b

- b +

Above given NFA and FA generate same language.

True

False

FA & NFA can’t be equivalent

None of these

Question No: 10 ( Marks: 1 ) - Please choose one

- a +

Above given structure is a

FA

TG

NFA

FA and NFA

Question No: 11 ( Marks: 1 ) - Please choose one

2 a 4

a,b aa

a,b

1– 6+

b b

3 b 5

a,b

- aaa,bbb

a,b

+

Above given TG’s are .

Equivalent

Non-equivalent

TG’s are not valid

None of these

Question No: 12 ( Marks: 1 ) - Please choose one

a,b –– a +

––

Above given TG has the RE.

(a + b)*a

+ (a + b)*a

None of these

+ (a + b)*a*

Question No: 13 ( Marks: 1 ) - Please choose one

a

a–– +

a b b

b

Above given FA has RE.

(a + b)*a

a(a + b)*

((a + b)*a)*

(a + b)*a & ((a + b)*a)*

Question No: 14 ( Marks: 1 ) - Please choose one

–– b

a,b

+

Above given TG accepts the string.

bb

baba

bbba

all of the given options

Question No: 17 ( Marks: 1 )

What is the difference between Regular Languages and Non Regular Languages?

Question No: 18 ( Marks: 1 )

What is meant by tokenizing a string?

Question No: 19 ( Marks: 2 )

Define the language for the following NFA also write the regular expression for the language?

a,b

1-a

2 a 3+

a,b

Question No: 20 ( Marks: 3 )

Describe the method of NFA corresponding to Concatenation of FAs.

Question No: 21 ( Marks: 5 )

(i) When asked to give a recursive definition for the language PALINDROM over the alphabet S = {a, b}, a student wrote:Rule 1 a and b are in PALINDROM.Rule 2 If x is in PALINDROM, then so are axa and bxbUnfortunately all the words in the language defined above have an odd length and so it is not all of PALINDROM. Fix this problem.(ii) Give a recursive definition for the language EVENPALINDROM of all palindromes of even length

Question No: 22 ( Marks: 10 )

What do you mean by “bypass and state elimination” Also reduce the following TG by eliminating state 3. (Draw reduced TG)

MIDTERM EXAMINATION

Spring 2009CS402- Theory of Automata (Session - 3)

Question No: 1 ( Marks: 1 ) - Please choose one

If r1 and r2 are regular expressions then which of the following is not regular expression.

r1 = r2

r1r2

r1*

r1 – r2

Question No: 2 ( Marks: 1 ) - Please choose one

Which of the following is not a word of language EQUAL?

aaabbb

abbbabaa

abababa

bbbaaa

Question No: 3 ( Marks: 1 ) - Please choose one

If S = {aa, bb}, then S* will not contain..

aabbaa

bbaabbbb

aaabbb

aabbbb

Question No: 4 ( Marks: 1 ) - Please choose one

One language can be represented by more than one RE” this statement is

False

True

Can’t be assumed

None of these

Question No: 5 ( Marks: 1 ) - Please choose one

“Every Infinite language is regular” this statement is

True

False

Can’t be supposed

None of these

Question No: 6 ( Marks: 1 ) - Please choose one

PALINDROME can be defined by more than one regular language

True

False

By only one RE

Some times By only one RE and Some times False

Question No: 7 ( Marks: 1 ) - Please choose one

a,b1

a,b

2+

Above given FA can be expressed as

a* + b*

(ab + ba)*

None of these

Above given TG has RE.

(aa+bb+(ab+ba)(aa+bb)(ab+ba))*

(aa+bb+(ab+ba)(aa+bb)*(ab+ba))*

(aa+ba+(bb+ba)(ab+bb)(ab+aa))*

(ab+ba+(ab+ba)(aa+bb)(ab+ba))*

Question No: 17 ( Marks: 1 )

How can we say that two REs are equal?

Question No: 18 ( Marks: 1 )

What is meant by Kleene star closure of a language?

Question No: 19 ( Marks: 2 )

What the Pumping lemma II says about length(x) + length(y) must be:

Question No: 20 ( Marks: 3 )

Consider the language S*, where S = {ab, ba}, Can any word in this language contain the substrings aaa or bbb? Why or why not?

Question No: 21 ( Marks: 5 )

Give the transition table of an FA3 corresponding to FA1+FA2, where FA1, FA2 are given below.FA1

FA2

Question No: 22 ( Marks: 10 )

What is meant by nondeterminism? Draw the TG for the following RE

(aa)*b(b*+( (aa)+b)*) bb.

MIDTERM EXAMINATIO

NSpring 2009

CS402- Theory of Automata (Session - 3)

Question No: 1 ( Marks: 1 ) - Please choose one

S = {baa, ab}, then S* will not contain

abbaab

abab

baabaa

abbaa

Question No: 2 ( Marks: 1 ) - Please choose one

1*(1 + ) = 1* this statement is

True

False

Sometimes true & sometimes false

None of these

Question No: 3 ( Marks: 1 ) - Please choose one

One language can be represented by more than one RE” this statement is

False

True

Can’t be assumed

None of these

Question No: 4 ( Marks: 1 ) - Please choose one

a(a+b)*a+b(a+b)*b is RE for the language defined over S={a,b} having words beginning

and ending with same letters

True

False

Such a language is not regular

None of these

Question No: 5 ( Marks: 1 ) - Please choose one

b a a

– +

b

Above given FA can be expressed by

(a + b)*a

(a + b)*b

a (a + b)*

b (a + b)*

Question No: 6 ( Marks: 1 ) - Please choose one

If a language has RE, then that language can be expressed through TG.

True

False

Depends on language

None of these

Question No: 7 ( Marks: 1 ) - Please choose one

In TG there may exist no paths for certain string.

True

False

Depends on the language

None of these

Question No: 9 ( Marks: 1 ) - Please choose one

FA1 corresponds to r*, then FA1 must accept string.

Every

Null

Odd length

Even length

Question No: 10 ( Marks: 1 ) - Please choose one

In NFA, there may be more than one transition for certain letters and there may not be any transition for certain letters. This statement is .

False

True

Depends on language

None of the given

Question No: 11 ( Marks: 1 ) - Please choose one

a,b

b – +

Above given TG accepts the language in which all strings

Ends in b

Begins with b

Ends and begins with b

None of the given

Question No: 1 ( Marks: 1 ) - Please choose one

Σ={a,Aa,Abb}, then string aAaAbbAa has ________ length. ► One ► Two ► Three ► Four Question No: 2 ( Marks: 1 ) - Please choose one

Languages generated by kleene star are always ______________. ► Finite ► Infinite ► Sometimes finite & sometimes infinite ► None of the these Question No: 3 ( Marks: 1 ) - Please choose one

Let

S = {aa, bb} be a set of strings then s* will have ► Λ ► abba ► aabbbaa ► bbaab Question No: 4 ( Marks: 1 ) - Please choose one

If r1

= (aa + bb) and r2 = ( a + b) then the language (aa + bb)* will be generated by ► (r1)(r2) ► (r1 + r2) ► (r2)* ► (r1)* Question No: 5 ( Marks: 1 ) - Please choose one

y a, b

x

a, b

Above given FA can be represented by ► ((a+ b) (a + b))* ► (a + b)(a + b)* ► (a + b)(a + b) ► (a + b)*(a + b)* Question No: 6 ( Marks: 1 ) - Please choose one

a,b

2+

1

a,b

Above given FA accepts ___________ strings defined over Σ={a , b} ► All ► Some ► All but not null ► None of these Question No: 7 ( Marks: 1 ) - Please choose one

If a

language can be expressed through FA, then it can also be expressed through TG. ► True ► False ► Depends on language ► None of the above Question No: 8 ( Marks: 1 ) - Please choose one

b

b

3+ a

1-

a

a a

a

4+ b

2-

.b

b

a b

5 6 Above given TG has ____________________ RE. ► a+b+a(a + b)*a + b(a + b)*b ► a(a + b)*a + b(a + b)*b

► both are given ► none of the given Question No: 9 ( Marks: 1 ) - Please choose one

b

b

3+ a

1-

a

a a

a

4+ b

2-

.b

b

a b

5 6 Above given FA accepts the language in which strings ► Begins with and ends in same letter ► Begins with and ends in different letter ► Has length more than 2 ► None of the given Question No: 10 ( Marks: 1 ) - Please choose one

GTG can have _______________ final state. ► 0 ► 1 ► More than 1 ► All of the given Question No: 11 ( Marks: 1 ) - Please choose one

In

GTG, if a state has more than one incoming transitions from a state. Then all those incoming transitions can be reduced to one transition using _____________ sign

► - ► + ► * ► None of the given Question No: 12 ( Marks: 1 ) - Please choose one

aa+bb ab+ba

ab+ba

aa+bb

Λ

4+

3- 2 1

Λ

If above given TG is drawn like

aa+bb

Λ

4+

3-

1

Λ

X

Then what will be written in place of X. ► (ab+ba)(aa+bb)(ba+ab) ► (ab+ba)(aa+bb)(ab+ba) ► (ab+ba)(aa+bb)*(ab+ba) ► (ab+ba)(aa+bb)(ab+ba)* Question No: 13 ( Marks: 1 ) - Please choose one

“One language can be expressed by more than one NFA”. This statement is ______________.

► False ► True ► Depends on NFA ► None of the given Question No: 14 ( Marks: 1 ) - Please choose one

a

^

1-

4+

b 5

a a a

^, b a

2

3

Above given structure is an ________. ► FA ► NFA ► NFA -^ ► TG Question No: 15 ( Marks: 1 ) - Please choose one

One

FA has 3 states and 2 letters in the alphabet. Then FA will have ___________ number of transitions in the diagram ► 4 ► 5 ► 7 ► 6 Question No: 16 ( Marks: 1 ) - Please choose one

aa

b

bb

a

1-

2-

3+

4+

b

a

Above given two TG’s are _______________.

► Equivalent ► None-equivalent ► Not valid ► None of the given Question No: 17 ( Marks: 1 )

What do you mean by dead state? Question No: 18 ( Marks: 1 )

Define empty or null strings? Question No: 19 ( Marks: 2 )

Write strings that ends on "a" and strings containing exactly one "a". over Σ= {a, b} Question No: 20 ( Marks: 3 )

Let S be all string of a’s and b’s with odd length. What is S*? Question No: 21 ( Marks: 5 )

Give the transition table of an FA3 corresponding to FA1+FA2, where FA1, FA2 are given below.FA1

FA2

Question No: 22 ( Marks: 10 )

Give the regular expression and draw the GTG for the following language.Language L of strings, defined over Σ = {a, b}, beginning with and ending in same letters.

In which of the following language Rev(s)=s1. Equal2. Integer3. Palindrome4. Factorial

Q1A DFA with n states must accept at least one string of length greater than n.Choices:

1. True2. False

Q2FA corresponding to an NFA can be built by introducing a state corresponding to the combination of states, for a letter havingChoices:

1. no transition at certain state2. one transition at certain state3. more than one transitions at certain state4. none of the given options

Q3Which of the following statement is NOT true?Choices:

1. FA can be considered to be an NFA2. FA can be considered to be an NFA with null string3. NFA can be considered to be an TG4. TG can be considered to be an NFA

Q4For every three regular expressions R, S, and T, the languages denoted by R(S U T) and (RS) U (RT) are the same.

Choices:1. True2. False

Q5Does the empty string match the regular expression |y+a|?Choices:

1. Yes2. No

Q6If an FA already accepts the language expressed by the closure of certain RE, then the given FA is the required FA.Choices:

1. True2. False

Q7Which of the following statement is true about NFA with Null String?Choices:

1. Infinite states2. Infinite set of letters3. Infinite set of transitions4. Transition of null string is allowed at any stage

Q8If R is a regular language and L is some language, and L U R is a regular language, then L must be a regular language.Choices:

1. True2. False

Q9FA corresponding to an NFA can be built by introducing an empty state for a letter havingChoices:

1. no transition at certain state 2. one transition at certain state3. two transition at certain state4. more than two transitions at certain state

Q10Let FA3 be an FA corresponding to FA1FA2, then the initial state of FA3 must correspond to the initial state ofChoices:

1. FA1 only2. FA2 only3. FA1 or FA24. FA1 and FA2

If an FA accept a word then there must exist a path from1. Initial to final state.2. Initial to each state3. Initial to each state but not to final state.

4. Initial to final state by traversing each state

If an FA has N state then it must accept the word of length1. n-12. state3. transition4. input tape

The part of an FA, where the input string is placed before it is run, is called _______1. state2. transition3. input tape4. output tape

The complement of a regular language is also a regular1. True 2. False

A PDA is not in conversion form if ___________1. There are more than one ACCEPT states2. There are more than one REJECT states3. Every READ or HERE is followed immediately by a put4. All of the given options

In conversion form of PDA there is no……… state1. Push 2. Read

Consider the following production (of a CFG): S->XYZ Here ______ is left most non-terminal in working string. Note: S, X, Y and Z are all non-terminals

1. S2. X3. Y 4. Z

Which of the following states is not part of PDA1. Start2. Accept3. Write4. reject

The tree which produced all the strings of a language is called1. Derivation tree2. Ambiguous tree3. Total language tree4. Non-Ambiguous tree

Question # 1 of 10 ( Start time: 05:46:41 PM ) Total Marks: 1While finding RE corresponding to TG, If TG has more than one start state thenSelect correct option:Introduce the new start stateEliminate the old start stateReplace the old start state with final stateReplace the old final state with new start state

Question # 21. While finding RE corresponding to TG, we connect the new start state to the old start

state by the transition labeled bySelect correct option:abnull stringNone of the given options

Question # 3 of 10 ( Start time: 05:49:03 PM ) Total Marks: 1Which of the following regular expression represents same language? a. (a+ab)* b. (ba+a)* c. a*(aa*b)* d. (a*b*)* a+b)*a(a+b)*b(a+b)*+ (a+b)*b(a+b)*a(a+b)*.

{ x}*, { x}+, {a+b}*

Select correct option:a and ba and cc and d

Question # 4 of 10 ( Start time: 05:50:32 PM ) Total Marks: 1(a* + b*)* = (a + b)* this expression is __________Select correct option:TrueFalse

Question # 5 of 10 ( Start time: 05:51:30 PM ) Total Marks: 1Let FA3 be an FA corresponding to FA1+FA2, then the initial state of FA3 must correspond to the initial state ofSelect correct option:FA1 onlyFA2 onlyFA1 or FA2FA1 and FA2

Question # 6 of 10 ( Start time: 05:53:01 PM ) Total Marks: 1Which of the following statement is NOT true about TG?Select correct option:

There exists exactly one path for certain stringThere may exist more than one paths for certain stringThere may exist no path for certain stringThere may be no final state

Question # 7 of 10 ( Start time: 05:54:06 PM ) Total Marks: 1Kleene’s theorem statesSelect correct option:All representations of a regular language are equivalent.All representations of a context free language are equivalent.All representations of a recursive language are equivalentFinite Automata are less powerful than Pushdown Automata.

Question # 8 of 10 (Start time: 05:55:36 PM) Total Marks: 1What do automata mean?Select correct option:Something done manuallySomething done automatically

Question # 9 of 10 ( Start time: 05:56:51 PM ) Total Marks: 1A language accepted by an FA is also accepted bySelect correct option:TG onlyGTG onlyRE onlyAll of the given

Question # 10 of 10 ( Start time: 05:58:16 PM ) Total Marks: 1If r1 = (aa + bb) and r2 = (a + b) then the language (aa + bb)(a + b) will be generated bySelect correct option:(r1)(r2)(r1 + r2)(r2)(r1)(r1)*

Question No: 1 ( Marks: 1 ) - Please choose one

Σ={a,Aa,Abb}, then string aAaAbbAa has ________ length. ► One ► Two ► Three ► Four Question No: 2 ( Marks: 1 ) - Please choose one

Languages generated by kleene star are always ______________. ► Finite ► Infinite ► Sometimes finite & sometimes infinite ► None of the these

Question No: 3 ( Marks: 1 ) - Please choose one

Let

S = {aa, bb} be a set of strings then s* will have ► Λ ► abba ► aabbbaa ► bbaab Question No: 4 ( Marks: 1 ) - Please choose one

If r1

= (aa + bb) and r2 = ( a + b) then the language (aa + bb)* will be generated by ► (r1)(r2) ► (r1 + r2) ► (r2)* ► (r1)* Question No: 5 ( Marks: 1 ) - Please choose one

y a, b

x

a, b

Above given FA can be represented by ► ((a+ b) (a + b))* ► (a + b)(a + b)* ► (a + b)(a + b) ► (a + b)*(a + b)* Question No: 6 ( Marks: 1 ) - Please choose one

a,b

2+

1

a,b

Above given FA accepts ___________ strings defined over Σ={a , b} ► All ► Some ► All but not null ► None of these Question No: 7 ( Marks: 1 ) - Please choose one

If a

language can be expressed through FA, then it can also be expressed through TG. ► True ► False ► Depends on language ► None of the above Question No: 8 ( Marks: 1 ) - Please choose one

b

b

3+ a

1-

a

a a

a

4+ b

2-

.b

b

a b

5 6 Above given TG has ____________________ RE. ► a+b+a(a + b)*a + b(a + b)*b ► a(a + b)*a + b(a + b)*b ► both are given ► none of the given Question No: 9 ( Marks: 1 ) - Please choose one

b

b

3+ a

1-

a

a a

a

4+ b

2-

.b

b

a b

5 6 Above given FA accepts the language in which strings ► Begins with and ends in same letter ► Begins with and ends in different letter ► Has length more than 2 ► None of the given Question No: 10 ( Marks: 1 ) - Please choose one

GTG can have _______________ final state. ► 0 ► 1 ► More than 1 ► All of the given Question No: 11 ( Marks: 1 ) - Please choose one

In

GTG, if a state has more than one incoming transitions from a state. Then all those incoming transitions can be reduced to one transition using _____________ sign

► - ► + ► * ► None of the given Question No: 12 ( Marks: 1 ) - Please choose one

aa+bb ab+ba

ab+ba

aa+bb

Λ

4+

3- 2 1

Λ

If above given TG is drawn like

aa+bb

Λ

4+

3-

1

Λ

X

Then what will be written in place of X. ► (ab+ba)(aa+bb)(ba+ab) ► (ab+ba)(aa+bb)(ab+ba) ► (ab+ba)(aa+bb)*(ab+ba) ► (ab+ba)(aa+bb)(ab+ba)* Question No: 13 ( Marks: 1 ) - Please choose one

“One language can be expressed by more than one NFA”. This statement is ______________.

► False ► True ► Depends on NFA ► None of the given Question No: 14 ( Marks: 1 ) - Please choose one

a

^

1-

4+

b 5

a a a

^, b a

2

3

Above given structure is an ________. ► FA ► NFA ► NFA -^ ► TG Question No: 15 ( Marks: 1 ) - Please choose one

One

FA has 3 states and 2 letters in the alphabet. Then FA will have ___________ number of

transitions in the diagram ► 4 ► 5 ► 7 ► 6 Question No: 16 ( Marks: 1 ) - Please choose one

aa

b

bb

a

1-

2-

3+

4+

b

a

Above given two TG’s are _______________.

► Equivalent ► None-equivalent ► Not valid ► None of the given Question No: 17 ( Marks: 1 )

What do you mean by dead state? Question No: 18 ( Marks: 1 )

Define empty or null strings? Question No: 19 ( Marks: 2 )

Write strings that ends on "a" and strings containing exactly one "a". over Σ= {a, b} Question No: 20 ( Marks: 3 )

Let

S be all string of a’s and b’s with odd length. What is S*? Question No: 21 ( Marks: 5 )

Give the transition table of an FA3 corresponding to FA1+FA2, where FA1, FA2 are given below.FA1

FA2

Q1A DFA with n states must accept at least one string of length greater than n.Choices:TrueFalse

Q2FA corresponding to an NFA can be built by introducing a state corresponding to the combination of states, for a letter havingChoices:no transition at certain stateone transition at certain statemore than one transitions at certain statenone of the given options

Q3Which of the following statement is NOT true?Choices:

1. FA can be considered to be an NFA2. FA can be considered to be an NFA with null string3. NFA can be considered to be an TG4. TG can be considered to be an NFA

Q4For every three regular expressions R, S, and T, the languages denoted by R(S U T) and (RS) U (RT) are the same.Choices:

1. True2. False

Q5Does the empty string match the regular expression |y+a|?Choices:

1. Yes2. No

Q6If an FA already accepts the language expressed by the closure of certain RE, then the given FA is the required FA.Choices:

1. True

2. False

Q7Which of the following statement is true about NFA with Null String?Choices:

1. Infinite states2. Infinite set of letters3. Infinite set of transitions4. Transition of null string is allowed at any stage

Q8If R is a regular language and L is some language, and L U R is a regular language, then L must be a regular language.Choices:

1. True2. False

Q9FA corresponding to an NFA can be built by introducing an empty state for a letter havingChoices:

1. no transition at certain state 2. one transition at certain state3. two transition at certain state4. more than two transitions at certain state

Q10Let FA3 be an FA corresponding to FA1FA2, then the initial state of FA3 must correspond to the initial state ofChoices:

1. FA1 only2. FA2 only3. FA1 or FA24. FA1 and FA2

FAs is an FA that accepts all the string of FA1 andFA2.    Union of two   True   False

A production of the form non-terminal   string of two non-terminal is called a liveProduction.                                                                                      True  False

DFA and PDA are equal in power.    True   False4:Syntax tree or Generation tree or Derivation tree are same treetruefalse5;

PDA is only used to represent a regular language.         True  False6:PDA is stronger than FA.                                                                         TrueFalse7:Two FAs are equivalent if they have same no. of states. turefalse8:There exist exactly two different derivations in an ambiguous CFG for a word. truefalse

Length of EVEN-EVEN language is _________

1.  even2.  odd3.  sometimes even n sometimes odd4.  no such language

If r1 = (aa + bb) and r2 = (a + b) then the language (aa + bb)(a + b) will be generated by

1. (r1)(r2)2. (r1 + r2)3.  (r2)(r1)4.  (r1)*

What is false about the term alphabet?1.  It is a finite set of symbols.2.  It is usually denoted by Greek letter sigma3.  It can be an empty set.4.  Strings are made up of its elements.

If S = {ab, bb}, then S* will not contain

1.  abbbab2.  bbba3.  bbbbab4.  ababbb

If S = { x }, then S* will be

1.  {x,xx,xxx,xxxx,…}2.  {^ ,x,xx,xxx,xxxx,…}

Let FA3 be an FA corresponding to FA1+FA2, then the final state of FA3 must correspond to the final state of

1.  FA1 only2.  FA2 only (not confirmed)3.  both4.  FA1 or FA2

 a* + b* = (a + b)* this expression is _________1.  true2.  false

Alphabet S = {a, bc, cc} has _______ number of letters

1.  one 2.  two3.  three4.  four

Which of the following statement is NOT true about TG?

1.  There exists exactly one path for certain string2.  There may exist more than one paths for certain string3.  There may exist no path for certain string4.  There may be no final state

What do automata mean?1.  Something done manually2.  Something done automatically

The states in which there is no way to leave after entry are called1.  Davey John Lockers2.  Dead States3.  Waste Baskets

4.  All of the given options

Which of the following regular expression represents same language? a. (a+ab)* b. (ba+a)* c. a*(aa*b)* d. (a*b*)*

1. a and b2.  a and c3.  c and d4.  All of the given options5. nahi pata

If two RE’s generate same language then these RE’s are called1.  Same RE2. Equal RE3. Similar RE4.  Equivalent RE

Given S, Kleene star closure is denoted by1.  S*2.  S+3.  S-4.  None of these

To obtain an RE corresponding to the given TG , TG is converted into 1.  FA2.  GTG3.  NFA4.  none of given

Question # 1 of 10 ( Start time: 05:46:41 PM ) Total Marks: 1While finding RE corresponding to TG, If TG has more than one start state thenSelect correct option:

1. Introduce the new start state2. Eliminate the old start state3. Replace the old start state with final state4. Replace the old final state with new start state

Question # 2While finding RE corresponding to TG, we connect the new start state to the old startstate by the transition labeled bySelect correct option:abnull stringNone of the given options

Question # 3 of 10 ( Start time: 05:49:03 PM ) Total Marks: 1Which of the following regular expression represents same language? a. (a+ab)* b.(ba+a)* c. a*(aa*b)* d. (a*b*)*Select correct option:a and ba and cc and d

Question # 4 of 10 ( Start time: 05:50:32 PM ) Total Marks: 1(a* + b*)* = (a + b)* this expression is __________Select correct option:TrueFalse

Question # 5 of 10 ( Start time: 05:51:30 PM ) Total Marks: 1Let FA3 be an FA corresponding to FA1+FA2, then the initial state of FA3 mustcorrespond to the initial state ofSelect correct option:

1. FA1 only2. FA2 only3. FA1 or FA24. FA1 and FA2

Question # 6 of 10 ( Start time: 05:53:01 PM ) Total Marks: 1Which of the following statement is NOT true about TG?Select correct option:

1. There exists exactly one path for certain string2. There may exist more than one paths for certain string3. There may exist no path for certain string4. There may be no final state

Question # 7 of 10 ( Start time: 05:54:06 PM ) Total Marks: 1Kleene’s theorem statesSelect correct option:All representations of a regular language are equivalent.All representations of a context free language are equivalent.All representations of a recursive language are equivalentFinite Automata are less powerful than Pushdown Automata.

Question # 8 of 10 ( Start time: 05:55:36 PM ) Total Marks: 1What do automata mean?Select correct option:

1. Something done manually2. Something done automatically

Question # 9 of 10 ( Start time: 05:56:51 PM ) Total Marks: 1A language accepted by an FA is also accepted bySelect correct option:TG onlyGTG onlyRE onlyAll of the given

Question No: 1 ( Marks: 1 ) - Please choose one

Σ={a,Aa,Abb}, then string aAaAbbAa has ________ length. ► One ► Two ► Three ► Four Question No: 2 ( Marks: 1 ) - Please choose one

Languages generated by kleene star are always ______________. ► Finite ► Infinite ► Sometimes finite & sometimes infinite ► None of the these Question No: 3 ( Marks: 1 ) - Please choose one

Let

S = {aa, bb} be a set of strings then s* will have ► Λ ► abba ► aabbbaa ► bbaab Question No: 4 ( Marks: 1 ) - Please choose one

If r1

= (aa + bb) and r2 = ( a + b) then the language (aa + bb)* will be generated by ► (r1)(r2) ► (r1 + r2) ► (r2)* ► (r1)* Question No: 5 ( Marks: 1 ) - Please choose one

y a, b

x

a, b

Above given FA can be represented by

► ((a+ b) (a + b))* ► (a + b)(a + b)* ► (a + b)(a + b) ► (a + b)*(a + b)*

Question No: 6 ( Marks: 1 ) - Please choose one

a,b

2+

1

a,b

Above given FA accepts ___________ strings defined over Σ={a , b} ► All ► Some ► All but not null ► None of these Question No: 7 ( Marks: 1 ) - Please choose one

If a

language can be expressed through FA, then it can also be expressed through TG. ► True ► False ► Depends on language ► None of the above Question No: 8 ( Marks: 1 ) - Please choose one

b

b

3+ a

1-

a

a a

a

4+ b

2-

.b

b

a b

5 6 Above given TG has ____________________ RE. ► a+b+a(a + b)*a + b(a + b)*b ► a(a + b)*a + b(a + b)*b ► both are given ► none of the given Question No: 9 ( Marks: 1 ) - Please choose one

b

b

3+ a

1-

a

a a

a

4+ b

2-

.b

b

a b

5 6 Above given FA accepts the language in which strings ► Begins with and ends in same letter ► Begins with and ends in different letter ► Has length more than 2

► None of the given Question No: 10 ( Marks: 1 ) - Please choose one

GTG can have _______________ final state. ► 0 ► 1 ► More than 1 ► All of the given Question No: 11 ( Marks: 1 ) - Please choose one

In

GTG, if a state has more than one incoming transitions from a state. Then all those incoming transitions can be reduced to one transition using _____________ sign

► - ► + ► * ► None of the given Question No: 12 ( Marks: 1 ) - Please choose one

aa+bb ab+ba

ab+ba

aa+bb

Λ

4+

3- 2 1

Λ

If above given TG is drawn like

aa+bb

Λ

4+

3-

1

Λ

X

Then what will be written in place of X. ► (ab+ba)(aa+bb)(ba+ab) ► (ab+ba)(aa+bb)(ab+ba) ► (ab+ba)(aa+bb)*(ab+ba) ► (ab+ba)(aa+bb)(ab+ba)* Question No: 13 ( Marks: 1 ) - Please choose one

“One language can be expressed by more than one NFA”. This statement is ______________.

► False ► True

► Depends on NFA ► None of the given Question No: 14 ( Marks: 1 ) - Please choose one

a

^

1-

4+

b 5

a a a

^, b a

2

3

Above given structure is an ________. ► FA ► NFA ► NFA -^ ► TG Question No: 15 ( Marks: 1 ) - Please choose one

One

FA has 3 states and 2 letters in the alphabet. Then FA will have ___________ number of transitions in the diagram ► 4 ► 5 ► 7 ► 6 Question No: 16 ( Marks: 1 ) - Please choose one

aa

b

bb

a

1-

2-

3+

4+

b

a

Above given two TG’s are _______________.

► Equivalent ► None-equivalent ► Not valid ► None of the given True or False

1. In a finite language no string is pumpable. True2. A DFA has infinite number of states. False3. A DFA can have more than one accepting state. True4. In DFA all states have same number of transitions. True5. Every subset of a regular language is regular. False

6. Let L4 = L1L2L3. If L1 and L2 are regular and L3 is not regular, it is possible that L4 is regular. True

7. In a finite language no string is pumpable. True8. If A is a nonregular language, then A must be infinite. True example palendroms9. Every context-free language has a context-free grammarin Chomsky normal form. True10. If A is a context-free language, then A must be nonregular. False11. The class of regular languages is closed under intersection. True12. If a language A is regular, then it A must be finite. False13. Every language is Turing-recognizable. False14. If a language is context-free, then it must be Turing-decidable. True15. The problem of determining if a context-free grammar generates

the empty language is undecidable. False16. The problem of determining if a Turing machine recognizes the

empty language is undecidable. True17. The set of all languages over an alphabet is countable.False 18. There are some languages recognized by a 5-tape, nondetermin-

istic Turing machine that cannot be recognized by a 1-tape,deterministic Turing machine.False

19. The language { 0n1n | 0 ≤ n ≤ 1000 } is regular. True20. Nonregular languages are recognized by NFAs. False21. The class of context-free languages is closed under intersection. False22. A language has a regular expression if and only if it

has an NFA. True23. The regular expression (01*0 ∪ 1)*0 generates the language

consisting of all strings over {0, 1} havingan odd number of 0’s. False

24. If a language A has a PDA, then A is generated by acontext-free grammar in Chomsky normal form. True

25. If A is a context-free language and B is a language such that B is a subset of A, then B must be a context-free language. False

26. If a language A has an NFA, then A is nonregular. False27. The regular expressions (a ∪ b)* and (b*a*)* generate the same language. True28. If a language A has a regular expression, then it also has a context-free grammar. True

Regular Expressions Describe the language denoted by the following regular expressions:

a) a(a|b)*a

The expression denotes the set of all strings of length two or more that start and end with an ‘a’.

b) ((e|a)b*)*

The expression denotes the set of all strings over the alphabet {a,b}.

c) (a|b)*a(a|b)(a|b)

The expression denotes the set of all strings of length 3 or more with an ‘a’ in the third position from the right. Ie of form yaxz where y is an arbitrary string , and x and z are single characters.

d) a*ba*ba*ba*

The expression denotes the set of all strings that contain precisely 3 b’s.

e) (aa|bb)*((ab|ba)(aa|bb)*(ab|ba)(aa|bb)*)*

The expression denotes the set of all strings of even length.

Length of a null string is supposed to be 1. ► True ► False

There is no difference between Word and String ► True ► False

There may be two RE representing the same language. ► True ► False

NFA – null can be considered as TG and vise versa. ► True ► False

∑ = {aA, b}, length(aAbaAaAb) = 5. ► True ► False

If s=abcd is a string defined over ∑ = {a,b,c,d} then reverse of s is dcba. ► True

► False

The language equal means number of a’s and b’s are equal with no null string. ► True ► False

Palindrome is a regular language. ► True ► False

If s = babab then palindrome of s = rev(s). ► True ► False

TG must have only one start state. ► True ► False

If a language can be accepted by FA then it can be accepted by a TG as well. ► True ► False

Length of output string is 1 less then that of input string is mealy machine. ► True ► False

Formal languages are called Semantic languages.

► True ► False

Every NFA can be converted to an FA ► True ► False

In mealy machine output character are mentioned on the transition. ► True ► False

If s=abcd is a string defined over ∑ = {a,bc,d} then reverse of s is dcba. True � False �

∑ = {aa, b}, length(aaaabaabb) = 5. True False

Every NFA can be converted into FA. True False

There can be more than one start states in TG. True False

A regular language can not be infinite.

True False

Kleene star of {1} generates {1, 11, 111, 1111, 11111 ……}. True False

If a regular language is empty then we denote it like L = Ǿ (fi). True � False �

Recursive method for defining language is only for regular languages. True � False �

Aa* = a +?

True � False �

The language equal means number of a’s and b’s are equal with null string. True � False �

PDA is only used to represent a regular language. ► True ► False Question No: 2 ( Marks: 1 ) - Please choose one If L is a regular language then LC is also a regular language. ► True

► False

Question No: 3 ( Marks: 1 ) - Please choose one A production of the form non-terminal Æ string of two non-terminal is called a live Production. ► True ►False Question No: 4 ( Marks: 1 ) - Please choose one we can find a CFG corresponding to a DFA. ► True ► False

Question No: 5 ( Marks: 1 ) - Please choose one START, READ, HERE and ACCEPTS are conversions of the machine (these are joints of machine) ► True ► False Question No: 6 ( Marks: 1 ) - Please choose one A CFG is said to be ambiguous if there exists at least one word of its language that can be generated by different production trees ► True ► False

Syntax tree or Generation tree or Derivation tree are same tree ► True ► False

Question No: 8 ( Marks: 1 ) - Please choose one The symbols that cannot be replaced by anything are called terminals

► True ► False Question No: 9 ( Marks: 1 ) - Please choose one The production of the form non-terminal Æ one non-terminal is called unit production ► True ► False

Question No: 10 ( Marks: 1 ) - Please choose one DFA and PDA are equal in power. ► True ► False

Question No: 10 ( Marks: 1 ) - Please choose one DFA and PDA are equal in power. ► True ► False

Question # 1 of 10 ( Start time: 05:46:41 PM ) Total Marks: 1While finding RE corresponding to TG, If TG has more than one start state thenSelect correct option:Introduce the new start stateEliminate the old start stateReplace the old start state with final stateReplace the old final state with new start state

Question # 2While finding RE corresponding to TG, we connect the new start state to the old start state by the transition labeled bySelect correct option:abnull stringNone of the given options

Question # 3 of 10 ( Start time: 05:49:03 PM ) Total Marks: 1Which of the following regular expression represents same language? a. (a+ab)* b. (ba+a)*

c. a*(aa*b)* d. (a*b*)* a+b)*a(a+b)*b(a+b)*+ (a+b)*b(a+b)*a(a+b)*.

{ x}*, { x}+, {a+b}*

Select correct option:a and ba and cc and d

Question # 4 of 10 ( Start time: 05:50:32 PM ) Total Marks: 1(a* + b*)* = (a + b)* this expression is __________Select correct option:TrueFalse

Question # 5 of 10 ( Start time: 05:51:30 PM ) Total Marks: 1Let FA3 be an FA corresponding to FA1+FA2, then the initial state of FA3 must correspond to the initial state ofSelect correct option:FA1 onlyFA2 onlyFA1 or FA2FA1 and FA2

Question # 6 of 10 ( Start time: 05:53:01 PM ) Total Marks: 1Which of the following statement is NOT true about TG?Select correct option:There exists exactly one path for certain stringThere may exist more than one paths for certain stringThere may exist no path for certain stringThere may be no final state

Question # 7 of 10 ( Start time: 05:54:06 PM ) Total Marks: 1Kleene’s theorem statesSelect correct option:All representations of a regular language are equivalent.All representations of a context free language are equivalent.All representations of a recursive language are equivalentFinite Automata are less powerful than Pushdown Automata.

Question # 8 of 10 (Start time: 05:55:36 PM) Total Marks: 1What do automata mean?Select correct option:Something done manuallySomething done automatically

Question # 9 of 10 ( Start time: 05:56:51 PM ) Total Marks: 1A language accepted by an FA is also accepted bySelect correct option:TG onlyGTG only

RE onlyAll of the given

Question # 10 of 10 ( Start time: 05:58:16 PM ) Total Marks: 1If r1 = (aa + bb) and r2 = (a + b) then the language (aa + bb)(a + b) will be generated bySelect correct option:(r1)(r2)(r1 + r2)(r2)(r1)(r1)*

Alphabet S = {a, bc, cc} has _______ number of letters1. One 2. Two3. Three4. Four

If S = { x }, then S* will be1. {x,xx,xxx,xxxx,…}2. {^ ,x,xx,xxx,xxxx,…}

Length of even even language is1. Even2. Odd3. Sometimes even & sometimes odd4. Such languages does not exist

If S = {aa, bb}, then S* will not contain1. Aabbaa2. Bbaabbbb3. Aaabbb4. aabbaaaa

Formal is also known as _________1. Syntactic language2. Semantic language3. Informal language4. None of these

In an FA, when there is no path starting from initial state and ending in final state then that FA1. accept null string2. accept all strings3. accept all non empty strings4. does not accept any string

FA of EVEN language shows null string when1. Initial state is final as well2. EVEN does not accept null3. One state is declared null4. None of the these

Question No. 1 Marks : 1

If s=abcd is a string defined over ∑ = {a,bc,d} then reverse of s is dcba.

True False

Question No. 2 Marks : 10

Find the regular expression associated to the following FA. Show all steps. [Hint: use FA to GTG and GTG to RE.]

Question No. 3 Marks : 1

∑ = {aa, b}, length(aaaabaabb) = 5.

True False

Question No. 4 Marks : 1

Every NFA can be converted into FA.

True False

Question No. 5 Marks : 1

There can be more than one start states in TG.

True False

Question No. 6 Marks : 1

A regular language can not be infinite.

True False

Question No. 7 Marks : 10

a) Write the recursive definition of the following language. [6]

L = Defining the language {a2n b4n }, n=1,2,3,… , of strings defined over Σ={a, b}

b) Write a regular expression of the language having strings that either start or end with “00” and have no more zeroes. Where the alphabet is {0, 1}. [4]

Question No. 8 Marks : 1

Kleene star of {1} generates {1, 11, 111, 1111, 11111 ……}.

True False

Question No. 9 Marks : 10

a) Define NFA-null.

[4]

b) Draw DFA for the following NFA.

[6]

Question No. 10 Marks : 1If a regular language is empty then we denote it like L = Ǿ (fi).

True False

Question No. 11 Marks : 1

Recursive method for defining language is only for regular languages.

True False

Question No. 12 Marks : 1

aa* = a+ ?

True False

Question No. 13 Marks : 1

The language equal means number of a’s and b’s are

equal with null string. True False

Length of a null string is supposed to be 1.

► True

► False

Question No: 2 ( Marks: 1 ) - Please choose one

There is no difference between Word and String

► True

► False

Question No: 3 ( Marks: 1 ) - Please choose one

There may be two RE representing the same language.

► True

► False

Question No: 4 ( Marks: 1 ) - Please choose one

NFA - null can be considered as TG and vise versa.

► True

► False

Question No: 5 ( Marks: 1 ) - Please choose one

∑ = {aA, b}, length(aAbaAaAb) = 5.

► True

► False

Question No: 6 ( Marks: 1 ) - Please choose one

If s=abcd is a string defined over ∑ = {a,b,c,d} then reverse of s is dcba.

► True

► False

Question No: 7 ( Marks: 1 ) - Please choose one

The language equal means number of a’s and b’s are equal with no null string.

► True

► False

Question No: 8 ( Marks: 1 )

Palindrome is a regular language.

► True

► False

Question No: 9 ( Marks: 1 )

- Please choose one

- Please choose one

If s = babab then palindrome of s = rev(s).

► True

► False

Question No: 10 ( Marks: 1 )

TG must have only one start state.

► True

► False

Question No: 11 ( Marks: 1 )

- Please choose one

- Please choose one

If a language can be accepted by FA then it can be accepted by a TG as well.

► True

► False

Question No: 12 ( Marks: 1 ) - Please choose one

Length of output string is 1 less then that of input string is mealy machine.

► True

► False

Question No: 13 ( Marks: 1 ) - Please choose one

Formal languages are called Semantic languages.

► True

► False

Question No: 14 ( Marks: 1 ) - Please choose one

Every NFA can be converted to an FA

► True

► False

Question No: 15 ( Marks: 1 ) - Please choose one

In mealy machine output character are mentioned on the transition.

► True

► False

Question No: 16 ( Marks: 8 )

Differentiate between the following terms: • Mealy and Moore machine. • NFA and FA.

Question No: 17 ( Marks: 5 )

Build an FA corresponding to NFA given below.

q1 ba

b q0 +q3

Question No: 18 ( Marks: 7 )

Build an NFA equivalent to FA1U FA2, where FA1, FA2 are given below.

FA1

b

p-

aq a

ba,b

+

FA2

2 a 4

a b a a,b

1- a b 6+

b a b

3 b 5

1) For a given input, it provides the compliment of Boolean AND output.

NAND box (NOT AND)DELAY boxOR boxAND box

2) It delays the transmission of signal along the wire by one step (clock pulse).

NAND box (NOT AND)DELAY boxOR boxAND box

3) For the given input, it provides the Boolean OR output

NAND box (NOT AND)DELAY boxOR boxAND box

4) For the given input, AND box provides the Boolean AND output.True False

5) The current in the wire is indicated by 1 and 0 indicates the absence of the current.True False

6) Any language that can not be expressed by a RE is said to be regular language.True False

7) If L1 and L2 are regular languages is/are also regular language(s).

L1 + L2L1L2L1*All of above

8) Let L be a language defined over an alphabet Σ, then the language of strings, defined over Σ, not belonging to L, is called Complement of the language L, denoted by Lc or L’.

True False

9) To describe the complement of a language, it is very important to describe the ----------- of that language over which the language is defined.

AlphabetRegular ExpressionStringWord

10) For a certain language L, the complement of Lc is the given language L i.e. (Lc)c = LcTrue False

11) If L is a regular language then, --------- is also a regular language.Lm Ls Lx Lc

12) Converting each of the final states of F to non-final states and old non-final states of F to final states, FA thus obtained will reject every string belonging to L and will accept every string, defined over Σ, not belonging to L. is called

Transition Graph of LRegular expression of LComplement of LFinite Automata of L

13) If L1 and L2 are two regular languages, then L1 U L2 is not a regular.True False

14) De-Morgan's law for sets is expressed by,

CORRECT

15) If L1 and L2 are regular languages, then these can be expressed by the corresponding FAs.True False

16) L= language of words containing even number of a’s. Regular Expression is

(a+b)*aa(a+b)*(b+ab*a)*a+bb*aab*a(a+b)*ab(a+b)*

17) The regular expression defining the language L1 U L2 can be obtained, converting and reducing the previous ------------- into a ------------ as after eliminating states.

GTG, TG

FA, GTGFA, TGTG, RE

18) The language that can be expressed by any regular expression is called a Non regular language.

True False

19) The languages -------------- are the examples of non regular languages.

PALINDROME and PRIMEPALINDROME and EVEN-EVENEVEN-EVEN and PRIMEFACTORIAL and SQURE

20) Let L be any infinite regular language, defined over an alphabet Σ then there exist three strings x, y and z belonging to Σ* such that all the strings of the form for n=1,2,3, … are the words in L. called.

Complement of LPumping LemmaKleene’s theoremNone in given

(21) Languages are proved to be regular or non regular using pumping lemma.True False

(22) ------------------- is obviously infinite language.EQUAL-EQUALEVEN-EVENPALINDROMEFACTORIAL

(23) If, two strings x and y, defined over Σ, are run over an FA accepting the language L, then x and y are said to belong to the same class if they end in the same state, no matter that state is final or not.

True False

(24) Myhill Nerode theorem is consisting of the followings,

L partitions Σ* into distinct classes.If L is regular then, L generates finite number of classes.If L generates finite number of classes then L is regular.All of above

(25) The language Q is said to be quotient of two regular languages P and R, denoted by--- if PQ=R.

R=Q/P Q=R/P Q=P/R P=R/Q

(26) If two languages R and Q are given, then the prefixes of Q in R denoted by Pref(Q in R).True False

(27) Let Q = {aa, abaaabb, bbaaaaa, bbbbbbbbbb} and R = {b, bbbb, bbbaaa, bbbaaaaa} Pref (Q in R) is equal to,

{b,bbba,bbbaaa}{b,bba,bbaaa}{ab,bba,bbbaa}{b,bba,bbba}

(27) If R is regular language and Q is any language (regular/ non regular), then Pref (Q in R) is ---------.

Non-regularEqualRegularInfinite

(28) "CFG" stands for _________

Context Free GraphContext Free GrammarContext Finite GraphContext Finite Grammar

(29) ___________ states are called the halt states.

ACCEPT and REJECTACCEPT and READACCEPT AND STARTACCEPT AND WRITE

(30) The part of an FA, where the input string is placed before it is run, is called _______

StateTransitionInput TapeOutput Tape

(31) In new format of an FA (discussed in lecture 37), This state is like dead-end non final state

ACCEPTREJECTSTATRREAD

(32) For language L defined over {a, b}, then L partitions {a, b}* into …… classes

InfiniteFiniteDistinctNon-distinct

(33) The major problem in the earliest computers was

To store the contents in the registersTo display mathematical formulaeTo load the contents from the registersTo calculate the mathematical formula

(34) Between the two consecutive joints on a path

One character can be pushed and one character can be poppedAny no. of characters can be pushed and one character can be poppedOne character can be pushed and any no. of characters can be poppedAny no. of characters can be pushed and any no. of characters can be popped

(35) In pumping lemma theorem (x y^n z) the range of n is

n=1, 2, 3, 4……….n=0, 1, 2, 3, 4……….n=…….-3,-2,-1, 0, 1, 2, 3, 4……n=…….-3,-2,-1, 1, 2, 3, 4……

(36) The PDA is called non-deterministic PDA when there are more than one out going edges from……… state

START or READPOP or REJECTREAD or POPPUSH or POP

(37) Identify the TRUE statement:

A PDA is non-deterministic, if there are more than one READ states in PDAA PDA is never non-deterministicLike TG, A PDA can also be non-deterministicA PDA is non-deterministic, if there are more than one REJECT states in PDA

(38) There is a problem in deciding whether a state of FA should be marked or not when the language Q is infinite.

True False

(39) If an effectively solvable problem has answered in yes or no, then this solution is called ---------

Decision procedureDecision methodDecision problemDecision making

(40) The following problem(s) ------------- is/are called decidable problem(s).

The two regular expressions define the same languageThe two FAs are equivalentBoth a and b

None of given

(41) To examine whether a certain FA accepts any words, it is required to seek the paths from ------- state.

Final to initialFinal to finalInitial to finalInitial to initial

(42) The high level language is converted into assembly language codes by a program called compiler.

TRUE FALSE

(43) Grammatical rules which involve the meaning of words are called ---------------

SemanticsSyntacticBoth a and bNone of given

(44) Grammatical rules which do not involve the meaning of words are called ---------------

SemanticsSyntacticBoth a and bNone of given

(45) The symbols that can’t be replaced by anything are called -----------------ProductionsTerminalsNon-terminalsAll of above

(46) The symbols that must be replaced by other things are called __________

ProductionsTerminalsNon-terminalsNone of given

(47) The grammatical rules are often called_____________

ProductionsTerminalsNon-terminalsNone of given

(47) The terminals are designated by ________ letters, while the non-terminals are designated by ________ letters.

Capital, boldSmall, capitalCapital, smallSmall, bold

(48) The language generated by __________ is called Context Free Language (CFL).

FA TG CFG TGT

(49) Σ = {a,b} Productions S→XaaX X→aX X→bX X→ΛThis grammar defines the language expressed by___________

(a+b)*aa(a+b)*(a+b)*a(a+b)*a(a+b)*aa(a+b)*aa(a+b)*aba+b)*

(50) S → aXb|b XaX → aX|bX|Λ The given CFG generates the language in English __________

Beginning and ending in different lettersBeginning and ending in same letterHaving even-even languageNone of given

(51) The CFG is not said to be ambiguous if there exists atleast one word of its language that can be generated by the different production trees,

TRUE FALSE

(52) The language generated by that CFG is regular if _________

No terminal → semi wordNo terminal → wordBoth a and bNone of given

(53) The production of the form no terminal → Λ is said to be null production.

TRUE FALSE

(54) A production is called null able production if it is of the form N → Λ

TRUE FALSE

(55) The productions of the form nonterminal → one nonterminal, is called _________

Null productionUnit productionNull able productionNone of given

(56) CNF is stands for

Context Normal FormComplete Normal FormChomsky Normal FormCompared Null Form

The input string is placed, before it runs, in1. Stack2. Memory3. Tape4. Ram

Every nondeterministic finite automata can be converted into1. Regular expression2. Deterministic finite3. Transition graph4. All of the given option.

In CFG, the symbols that cannot be replaced by anything are called1. Terminals2. Nonterminals3. Productions4. None of the given options

If L1 and L2 are regular languages then which statement is NOT true?1. L1 + L2 is always regular2. L1 L2 is always regular3. L1/L2 is always regular4. L1* is always regular

The tree which produced all the strings of a language is called1. Derivation tree2. Ambiguous tree3. Total language tree4. Non ambiguous tree

By removing null and unit productions:1. CNF can be converted into CFG2. CFG can be converted into CNF3. CNF can be converted into TG4. None of the given options

Question: 31 (Marks 1)Can you say that string of 0’s whose length is a perfect square is not regular?

Question: 32 (Marks 1)

Question: 33 (Marks 2)Is the following an FA or TM?

Question: 34 (Marks 2)If L is the language that accept even length strings then what strings will Lc accept?

Question: 35 (Marks 3)Define Myhill Nerode theorem

Question: 36 (Marks 3)If L1,L2 and L3 be any three finite languages over Sigma = {a,b}, then how will be

(L1 INTERSECTION L2) Union (L2 INTERSECTION L3) ≠ Ø

Question: 37 (Marks 3)How you differentiate between wanted and unwanted branches while deriving a string from in the context of CFG?

Question: 38 (Marks 5)What is the difference between concatenation and intersection of two FAs and union and addition of two FAs?

Question: 39 (Marks 5)Use pumping lemma II to show that following language is not regular.L = {an2 ; n =1,2,3,4…}

Question: 40 (Marks 10)Draw Moore Machine equivalent to the following Mealy Machine.

Question: 41 (Marks 10)Write CFG of the following PDA. Also write the stack alphabet and tape alphabet.

Question No: 1 ( Marks: 1 ) - Please choose one

If r1 = (aa +

bb) and r2 = ( a + b) then the language (aa + bb)(a + b) will be generated by ► (r1)(r2) *► (r1 + r2) ► (r2)(r1) ► (r1)* Question No: 2 ( Marks: 1 ) - Please choose one

“One

language can be expressed by more than one FA”. This statement is ______ * ► True ► False ► Some times true & sometimes false ► None of these Question No: 3 ( Marks: 1 ) - Please choose one

Who did

not invent the Turing machine? ► Alan Turing *► A. M. Turing ► Turing ► None of these Question No: 4 ( Marks: 1 ) http://vustudents.ning.com - Please choose one

Which

statement is true? *► The tape of turing machine is infinite. ► The tape of turing machine is finite. ► The tape of turing machine is infinite when the language is regular ► The tape of turing machine is finite when the language is nonregular. Question No: 5 ( Marks: 1 ) - Please choose one

A regular

language: *► Must be finite ► Must be infinite ► Can be finite or infinite ► Must be finite and cannot be infinite Question No: 6 ( Marks: 1 ) - Please choose one

Every

regular expression can be expressed as CFG but every CFG cannot be expressed as a regular expression. This statement is: ► Depends on the language ► None of the given options *► True ► False Question No: 7 ( Marks: 1 ) - Please choose one

b a

a

X1–

b

X2+

Above given FA corresponds RE r. then FA corresponding to r* will be

a

b

b

z3+

a

z2

z1±

a b

This statement is *► True ► False ► Depends on language ► None of these Question No: 8 ( Marks: 1 ) http://vustudents.ning.com- Please choose one

Consider

the language L of strings, defined over Σ = {a,b}, ending in a ► There are finite many classes generated by L, so L is regular *► There are infinite many classes generated by L, so L is regular ► There are finite many classes generated by L, so L is non-regular ► There are infinite many classes generated by L, so L is non-regular Question No: 9 ( Marks: 1 ) - Please choose one

ab,ba

ab,ba

aa,bb aa,bb

Above given TG has _____________ RE. ► (aa+aa+(ab+ab)(aa+ab)*(ab+ba))* *► (aa+bb+(ab+ba)(aa+bb)*(ab+ba))* ► (aa+bb+(ab+ba)(aa+bb)(ab+ba))* ► None of these Question No: 10 ( Marks: 1 ) - Please choose one

The word

‘formal’ in formal languages means *► The symbols used have well defined meaning ► They are unnecessary, in reality ► Only the form of the string of symbols is significant ► None of these Question No: 11 ( Marks: 1 ) - Please choose one

Let A = {0,

1}. The number of possible strings of length ‘n’ that can be formed by the elements of the set A is http://vustudents.ning.com ► n! *► n2

► nm

► 2n

Question No: 12 ( Marks: 1 ) - Please choose one

Choose the

correct statement. ► A Mealy machine generates no language as such ► A Moore machine generates no language as such *► A Mealy machine has no terminal state ► All of these Question No: 13 ( Marks: 1 ) - Please choose one

TM is more

powerful than FSM because ► The tape movement is confined to one direction *► It has no finite state control ► It has the capability to remember arbitrary long sequences of input symbols ► None of these Question No: 14 ( Marks: 1 ) - Please choose one

If L1 and

L2 are expressed by regular expressions r1 and r2, respectively then the language expressed by r1 + r2 will be _________ * ► Regular ► Ir-regular ► Can’t be decided ► Another Language which is not listed here

Question No: 15 ( Marks: 1 ) - Please choose one

Like TG, a

PDA can also be non-deterministic ► True *► False Question No: 16 ( Marks: 1 ) - Please choose one

The above machine is a/anTG ___________ http://vustudents.ning.com ► Finite Automata *► Turing machine ► FA ► TG Question No: 17 ( Marks: 1 ) - Please choose one

The

language of all words (made up of a’s and b’s) with at least two a’s can not be described by the regular expression. ► a(a+b)*a(a+b)*(a+b)*ab* ► (a+b)* ab* a(a+b)* ► b*ab* a(a+b)* ► none of these Question No: 18 ( Marks: 1 ) - Please choose one

In FA, if

one enters in a specific state but there is no way to leave it, then that specific state is called *► Dead State ► Waste Basket ► Davey John Locker ► All of these Question No: 19 ( Marks: 1 ) - Please choose one

If L is a

regular language then, Lc is also a _____ language. *► Regular ► Non-regular ► Regular but finite ► None of the given Question No: 20 ( Marks: 1 ) - Please choose one

In CFG, the

symbols that can’t be replaced by anything are called___

► Terminal ► Non-Terminal *► Production ► All of given Question No: 21 ( Marks: 1 ) - Please choose one

Which of

the following is NOT a regular language? http://vustudents.ning.com ► String of 0’s whose length is a perfect squere *► Set of all palindromes made up of 0’s and 1’s ► String of 0’s whose length is a prime number ► All of the given options Question No: 22 ( Marks: 1 ) - Please choose one

Choose the

incorrect (FALSE) statement. ► A Mealy machine generates no language as such ► A Mealy machine has no terminal state *► For a given input string, length of the output string generated by a Moore machine is not more than the length of the output string generated by that of a Mealy machine ► All of these Question No: 23 ( Marks: 1 ) - Please choose one

Pumping

lemma is generally used to prove that: ► A given language is infinite *► A given language is not regular ► Whether two given regular expressions of a regular language are equivalent or not ► None of these Question No: 24 ( Marks: 1 ) - Please choose one

Which of

the following is a regular language? ► String of odd number of zeroes ► Set of all palindromes made up of 0’s and 1’s *► String of 0’s whose length is a prime number ► All of these Question No: 25 ( Marks: 1 ) - Please choose one

Choose the

incorrect statement: ► (a+b)*aa(a+b)* generates Regular language. ► A language consisting of all strings over ∑={a,b} having equal number of a’s and b’s is a regular language ► Every language that can be expressed by FA can also be expressed by RE ► None of these Question No: 26 ( Marks: 1 ) - Please choose one

Left hand

side of a production in CFG consists of: ► One terminal ► More than one terminal ► One non-terminal * ► Terminals and non-terminals

Question No: 27 ( Marks: 2 )

Diffrentiate

between Regular and Non regular languages?Ans:

The main difference between regular and non regular language are as:

1. The regular language is that language which can be expressed by RE is known as regular language whereas any language which can not be expressed by RE is known as non regular language. Question No: 28 http://vustudents.ning.com ( Marks: 2 )

What is

meant by a "Transition" in FA? Question No: 29 ( Marks: 2 )

What are

the halt states of PDAs?

Ans:

There are some halts states in PDA which are as:1. Accept or reject stat is also halt state.2. Reject state is like dead non final state.3. Accept state is like final state.

Question No: 30 ( Marks: 2 )

Identify the

null productions and nullable productions from the following CFG:S -> ABABA -> a | /\B-> b | /\ Question No: 31 ( Marks: 3 )

Describe

the POP operation and draw symbol for POP state in context of Push down stack. Question No: 32 ( Marks: 3 )

What does

the the following tape of turing machine show?

11 abb b b READ3 READ9

ROW Number

PUSH What

POP What

READ What

TO Where

FROM Where

Ans: Arbitrary Summary Table:

The arbitrary summary table shows the trip from READ9 to READ3 does not pop oneletter form the STACK it adds two letters to the STACK.Row11 can be concatenated with some other net style sentences e.g. row11 net(READ3, READ7, a)Net(READ7, READ1, b)Net(READ1, READ8, b) it gives the non terminal Net(READ9, READ8, b),

The whole process can be written as:

Net(READ9, READ8, b) ?Row11Net(READ3, READ7,a) Net(READ7, READ1, b)Net(READ1, READ8, b)This will be a production in the CFG of the corresponding row language. Question No: 33 ( Marks: 3 )

Find Pref

(Q in R) for:Q = {10, 11, 00, 010}R = {01001, 10010, 0110, 10101, 01100, 001010} Question No: 34 ( Marks: 5 )

Consider

the Context Free Grammar (CFG)S à 0AS | 0A à S1A | SS | 1a

Show that the word 0000100 can be generated by this CFG by showing the whole derivation starting from S Question No: 35 ( Marks: 5 )

Consider

the language L which is EVEN-EVEN, defined over Σ = {a,b}. In how many classes does L may partition Σ*. Explain briefly. Question No: 36 ( Marks: 5 )

What are

the conditions (any five) that must be met to know that PDA is in conversion form? http://vustudents.ning.com

Ans:

Conversion form of PDA:

A PDA is in conversion form if it has following conditions:1. The PDA must begin with the sequence2. There is only one ACCEPT state.3. Every edge leading out of any READ or HERE state goes directly into a POP state.4. There are no REJECT states.5. All branching, deterministic or nondeterministic occurs at READ or HERE states.6. The STACK is never popped beneath this $ symbol.7. No two POPs exist in a row on the same path without a READ or HERE.8. Right before entering ACCEPT this symbol is popped out and left.

1.What is Row Langage.2.What does FA stands for? 3.What are live and dead productions.4. Given a summary table, we were required to explain it.5.What do you mean by wanted and unwanted branches.6.Given an FA, I had to recogize the langauge - EVEN-EVEN7.Given the CFG, had to write the language (EQUAL)8.Construct corresponding CFG for the given language (1) All words of even length but not multiple of 3.

(2) Palindrome (both even and odd palindrome). (5 mark)9.Who invented Turing m/c10.Equivalent /non-equivalent langages11. what are formal langages?

Q No. 1 Choose the right option: (2)A) aAbB is a string defined on an alphabet {aA, bB, aAbB}. B) aAbB is a string defined on an alphabet {aA, bB}.

o B only o A only

Q No. 2 Choose the right option: (2)A) For every NFA, there may not be an FA equivalent to it B) For every NFA, there must be an FA equivalent to it

o B only o A only

Q No. 3 Choose the right option: (2)A) In a Mealy machine, the set of letters and the set of output characters must be

same B) In a Mealy machine, the set of letters and the set of output characters may not be

same o B only o A only

Q No. 4 Choose the right option: (2)A) Pumping Lemma version I is sufficient to test an infinite language to be regular B) To test an infinite language to be regular, Pumping Lemma version I may not help

o B only o A only

Q No. 5 Choose the right option: (2)A) For a given CFG, there may not exist any PDA accepting the language generated by

the CFG B) For a given CFG, there must be a PDA accepting the language generated by the

CFG o B only o A only

Q No. 6 Identify the language accepted by the following PDA. Build an FA accepting the corresponding language. Write the corresponding RE as well (10)

Q No. 7 Derive any two words of length 4 from the following CFG. (5) S®XaaX, X®aX|bX|L

A Total Language Tree has

o All languages over Σ o All strings over Σ o All words of all languages over Σ

o All words of one language over ΣQuestion No. 2

(a) Derive any two words of length 4 from the following CFG.S→XaaX, X→aX|bX|.

Write the corresponding RE as Well.

(b) Determine the CFG, corresponding to the following FA

a

Marks : 10

(5)

(5)

b

b

a

S- b

b

Question No. 3

What Turing Machine does not have?

o Stacko Tapeo Heado Word

Question No. 4

A C+a

a

B D+b

a

Marks : 02

Marks : 10

(a) Draw Moore Machine equivalent to following Mealy Machine. (5)

q1 1/11/0

0/0q0 0/1 q3 1/0

0/0 1/0q2

0/1

(b) Use Pumping Lemma II to show that following language is non-regular.

n2

(5)

i. Square ( a , for n = 1, 2, 3, ….)

Question No. 5

Marks : 10

Identify the language accepted by the following PDA. Build an FA accepting thecorresponding language. Write the corresponding RE as well.

Question No. 6

Marks : 02

Two FAs represent same languages over some alphabet (may or may not be same forFAs), If

o They accept same wordso They accept same number of wordso They reject same wordso None of above

Question No. 7

Marks : 02

CFG given S bS|Sb|aa represents language

o b*aao aab*o b*aab*o b*(aa)*b*

Question No. 8

Marks : 10

a) Define the following terms (6)

i. Total language tree (TLT)ii. Ambiguous CFG. iii. Unit Production

(b) Find Context Free Grammar's (CFG's) for the following languages over the Σ={a, b}. (4)

i. All the words that do not contain substring abb.ii. All the words that have exactly two or three b's.

Question No. 9

Marks : 02

A Language that is finite but not regular

o Λo (a+b)* o Φ o All strings of a's in Σ = {a,.b}

Question No. 1 Marks : 1

A production of the form non-terminal non-terminal is called a dead Production. 1. True2. False

Question No. 2

Marks : 3

Semi-word is a string having some terminals and one non-terminal at the right of string.

1. True2. False

Question No. 3

Marks : 3

Two FAs are equivalent if they have same no. of states.

1. True 2. False

Question No. 4

Marks : 1

There exist exactly two different derivations in an ambiguous CFG for a word.

1. True2. False

Question No. 5

Marks : 1

Construct RE’s for following languages over Σ= {a, b}

i. All words which contain substring “baba”. [5]

ii.A ll words which never end in substrings “aa” and “ab” [5]

Question No. 6

Marks : 1

Regular languages are closed under Union, Concatenation and Kleene star.

1. True 2. False

Question No. 7

Marks : 1

C FG may also represent a regular language.

1. True 2. False

Question No. 8

Marks : 1

Find the complement of the FA below,

Question No. 9

Marks : 1

PDA is stronger than FA.3. True4. False

Question No. 10

Marks : 3

Union of two FAs is an FA that accepts all the string of FA1 and FA2.TrueFalse

Question No. 11

Marks : 3

Given a CFG below,

a) Remove Unit productions from the CFG. [5]

S → S + T | T T → T * F | F F → ( S ) | a

b) Derive CNF corresponding to the CFG given below. [10]

S → ABaA →aabB → Ac

Question No. 12

Marks : 10

In non-deterministic PDA a string may be traced by more than one paths.

1. True2. False

Question No. 13 Marks : 1

There always exist an FA for each PDA.

TrueFalse

Question No. 14

Marks : 1

a) Given an FA below, [5]

What is language accepted by above FA?

b) Draw a non-deterministic PDA for the above FA. [10]

Question No: 1 ( Marks: 1 ) - Please choose one

PDA is only used to represent a regular language.

► True

► False

Question No: 2 ( Marks: 1 ) - Please choose one

If L is a regular language then LC is also a regular language.

► True

► False

Question No: 3 ( Marks: 1 ) - Please choose one

A production of the form non-terminal string of two non-terminal is called a liveProduction.

► True

► False

Question No: 4 ( Marks: 1 ) - Please choose one

we can find a CFG corresponding to a DFA.

► True

► False

Question No: 5 ( Marks: 1 ) - Please choose one

START, READ, HERE and ACCEPTS are conversions of the machine

► True

► False

Question No: 6 ( Marks: 1 ) - Please choose one

A CFG is said to be ambiguous if there exists at least one word of its language that canbe generated by different production trees

► True

► False

Question No: 7 ( Marks: 1 ) - Please choose one

Syntax tree or Generation tree or Derivation tree are same tree

► True

► False

Question No: 8 ( Marks: 1 ) - Please choose one

The symbols that cannot be replaced by anything are called terminals

► True

► False

Question No: 9 ( Marks: 1 ) - Please choose one

The production of the form non-terminal one non-terminal is called unit production

► True

► False

Question No: 10 ( Marks: 1 ) - Please choose one

DFA and PDA are equal in power.

► True

► False

Question No: 11 ( Marks: 10 )

a) Define Describe the following terms: [Note: maximum in 20 to 30 words for each]

I. CNF II. Regular Grammar

b) Convert the following CFG into CNF S → CDCD C → 0|Λ D → 1|Λ

Question No: 12 ( Marks: 10 )

a) Construct RE’s for following languages over Σ= {0, 1} (6)i. All words in which “1” never follows “0”. ( “0” never appears before “1”)

ii. All words which begin and end with different letters.

b) How many minimum states can be there in an NFA of language having all word

with “101” at the end? (4)

HINT: Build NFA for language for yourself but write only number of minimum states. No need to build NFA in software.

Question No: 13 ( Marks: 10 )

a) Is this an FA or NFA? (2)

b) Determine the CFG corresponding to the above FA or NFA (8)

Question No: 14 ( Marks: 10 )

a) Given CFG (Context Free Grammar): (6)S → bS | aX | Λ X → aX | bY | Λ Y → aX | Λ

Derive following strings from above CFG. Show all steps. If string cannot be derived then describe it.

i. baabab ii. ababaab

b) Describe language of following PDA (Push Down Automata): (4)[ Note: Don’t write more than two to three lines for each. Only write to the point. ]

START

0

READ

ACCEPT

Question No: 15

1

1

( Marks: 5 )

1

READ 0 READ

0

REJECT

Given a CFG below, [5]

S → bS | aM M→ bM | aF F → bF | aM | ^

What is language accepted by above CFG?

Question No: 1 ( Marks: 1 ) - Please choose one

a* + b* = (a + b)* this expression is __________

True

False

Can t be decided

None of these

Question No: 2 ( Marks: 1 ) - Please choose one

a (a + b)* is the RE of language defined over

True

False

Such a language does not exist

None of these

= {a, b} having at least one a

Question No: 3 ( Marks: 1 ) - Please choose one

According to _________ machine, Finite set of states containing exactly one START state and some (may be none) HALT states that cause execution to terminate when the HALT states are entered.

Finite Automata

TG

Turing

Insertion

Question No: 4 ( Marks: 1 ) - Please choose one

Consider the following TM

( , ,R)9 HALT

(a,a,L)(b,b,L)

(a,a,R) (b,b,R)

2 (b,b,R) 3 (a,a,L) 4

(b,a,R)

(a,*,R) (a,a,R)

1 START 5

(*,*,R) ( , ,L)

(a, ,L) (a, ,L) 8 7 6

Which of the following is true

The string aaabbbaaa can be observed to be accepted by the above TM. It can also be observed that the above TM accepts the non-CFL {a b c}.

The string aaabbbaaa can be observed to be accepted by the above TM. It can also be observed that the above TM accepts the non-CFL {anbnan}.

The string bbbaaabbb can be observed to be accepted by the above TM. It can also be observed that the above TM accepts the non-CFL {anbnan}.

The string abbbaaabb can be observed to be accepted by the above TM. It

can also be observed that the above TM accepts the non-CFL {anbnan}.

Question No: 5 ( Marks: 1 ) - Please choose one

Which statement is true?

The tape of turing machine is infinite.

The tape of turing machine is finite.

The tape of turing machine is infinite when the language is regular

The tape of turing machine is finite when the language is nonregular.

Question No: 6 ( Marks: 1 ) - Please choose one

Can a turing machine's head ever be in the same location in two successive steps?

Yes

Yes but only in finite languages

No

Yes but only in infinite langauges

Question No: 7 ( Marks: 1 ) - Please choose one

Which of the following statement can not be true?

The turing machine is similar to a finite automaton but with an unlimited and unrestricted memory

A Turing machine is a much more accurate model of a general purpose computer

Both satements are false

Both statments are true.

Question No: 8 ( Marks: 1 ) - Please choose one

To determine whether a string is generated by the given CFG

CYK algorithm is used

CIK algorithm is used

CNK algorithm is used

CNM algorithm is used

Question No: 9 ( Marks: 1 ) - Please choose one

The process of finding the derivation of word generated by particular grammar is called_____

Processing

Parsing

Programming

Planing

Question No: 10 ( Marks: 1 ) - Please choose one

Pumping Lemma II says that length(x) + length(y) should be

Less than number of states

Less than or equal to number of states

Greater than number of states

Greater than or equal to number of states

Question No: 11 ( Marks: 1 ) - Please choose one

Before the PDA is converted into conversion form a new state _____ is defined which is placed in the middle of any edge.

HERE

START

FINAL

READ

Question No: 12 ( Marks: 1 ) - Please choose one

Left hand side of CFG may consist of:

One terminal

More than one terminal

One non-terminal

Terminals and non-terminals

Question No: 13 ( Marks: 1 ) - Please choose one

A CFG is said to be ambiguous if there exists one word of its language that cannot be generated by different production trees.

True

False

Depend on language

None of the given

Question No: 14 ( Marks: 1 ) - Please choose one

If L1 and L2 are two regular languages, then ______ is also regular.

L1 L2

L1 L2

Both L1 L2 , L1 L2

None of the given

Question No: 15 ( Marks: 1 ) - Please choose one

If L is a regular language then, Lc is also a _____ language.

Regular

Non-regular

Regular but finite

None of the given

Question No: 16 ( Marks: 1 ) - Please choose one

Running the string abbabbba on this Moore machine. The outputs will be________

q1/0

a a

q0/1b

bb

101111010

01111010

01011110

01010101

Question No: 17

a

b q2/1

b

aa

1

a

q3/0 2

( Marks: 1 ) - Please choose one

a

aaa

bb

a

b

ba

ab

b a

baa

ba

b b

bb

Above given FA has ___________ final states

1

2

3

4

Question No: 18

a,ba,b

( Marks: 1 ) - Please choose one

a,b

a,b+ 1 2

Above given FA s are ___________

Non-equivalent

FA2 is not valid as it

has no final state.

None of these

Equivalent

Question No: 19 ( Marks: 1 ) - Please choose one

2 a 4

a a b a,b

1 a b 6+

b a b

3 b 5

RE for the above given FA is __________________.

(a+b)* (aaa + bbb) (a+b)* OR (a+b)* (aaa) (a+b)* + (a+b)*(bbb) (a+b)*

(a+b)* (aaa + bbb) (a+b)*

(a+b)* (aaa) (a+b)* +

(a+b)*(bbb) (a+b)*

(a+b)* (aaa + bbb)*

(a+b)*

Question No: 20 ( Marks: 1 ) - Please choose one

One FA has n states and m letters in the alphabet. Then FA will have _____ number of states in the diagram.

(m)(n)

(n)(m)

(m)(n) & (n)(m)

None of these

Question No: 21 ( Marks: 1 ) - Please choose one

Choose the incorrect statement.

For a given input string, length of the output strings generated by a Moore machine is not more than the length of the output strings generated by that of a Mealy machine

A Mealy machine generates no language as such

All of these

A Mealy machine has no terminal state

Question No: 22 ( Marks: 1 ) - Please choose one

Pumping lemma is generally used for proving

A given grammar is regular

A given grammar is not regular

Whether two given regular expressions are equivalent

None of these

Question No: 23 ( Marks: 1 ) - Please choose one

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

(ab)* and a*b*

x(xx)* and (xx)*x

x+ and x*x+

All of these

Question No: 24 ( Marks: 1 ) - Please choose one

Choose the correct statements.

A = {an bn | n = 0, 1, 2, 3, } is a regular language.

The set of B, consisting of all strings made up of only a s and b s having equal number of a s and b s defines a regular language

L(A*B*) B gives the set of A

None of these

Question No: 25 ( Marks: 1 ) - Please choose one

Choose the incorrect statements.

A = {an bn | n = 0, 1, 2, 3, } is a regular language

The set of B, consisting of all strings made up of only a s and b s having equal number of a s and b s defines a regular language

L(A*B*) B gives the set of A

None of these

Question No: 26 ( Marks: 1 ) - Please choose one

The logic of pumping lemma is a good example of

The divide and conquer technique

Recursion

Iteration

The Pigeon-hole principal

Question No: 27 ( Marks: 1 ) - Please choose one

Palindrome can be recognized by FSM because

An FSM can t remember arbitrarily large

amount of information An FSM can t

deterministically fix the mid-point

Even if the mid-point is known, an FSM can t find whether the second half of the string matches the first half

None of these

Question No: 28 ( Marks: 1 ) - Please choose one

The language all words (made up of a s and b s) with at least two a s can be described by the regular expression.

(a+b)* a (a+b)* a (a+b)*

(a+b)* ab* a(a+b)*

b*ab* a(a+b)*

All of these

Question No: 29 ( Marks: 1 ) - Please choose one

The language all words (made up of a s and b s) with at least two a s can not be described by the regular expression.

a(a+b)*a(a+b)*(a+b)*ab*

(a+b)* ab* a(a+b)*

b*ab* a(a+b)*

none of these

Question No: 30 ( Marks: 1 ) - Please choose one

An alphabet of is valid if

No letter of appears in middle of

any other letter No letter of

appears at end of any other letter

No letter of appears at start of

any other letter

All of above

Question No: 31 ( Marks: 1 )

Can you neglect the following? Pumping lemma is generally used for proving that a given grammar is regular.

Question No: 32 ( Marks: 1 )

Is it correct that the regular expression can not be used for simulating sequential circuits?

Question No: 33 ( Marks: 2 )

Differentiate between containing and consisting?

Question No: 34 ( Marks: 2 )

How can you determine that any two FAs can generate the equivalint language?

Question No: 36 ( Marks: 3 )

Find Pref (Q in R) for: Q = {01, 10, 11, 011} R = {10011, 100100, 01010, 0111, 010100, 01011}

Question No: 37 ( Marks: 3 )

What are the Joints of PDA?

Question No: 38 ( Marks: 5 )

Consider the Context Free Grammar (CFG) S aAS | a A SbA | SS | ba

Show that the word aaaabaa can be generated by this CFG by showing the whole derivation starting from S

Question No: 39 ( Marks: 5 )

Construct RE for following languages over = {a, b}All words containing exactly 4 a (mean, there must be 4 a neither less nor extra)

Question No: 40 ( Marks: 10 )

Decide whether or not the word babab is generated by the following grammar using CYK algorithm. Show all steps.

S AB | CD | a | b A a B SA C DS D b

Question No: 41 ( Marks: 10 )

Explain the Emptiness Algorithm?

Question No: 1 ( Marks: 1 ) - Please choose one

(a+b)*a(a+b)*b(a+b)* is the RE of language defined overand one b

True

False

Such a language does not exist

None of these

Question No: 2 ( Marks: 1 ) - Please choose one

={a,b} having at least one a

If r1 = (aa + bb) and r2 = ( a + b) then the language (a + b)* (aa + bb)* will begenerated by

(r2)(r1)

(r1 + r2)*

(r2)*(r1)*

(r1)*

Question No: 3 ( Marks: 1 ) - Please choose one

In FA starting state is represented by a ________ sign.

+

-

*

S

Question No: 4 ( Marks: 1 ) - Please choose one

Who did not invent the Turing machine?

Alan Turing

A. M. Turing

Turing

None of these

Question No: 5 ( Marks: 1 ) - Please choose one

According to _________ machine, Finite set of states containing exactly one START state and some (may be none) HALT states that cause execution to terminate when the HALT states are entered.

Finite Automata

TG

Turing

Insertion

Question No: 6 ( Marks: 1 ) - Please choose one

Can a turing machine's head ever be in the same location in two successive steps?

Yes

Yes but only in finite languages

No

Yes but only in infinite langauges

Question No: 7 ( Marks: 1 ) - Please choose one

Examin the following CFG and select the correct choice S AB, A BSB, B CC

C SS

A a|b C b|bb

abb is a word in the corresponding CFL.

abb is not the word of corresponding CFL.

any word can be accept from the corresponding CFL.

Non of these

Question No: 8 ( Marks: 1 ) - Please choose one

To determine whether a string is generated by the given CFG

CYK algorithm is used

CIK algorithm is used

CNK algorithm is used

CNM algorithm is used

Question No: 9 ( Marks: 1 ) - Please choose one

The process of finding the derivation of word generated by particular grammar is called_____

Processing

Parsing

Programming

Planing

Question No: 10 ( Marks: 1 ) - Please choose one

Converting the given CFG in CNF is the first rule of _____

CYK algorithm

CKY algorithm

KYC algorithm

CNK algorithm

Question No: 11 ( Marks: 1 ) - Please choose one

Which statement is true?

The PDA must have one accept state and

one reject state The PDA must have one

accept state and two reject state The PDA

must have two accept state and two reject

state There is no reject state in the PDA.

Question No: 12 ( Marks: 1 ) - Please choose one

If a language can be expressed by a regular expression, then its complement cannot be expressed by a regular expression. This statement is:

True

False

Depends on language

None of the given optios

Question No: 13 ( Marks: 1 ) - Please choose one

Left hand side of CFG may consist of:

One terminal

More than one terminal

One non-terminal

Terminals and non-terminals

Question No: 14 ( Marks: 1 ) - Please choose one

Choose the correct answer?

The set of input letters and the set of output characters in a Moore machine, may not be same

The set of input letters and the set of output characters in a Moore machine, must be same.

Question No: 15 ( Marks: 1 ) - Please choose one

The symbols that can t be replaced by anything are called___

Terminal

Non-Terminal

Production

All of given

Question No: 16 ( Marks: 1 ) - Please choose one

+

b(a+b)*a

-a( a+b)* b

+

Above given GTG accepts the language in which strings

Begins and ends with different letters

Begins and ends with same letters

Have length greater than 1

None of these

Question No: 17 ( Marks: 1 ) - Please choose one

If L1 and L2 are two regular languages, then ______ is also regular.

L1 L2

L1 L2

Both L1 L2 , L1 L2

None of the given

Question No: 18 ( Marks: 1 ) - Please choose one

If L is a regular language then, Lc is also a _____ language.

Regular

Non-regular

Regular but finite

None of the given

Question No: 19 ( Marks: 1 ) - Please choose one

a, b

- b 1 ^ +

Above given structure is a ______________

FA

NFA

NFA - ^

None of these

Question No: 20 ( Marks: 1 ) - Please choose one

a, b

2 b 4+a

1- a,bb

3 a 5+

Above given TG represents the language____

Begins and ends with same letters

Begins and ends

with different letters

Begins with a

None of these

Question No: 21 ( Marks: 1 ) - Please choose one

A language can be defined through Transition Graph.

False

True

Depends on alphabet

None of these

Question No: 22 ( Marks: 1 ) - Please choose one

The word formal in formal languages means

The symbols used have well defined meaning

They are unnecessary, in reality

Only the form of the string of symbols is significant

None of these

Question No: 23 ( Marks: 1 ) - Please choose one

Pumping lemma is generally used for proving

A given grammar is regular

A given grammar is not regular

Whether two given regular expressions are equivalent

None of these

Question No: 24 ( Marks: 1 ) - Please choose one

Choose the incorrect statements.

A = {an bn | n = 0, 1, 2, 3, } is a regular language

The set of B, consisting of all strings made up of only a s and b s having equal number of a s and b s defines a regular language

L(A*B*) B gives the set of A

None of these

Question No: 25 ( Marks: 1 ) - Please choose one

The logic of pumping lemma is a good example of

The divide and conquer technique

Recursion

Iteration

The Pigeon-hole principal

Question No: 26 ( Marks: 1 ) - Please choose one

Palindrome can t be recognized by FSM because.

An FSM can t remember arbitrarily large amount of information.

Download Latest Papers: http://www.vumonster.com/viewPage.php?ID=Papers

An FSM can t deterministically fix the mid-point

Even if the mid-point is known, an FSM can t find whether the second half of the string matches the first half

All of these

Question No: 27 ( Marks: 1 ) - Please choose one

Palindrome can be recognized by FSM because

An FSM can t remember arbitrarily large

amount of information An FSM can t

deterministically fix the mid-point

Even if the mid-point is known, an FSM can t find whether the second half of the string matches the first half

None of these

Question No: 28 ( Marks: 1 ) - Please choose one

The FSM in the following picture is a.

Mealy machine

Moore machine

Kleene machine

None of these

Question No: 29 ( Marks: 1 ) - Please choose one

Following machine is.

Download Latest Papers: http://www.vumonster.com/viewPage.php?ID=Papers

complement a given bit pattern

generates all strings of 0 s and 1 s

adds 1 to a given bit pattern

none of these

Question No: 30 ( Marks: 1 ) - Please choose one

The language all words (made up of a s and b s) with at least two a s can not be described by the regular expression.

a(a+b)*a(a+b)*(a+b)*ab*

(a+b)* ab* a(a+b)*

b*ab* a(a+b)*

none of these

Question No: 31 ( Marks: 1 )

Is the following pairs of regular expressions are equivalent? x+ and x*x+

Question No: 32 ( Marks: 1 )

Can you neglect that the any given Moore machine has an equivalent Mealy machine?

Question No: 33 ( Marks: 2 )

What is Lexical Analyzer?

Question No: 34 ( Marks: 2 )

Download Latest Papers: http://www.vumonster.com/viewPage.php?ID=Papers

Why we use null string in FA?

Question No: 35 ( Marks: 3 )

Find Pref (Q in R) for: Q = {01, 10, 11, 011} R = {10011, 100100, 01010, 0111, 010100, 01011}

Question No: 36 ( Marks: 3 )

What does mean the LANGUAGE IS CLOSED?

Question No: 37 ( Marks: 3 )

How to differentiate between "wanted" and "unwanted branch"?

Question No: 38 ( Marks: 5 )

Give Regular Expressions (REs) for the following languages.i) Let = {a, b, c}; all words that contain at least one double letter in them.ii) Let = {a, b}; having even numbers of a s and even number of b s

Note: Helpful symbol(s):

Question No: 39 ( Marks: 5 )

Decide whether or not the following grammer generates any words using Emptyness algorithm discussed in the lectures. Show all steps.

S AB A SB | a B SA | b

Question No: 40 ( Marks: 10 )

Find DFA for the following CFG S bS | aY Y aY | bZ Z aY | bS | ^

Question No: 41 ( Marks: 10 )


Recommended