Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Let ={0,1}. Let WWk={ww|w* and w is of length k}.

  1. Show that for eachk , no DFA can recognizeWWk with fewer than2k states.
  2. Describe a much smaller NFA for WWk¯, the complement of WWk.

Short Answer

Expert verified
  1. Any DFA for given language has at least2k states.
  2. A much smaller NFA for WWk¯, the complement of WWkcan be described.

Step by step solution

01

Explain DFA.

Deterministic Finite Automata is the computer model that has the definite next state. Nondeterministic Finite Automata has the several states, one of them can be the next state.

02

Show that for each k , no DFA can recognize WWk with fewer than 2k states.

a.

Consider theWWk={ww|w* and w is of length k} language is at least of lengthk . Consider the two bit strings, x=x1xk and y=y1yk, be some location such that xiyi. One of the strings contains a 1 at theith position and other contains a 0. Assume that , z=0i1, then zdistinguish between the bit strings.

Hence, there exists2k strings of lengthk , that can be mutually distinguish by the given argument.

Therefore, Any DFA for given language has at least 2kstates.

03

Step 3: Describe a much smaller NFA for WWk¯ , the complement of WWk.

b.

The language WWk¯, can be described as WWk¯={ww|w* and |w|<k}. The NFA can be build with exactly k+1states and it recognizes the language WWk¯.

The NFA consists of the states corresponding to the last kbits.

The machine starts from the initial state which is state 0, as it will travers 1 initial state which is state 0, as it will traverse 1 it understand that it is the kbit from the finishing state of end state and proceed to state 1.

As it has reached on the state k, it accepts the string if and only if the string containsk1 bits. It checks fork1 bits as it starts traversing from0th index.

Therefore, A much smaller NFA for WWk¯, the complement of WWkhas been described.

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 Vaia!

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

A homomorphism is a function f:Σ-Γ*from one alphabet to strings over another alphabet. We can extend f to operate on strings by defining:f(w)=f(w1)f(w2)···f(wn),wherew=w1w2···wnandeachwiΣ.

We further extend fto operate on languages by defining f(A)={f(w)|wA},for any language A.

a. Show, by giving a formal construction, that the class of regular languages is closed under homomorphism. In other words, given a DFA Mthat recognizes Band a homomorphism f, construct a finite automaton role="math" localid="1660800566802" M0that recognizes f(B).Consider the machine role="math" localid="1660800575641" M0that you constructed. Is it a DFA in every case?

b. Show, by giving an example, that the class of non-regular languages is not closed under homomorphism.

Let D={w|wcontains an even number of a’s and an odd number of b’s and does not contain the substring ab}. Give a DFA with five states that recognizes role="math" localid="1663218927815" Dand a regular expression that generatesrole="math" localid="1663218933181" D.(Suggestion: DescribeD more simply.)

If A is a set of natural numbers and k is a natural number greater than 1, let

Bk(A)={w|wistherepresentationinbasekofsomenumberinA}.

Here, we do not allow leading 0s in the representation of a number. For example ,B2({3,5})={11,101}and B3({3,5})={10,12}.Give an example of a set A for which B2(A)is regular butB2(A) is not regular. Prove that your example works.

Using the solution you gave to Exercise 1.25, give a formal description of the machines T1andT2 depicted in Exercise 1.24

We define the avoids operation for languages A and B to be

AavoidsB={w|wAandwdoesntcontainanystringinBasasubstring}.

Prove that the class of regular languages is closed under the avoids operation.

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.

Sign-up for free