Comp335- Midterm

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

If there is a regular language, then there is a regular expression for L.

...

Regular language are closed under concatenation

...

If language L is context free, is L INTERSECT L also context free?

NO.

Every regular language is also context free

Yes

If L is context-free and R is regular, L - R is context free?

Yes, because L - R = L Intersect not(L), so L - R is context free

Is it true that every regular languages is context free?

Yes, but not every contex-free language is regular

Any language that can be accepted by a DFA can be accepted by an NFA?

Yes.

What happen if an NFA needs to make a transition when no transition exists?

The automation dies and that particular path rejects.

If l1 is not regular and l2 is not regular then l1 U l2 is regular

Yes

Intersection is finite

Yes

What are the 3 conditions that an NFA accepts a string

1. If there is at least one path to the next state 2. all symbols in w is consumed 3. M is in a final state

What is the NFA to DFA algorithm

1. NFA starting state is the same for DFA 2. For every state in the DFA and every symbole in the alphabet determine for the nfa. Nfa: S*(q1,a) = (q1',q2',qm) dfa: S*((q1,q2,qm), a) = (q1',q2',qm) 3. Repeat #2 until no more transusion can be added to the dfa #source: slide from other section

What is a leftmost derivation?

A derivation in which each step expands the leftmost nonterminal

What is a rightmost derivation?

A derivation in which each step expands the rightmost nonterminal

What is a regular language?

A language L is called a regular language iff there exists a DFA D such that l(D) = L ALSO: A language L is regular iff there is SOME NFA N such that l(N) = L

If L1 is REGULAR and L2 is a SUBSET of L1 then L2 IS regular???????

FALSE

if L1 and L1 - L2 are regular, then L2 must be regular????

FALSE

If L1 s regular and L1 U l2 is not regular, then L2 is not regular????

FALSE, because regular language is closed under union

The intersection of two non-context-free languages cannot be context-free?????

False

Every subset of a regular language is regular???

False, cause prime number thing.

If L1 is regular and L2 is not regular, the L1 U L2 is NOT regular???

False, it is regular

what does pumping lemma find out

If a language fail the pumping lemma, we know for sure that it is not regular.

What is a NON DETERMINISTIC model of computation?

If at a given point multiple decision can be made. The machine accepts if any series of choices leads to an accepting state.

What is a DETERMINISTIC model of computation?

If at every point of computation there is exactly one choice that can be made. The machine accepts if that series of choices leads to an accepting state.

What happens when a NFA encounter a lambda?

It moves to the next step without moving the position of the reading head.

Is it true that every context-free language is regular?

Not necessarily

If a language pass the pumping lemma what do we know about it?

Nothing. we don't know if it is regular or not.

Every non regular language is a union of COUNTABLY many regular language

TRUE

If L is a regular language, then L complement is a regular language. (True or false)

TRUE.

Every non-regular language is infinite????

True

For any regular language l1 and l2 over sum, l1-l2 is regular

True

If l is a cfl and r is regular language then l intersect r is a cfl

True

A finite language is regular?

True, if in your language you have i <= to something

Assume regular when you have these closure

Union Intersection Complement Kleene Homomorphism

What is an NFA?

When there are two transitions labelled with the same symbols. eg. 2 Branches with 'a'

Equivalent NFA and DFA L(M) = L(M')

YES

If there is a regular expression. then l(R) is regular

YES

If L1 and L2 are Regular languages. is L1 intersect L2 regular???????

YES.

If L1 and L2 are regular languages, is L1 U L2 regular????

YES.

A DFA accepts sigma* if and only if all the reachable states in M are acceptance state

Yes

Concat of a regular language with its complement is also regularr

Yes

If F is not regular can it pass the pre-condition pumping lemma?

Yes

If L is a language and there is some context free grammar G such that L = l(G) , then we say that L is a context-free language.

Yes

If L is regular, L passes the condition of the pumping lemma?

Yes

Can any language accepted by an NFA also be accepted by a DFA?

Yes.


Set pelajaran terkait

Real Estate Chapter 2: Legal Foundations to Value

View Set

Chapter 6 Death (Mortality) Rates

View Set

Macro - The Expenditure-Output Model

View Set

Credit(Credit Reports, Identity Theft, Bankruptcy & Collection Agencies)

View Set