নিয়মিত ভাষায় শব্দের সংখ্যা


17

উইকিপিডিয়া অনুসারে , যে কোনও নিয়মিত ভাষার জন্য L নিয়মিত Lথাকে λ 1 , , λ kλ1,,λk এবং বহুপদী p 1 ( x ) , , পি কে ( এক্স )p1(x),,pk(x) যেমন প্রতিটি n এর জন্য দৈর্ঘ্যের শব্দের L ( n )n সংখ্যা থাকে এন মধ্যে এল সন্তুষ্ট সমীকরণsL(n)nL

s এল ( এন ) = পি 1 ( এন ) λ n 1 + + পি কে ( এন ) λ n কেsL(n)=p1(n)λn1++pk(n)λnk

ভাষা এল = { 0 2 এন | এন এন }L={02nnN} নিয়মিত (হয় ( 00 ) *(00) মিলবে)। s L ( n ) = 1sL(n)=1 iff n সমান, এবং s L ( n ) = 0sL(n)=0 অন্যথায়।

তবে আমি λ iλi এবং p ipi (যা উপরের দ্বারা বিদ্যমান থাকতে হবে) খুঁজে পাচ্ছি না । হিসাবে গুলি এল ( এন )sL(n) differentiable হতে হয়েছে এবং ধ্রুব নয়, এটা একরকম একটি তরঙ্গ মত আচরণ করতে হবে, এবং আমি কিভাবে আপনি সম্ভবত তা করতে পারে polynomials এবং সূচকীয় ফাংশন মতো summands অসীম নম্বর দিয়ে শেষ পর্যন্ত ছাড়া দেখতে পায় না একটি টেলর সম্প্রসারণ। কেউ কি আমাকে আলোকিত করতে পারেন?


আপনি এই উপপাদ্যের নাম জানেন?
আর্টেম কাজনাটচিভ

