/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} Q64P Let N be an NFA with k states th... [FREE SOLUTION] | 91Ó°ÊÓ

91Ó°ÊÓ

Let N be an NFA with k states that recognizes some language A.

a. Show that if Ais nonempty, Acontains some string of length at most k.

b. Show, by giving an example, that part (a) is not necessarily true if you replace both A’s byA .

c. Show that If Ais nonempty, Acontains some string of length at most 2k.

d. Show that the bound given in part (c) is nearly tight; that is, for each k, demonstrate an NFA recognizing a languagerole="math" localid="1660752484682" Ak' where role="math" localid="1660752479553" Ak'is nonempty and where Ak'’s shortest member strings are of length exponential in k. Come as close to the bound in (c) as you can.

Short Answer

Expert verified
  1. Ais nonempty and Acontains some string of length at most kis proved.
  2. By replacing A’s byA is not necessarily true.
  3. If Ais nonempty, Acontains some string of length at most 2k.
  4. The given statement is proved below.

Step by step solution

01

Non deterministic finite automata.

Context free language is a grammar where its language or string that formed by context free grammar is supports pushdown deterministic automata. In Non deterministic finite automata, for a particular input symbol, the machine can move to any combination of the states in the machine. In other words, the exact state to which the machine moves cannot be determined.

02

Given statement in (a) is proved.

a)

If Ais nonempty, there is a path through N from a start state to an accepting state. By removing cycles, we may suppose the path has length at most k. The word along the edges of this path is a word of length ≤kaccepted by N. Context free language is a grammar where its language or string that formed by context free grammar is supports pushdown deterministic automata. In Non deterministic finite automata, for a particular input symbol, the machine can move to any combination of the states in the machine. In other words, the exact state to which the machine moves cannot be determined.

Hence, Ais nonempty,A contains some string of length at mostk .

03

Replacement A ’s by  A.

b)

There are a couple of things about such a Non deterministic finite automata Nn that must be true:

It has more than one state and it has at least one cycle. And here must be trying to construct automation for Σ={0}

Every time create a cycle either A¯ becomes empty or there are "holes" in that cycle (non-accept states) which require another cycle and the construction of the machine that the situation recurses.

Extending Σ a set of natural numbers X. For each n∈X, there is a Non deterministic finite automata Nnof n states which accepts all numbers which are not divisible by n(its just a cycle with one non accepting state same as the start state). Let a new Non deterministic finite automata Nnbe the union of the Nn for n∈Xwith an additional start state (which is accepting), which has a single ϵϵ edge to each of the start states of the Nn. The natural numbers not accepted by Nnare precisely the nonzero multiples of lcm(X), and Nnhas 1+∑n∈Xn states.

04

If  A is nonempty, A contains some string of length at most 2k

c)

Use the subset construction to find a deterministic finite automataD accepting A.

If Ais nonempty, there is a path through N from a start state to an accepting state. By removing cycles, we may suppose the path has length at most k. The word along the edges of this path is a word of length ≤k accepted by N. Context free language is a grammar where its language or string that formed by context free grammar is supports pushdown deterministic automata.

Hence ,A is nonempty,A contains some string of length at mostk .

Dhas less or equal to2k vertices by construction. LetD ′ be the deterministic finite automata obtained fromD by reversing the accepting states (a non accepting state is now accepting and vice versa).

Then D′ accepts A'.

Apply the argument from the first part to find a word of length ≤ 2kwhich D’ accepts, or equivalently lies in A'.

Hence, If Ais nonempty, Acontains some string of length at most 2kis proved.

05

Given statement in (d) is proved.

d)

Let the alphabet consist of one letter 'one', and consider words as their corresponding natural numbers in unary.

Fix a set of natural numbers X. For each n∈X, there is a Non deterministic finite automata Nnof nstates which accepts all numbers which are not divisible by n(its just a cycle with one non accepting state same as the start state). Let a new Non deterministic finite automata Nnbe the union of the role="math" localid="1660753637746" Nnfor n∈Xwith an additional start state (which is accepting), which has a single ϵϵ edge to each of the start states of theNn . The natural numbers not accepted by Nnare precisely the nonzero multiples of lcm(X), andNn has 1+∑n∈Xn states. Context free language is a grammar where its language or string that formed by context free grammar is supports pushdown deterministic automata.

for instance takeX to be the primes less than p for somep to obtain one parameterized sequence of Non deterministic finite automata Nn with the required property.

Indeed, arguing very coarsely, Nnhas at most pstates but the first number not accepted is at least2π(p)≥2p/logp−1 for sufficiently large p. Unfortunately this is only super polynomial in the number of states, and not quite exponential.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with 91Ó°ÊÓ!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Let Σ2be the same as in Problem 1.33. Consider each row to be a binary number and let D={w∈Σ*2|the top row of w is a larger number than is the bottom row}. For example, 00101100∈D, but 000111006∈D. How that D is regular.

Use the pumping lemma to show that the following languages arenot regulara. â¶Ä‰â¶Ä‰A1={0η1η2η|n≥0}b. â¶Ä‰â¶Ä‰A2={Ó¬Ó¬Ó¬|Ӭ∈{a,b}*}c. â¶Ä‰â¶Ä‰A3={a2η|n≥0}(Here,a2ηmeansastringof2η a's.)a. â¶Ä‰â¶Ä‰A1={0η1η2η|n≥0}b. â¶Ä‰â¶Ä‰A2={Ó¬Ó¬Ó¬|Ӭ∈{a,b}*}c. â¶Ä‰â¶Ä‰A3={a2η|n≥0}(Here,a2ηmeansastringof2η a's.)

Let Cn={x|xis a binary number that is a multiple of n}. Show that for each n⩾1, the language Cnis regular

The pumping lemma says that every regular language has a pumping length P , such that every string in the language can be pumped if it has length p or more. If P is a pumping length for language A, so is any length p'⩾pThe minimum pumping length for A is the smallest p that is a pumping length for A . For example, if A=01*, the minimum pumping length is 2.The reason is that the string s=0is in A and has length 1 yet s cannot be pumped; but any string A in of length 2 or more contains a 1 and hence can be pumped by dividing it so that x=0,y=1,andzis the rest. For each of the following languages, give the minimum pumping length and justify your answer.

a).0001*b).0*1*c).001∪0*1*d).0*1+0+1*∪10*1

role="math" localid="1660797009042" e).(01)*f).∈g).1*01*01*h).10(11*0)*

i).1011j).∑*

Question:

a. Let B={1ky|y∈{0,1}*and ycontainsatleastk1s,fork⩾1}. Show that B is a regular language.

b. Let C={1ky|y∈{0,1}* and ycontainsatmostk1s,fork⩾1}. Show that C isn’t a regular language.

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.