Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 not Straightforward 2 5 Consider the class of languages for n 0 : L n = { w = w 1 w 2 c

2not Straightforward
25
Consider the class of languages for n0 :
Ln={w=w1w2cdotswn|AAi,1in,wiin{0,1}??#?1(w1w2cdotswi)>#?0(w1w2cdotswi)}
That is,Ln is the set of all n-bits strings where every prefix has more 1's than 0's. For example,
]=[25
(a) Show that Ln is regular for n0.
(b) Let winLn,nk>0. Let us remove the last k symbols wn-k+1wn-k+2cdotswn from w to get u.
i. Prove that uinLn-k.
2
ii. No string in an Ln starts with a 0.
iii. All strings in Ln,n>1 start with 11.
(c) For winLn,n0, we define d(w)=#?1(w)-#?0(w). Prove:
i. If d(w)=1, then w1inLn+1
ii. If d(w)>1, then w0inLn+1??w1inLn+1
iii. d(w)-=n(mod2)
(d) For winLn,n0,d(w)=#?1(w)-#?0(w), let di,j=|{w|winLi??d(w)=j}|.i,j0. :
i. Prove that di,j=0,i+j-=1(mod2)
ii. Prove that the recurrence of di,j is given by:
di,j=di-1,j-1+di-1,j+1,1i,j
=1,i=0,j=0
=0,i>0,j=0
=0,i0,j>i
iii. Solve di,j.
(e) Let fn=|Ln|. Define fn recursively and solve.
Hint: fi=j?di,j
(f) Argue that
L={w=w1w2cdotswn|AAi,1in,wiin{0,1}??#?1(w1w2cdotswi)>#?0(w1w2cdotswi),n>0}
cannot be regular.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

1844804526, 978-1844804528

More Books

Students also viewed these Databases questions