@ আর্টেমকাজনাটচিভ: নাহ, কোনও ধারণা নেই। দুর্ভাগ্যক্রমে উইকিপিডিয়া কোনও রেফারেন্স দেয় না :(
অ্যালেক্স টেন ব্রিঙ্ক

উত্তর:


14

For your language, can you take p0(x)=1/2p0(x)=1/2, λ0=1λ0=1, p1(x)=1/2p1(x)=1/2, λ1=1λ1=1, and pi(x)=λi=0pi(x)=λi=0 for i>1i>1? The Wikipedia article doesn't say anything about the coefficients being either positive or integral. The sum for my choices is

1/2+1/2(1)n=1/2(1+(1)n)1/2+1/2(1)n=1/2(1+(1)n)

which seems to be 1 for even nn, and 0 for odd nn. Indeed, a proof by induction seems straightforward.


Ah yes, of course, I'd forgotten about alternating minus signs. Will upvote once the day is over - I've hit the vote cap.
Alex ten Brink

No induction needed for that claim.
Raphael

@Raphael True, but then again, that only makes my assertion all the more accurate.
Patrick87

11

@Patrick87 gives a great answer for your specific case, I thought I would give a tip of how to find sL(n)sL(n) in the more general case of any language LL that can be represented by an irreducible DFA (i.e. if it is possible to get to any state from any state). Note that your language is of this type.


Proof of theorem for irreducible DFAs

Let DD be the transition matrix of your mm-state DFA, since it is irreducible, the matrix is normal and has a full eigenbasis |λ1...|λm|λ1...|λm. Let |A|A be the accept vector: i.e. i|Ai|A is 1 if ii is an accept state, and 0 otherwise. WLOG assume that |1|1 is the initial state, and since we have a complete eigenbasis, we know that |1=c1|λ1+...+cm|λm|1=c1|λ1+...+cm|λm for some coefficients c1...cmc1...cm (note that ci=λi|ici=λi|i).

Now we can prove a restricted case of the theorem in the question (restricted to irreducible DFAs; as an exercise generalize this proof to the whole theorem). Since DD is the transition matrix D|1D|1 is the vector of states reachable after reading any one character, D2|1D2|1 is the same for two characters, etc. Given a vector |x|x, A|xA|x is simply the sum of the components of |x|x that are accept states. Thus:

sL(n)=A|Dn|1=A|Dn(c1|λ1...cm|λm)=c1λn1A|λ1+...+cmλnmA|λm=A|λ1λ1|1λn1+...+A|λmλm|1λnm=p1λn1+...+pmλmm

sL(n)=A|Dn|1=A|Dn(c1|λ1...cm|λm)=c1λn1A|λ1+...+cmλnmA|λm=A|λ1λ1|1λn1+...+A|λmλm|1λnm=p1λn1+...+pmλmm

Now we know that for an irreducible m-state DFA, p1...pmp1...pm will be zero order polynomials (i.e. constants) that depends on the DFA and λ1...λmλ1...λm will be eigenvalues of the transition matrix.

Generality note

If you want to prove this theorem for arbitrary DFA, then you will need to look at the Schur decomposition of DD and then polynomials of non-zero degree will pop up because of the nilpotent terms. It is still enlightening to do this, since it will let you bound the max degree of the polynomials. You will also find a relationship between how complicated the polynomials are and how many λλs you will have.


Application to specific question

For your language LL we can select the DFA with transition matrix:

D=(0110)

D=(0110)

and accept vector:

A=(10)

A=(10)

Find the eigenvectors and their eigenvalues λ1=1λ1=1 with |λ1=12(11)|λ1=12(11) and λ2=1λ2=1 with |λ2=12(11)|λ2=12(11). We can use this to find p1=1/2p1=1/2 and p2=1/2p2=1/2. To give us:

sL(n)=12+12(1)n

sL(n)=12+12(1)n

Maybe post this here?
Raphael

@Raphael that was asked while I was figuring out the proof and typing up my answer, so I did not know about it when I asked.
Artem Kaznatcheev

6

Continuing Artem's answer, here is a proof of the general representation. As Artem shows, there is an integer matrix AA and two vectors x,yx,y such that sL(n)=xTAny.

sL(n)=xTAny.
(The vector xx is the characteristic vector of the start state, the vector yy is the characteristic vector of all accepting state, and AijAij is equal to the number of transitions from state ii to state jj in a DFA for the language.)

Jordan's theorem states that over the complex numbers, AA is similar to a matrix with blocks of one of the forms (λ),(λ10λ),(λ100λ100λ),(λ1000λ1000λ1000λ),

(λ),(λ01λ),λ001λ001λ,λ0001λ0001λ0001λ,
If λ0λ0, then the nnth powers of these blocks are (λn),(λnnλn10λn),(λnnλn1(n2)λn20λnnλn100λn),(λnnλn1(n2)λn2(n3)λn30λnnλn1(n2)λn200λnnλn1000λn),
(λn),(λn0nλn1λn),λn00nλn1λn0(n2)λn2nλn1λn,λn000nλn1λn00(n2)λn2nλn1λn0(n3)λn3(n2)λn2nλn1λn,
Here's how we got to these formulas: write the block as B=λ+NB=λ+N. Successive powers of NN are successive secondary diagonals of the matrix. Using the binomial theorem (using the fact that λλ commutes with NN), Bn=(λ+n)N=λn+nλn1N+(n2)λn2N2+.
Bn=(λ+n)N=λn+nλn1N+(n2)λn2N2+.
When λ=0λ=0, the block is nilpotent, and we get the following matrices (the notation [n=k][n=k] is 11 if n=kn=k and 00 otherwise): ([n=0]),([n=0][n=1]0[n=0]),([n=0][n=1][n=2]0[n=0][n=1]00[n=0]),([n=0][n=1][n=2][n=3]0[n=0][n=1][n=2]00[n=0][n=1]000[n=0])
([n=0]),([n=0]0[n=1][n=0]),[n=0]00[n=1][n=0]0[n=2][n=1][n=0],[n=0]000[n=1][n=0]00[n=2][n=1][n=0]0[n=3][n=2][n=1][n=0]

Summarizing, every entry in AnAn is either of the form (nk)λnk(nk)λnk or of the form [n=k][n=k], and we deduce that sL(n)=ipi(n)λi(n)+jcj[n=j],

sL(n)=ipi(n)λi(n)+jcj[n=j],
for some complex λi,cjλi,cj and complex polynomials pipi. In particular, for large enough nn, sL(n)=ipi(n)λi(n).
sL(n)=ipi(n)λi(n).

Thank you for the general treatment! You should consider combining your answer with mine and posting it as a full answer to this question. I think it would be more helpful than the current answer there.
Artem Kaznatcheev
আমাদের সাইট ব্যবহার করে, আপনি স্বীকার করেছেন যে আপনি আমাদের কুকি নীতি এবং গোপনীয়তা নীতিটি পড়েছেন এবং বুঝতে পেরেছেন ।
Licensed under cc by-sa 3.0 with attribution required.