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.

Short Answer

Expert verified

BkA=w|wistherepresentationinbasekofsomenumberinAis not regular is proved.

Step by step solution

01

Regular language.

A language is regular if it can be expressed in terms of regular expression.A regular expression can also be described as a sequence of pattern that defines a string. Regular expressions are used to match character combinations in strings.

02

Step 2:

BkA=w|wistherepresentationinbasekofsomenumberinA.Here from the question the examples are given as,,B2{3,5}=11,101,B3{3,5}=10,12.not allow leading zeros and representation of number.

Let [z]3be the number represented by the base-three numeral z. Since the set of numbers,

A={2n-1nN}is represented in binary by the regular expression 1*1*if we prove that,

L=B3(A)={z{0,1,2}*nN.[z]3=2n-1}{1,2}×{0,1,2}*

is not regular.

Use the pumping lemma for regular languages. Suppose L is regular and is a word in L longer than the pumping length L . As such,

ay>0bxyp,andci>0,xyizL.

L={anbncn|n0}z=uvwxy,z=anbncn{n=1,z=abc}|z|=3n>n

By applying pumping lemma to this grammar this grammar does not follow the property of pumping lemma and it is proved that this given language and its stringBkA=w|wistherepresentationinbasekofsomenumberinAis not regular language.

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 2{[00],[01][10][11]}Here, contains all columns of localid="1663175934749" 0sand1sof height two. A string of symbols in gives two rows of 0sand1s. Consider each row to be a binary number and let C={wΣ*2|thebottomrowofwisthreetimesthetoprow}. For example, [00][01][11][00]cbut [01][01][10]EC. Show that C is regular. (You may assume the result claimed in Problem 1.31.)

Question: Let Σ={0,1}and let

D={w|wcontainsanequalnumberofoccurrencesofthesubstrings01and10}.

Thus101D because 101 contains a single 01 and a single 10, but 1010Dbecause 1010 contains two 10 s and one .01 Show that D is a regular language.

A finite state transducer (FST) is a type of deterministic finite automaton whose output is a string and not just accept or reject. The following are state diagrams of finite state transducers T1andT2.

Each transition of an FST is labeled with two symbols, one designating the input symbol for that transition and the other designating the output symbol. The two symbols are written with a slash, I, separating them. In T1, the transition from q1toq2has input symbol 2 and output symbol 1. Some transitions may have multiple input–output pairs, such as the transition in T1from q1to itself. When an FST computes on an input string w, it takes the input symbols w1···wnone by one and, starting at the start state, follows the transitions by matching the input labels with the sequence of symbols w1···wn=w. Every time it goes along a transition, it outputs the corresponding output symbol. For example, on input 2212011, machine T1enters the sequence of states q1,q2,q2,q2,q2,q1,q1,q1and produces output 1111000. On input abbb, T2outputs 1011. Give the sequence of states entered and the output produced in each of the following parts.

a. T1on input011

b. T1on input211

c. T1on input121

d. T1on input0202

e. T2on input b

f. T2on input bbab

g. T2on input bbbbbb

h. T2on input localid="1663158267545" ε

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.
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