LetΣ={a,b} . For each k1, let Ckbe the language consisting of all strings that contain an a exactly K places from the right-hand end.

ThusCk=Σ*k-1 . Describe an NFA with k+1states that recognizes Ckin terms of both a state diagram and a formal description.

Short Answer

Expert verified

A non deterministic finite automaton withk+1 states that recognizesCk in terms of both a state diagram and a formal description is given 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.InNon 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

Solution.

C1=a+b*aC2=a+b*aa+bC3=a+b*aa+ba+bC4=a+b*aa+b........a+btherearek-1a+btermsappendedaftera

Formaldescription=M(Q,,δ,q0,F)Q=q0,q1,..........,qk=a,bq0=initialstate

localid="1660806669374" F=qkTransition:δ(q0,b)=q0,:δ(q0,a)=q0δ(q0,a)=1:δ(i-1,b)=qi,δ(i-1,a)=qfor2ik

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

Question:Consider the algorithm MINIMIZE, which takes a DFA as input and outputs DFA .

MINIMIZE = “On input , where M=(Q,Σ,δ,q0,A) is a DFA:

1.Remove all states of G that are unreachable from the start state.

2. Construct the following undirected graph G whose nodes are the states of .

3. Place an edge in G connecting every accept state with every non accept state. Add additional edges as follows.

4. Repeat until no new edges are added to G :

5. For every pair of distinct states q and r of and every aΣ :

6. Add the edge (q,r) to G if δq,a,δr,a is an edge of G .

7. For each state q,let[q] be the collection of statesq={rQ|noedge joins q and r in G }.

8.Form a new DFA M'=Q',Σ,δ',q'0,A'where

Q'={[q]|qQ}(ifq=r,onlyoneofthemisinQ'),δ'(q,a)=[δq,a]foreveryqQandaΣ,q00=[q0],andA0={[q]|qA}

9. Output ( M')”

a. Show that M and M' are equivalent.

b. Show that M0 is minimal—that is, no DFA with fewer states recognizes the same language. You may use the result of Problem 1.52 without proof.

c. Show that MINIMIZE operates in polynomial time.

Let J={w|eitherw=0xfor some,xATM orw=1yfor some yATM¯}. Show that neither JnorJis Turing-recognizable.

For each let Ƶm = {0, 1, 2, . . . , m − 1}, and let = (Ƶm, +, ×) be the model whose universe is Ƶm and that has relations corresponding to the + and × relations computed modulo m. Show that for each m, the theory Th is decidable.

Write formal descriptions of the following sets.

  1. The set containing the numbers1,10, and100
  2. The set containing all integers that are greater than5
  3. The set containing all natural numbers that are less than5
  4. The set containing the string aba
  5. The set containing the empty string
  6. The set containing nothing at all

In both parts, provide an analysis of the time complexity of your algorithm.

a. Show thatEQDFAP.

b. Say that a languageAisstar-closedifA=A*. Give a polynomial time algorithm

to test whether a DFArecognizes a star-closed language. (Note that EQNFAis not

known to be in P.)

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