常规语言的字数


17

根据维基百科,对于任何正则语言存在常数和多项式,使得对于每数长度的字的在满足方程Lλ1,,λkp1(x),,pk(x)nsL(n)nL

sL(n)=p1(n)λ1n++pk(n)λkn

语言是常规语言(与之匹配)。如果n为偶数,则,否则为。L={02nnN}(00)sL(n)=1sL(n)=0

但是,我找不到和(上面已经存在)。由于必须是可微的并且不是常数,所以它必须以某种方式像波浪一样,而且我看不到如何用多项式和指数函数来做到这一点,而不必以无穷大的求和数结束,例如泰勒展开式 谁能启发我?λipisL(n)


你知道这个定理的名字吗?
Artem Kaznatcheev'4

@ArtemKaznatcheev:不,不知道。不幸的是,维基百科也没有提供参考:(
亚历克斯·十·布林克2012年

Answers:


14

对于你的语言,则可以采取λ 0 = 1p 1X = 1 / 2λ 1 = - 1,和p X = λ = 0> 1?维基百科上的文章没有说系数是正数还是整数。我选择的总和是p0(x)=1/2λ0=1p1(x)=1/2λ1=1pi(x)=λi=0i>1

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

对于偶数似乎为1 ,对于奇数n为0 。确实,归纳证明似乎很简单。nn


是的,当然,我忘记了交替的减号。一天结束后会投票支持-我达到了投票上限。
亚历克斯十布林克

该声明无需归纳。
拉斐尔

@Raphael是的,不过话又说回来,这只会使我的断言更加准确。
Patrick87

11

@ Patrick87为您的特定情况提供了一个很好的答案,我想我会给您一个提示,在可以用不可约的DFA表示的任何语言L的更一般情况下,如何找到从任何状态进入任何状态)。请注意,您的语言是这种类型的。sL(n)L


不可约DFA的定理证明

m态 DFA 的转移矩阵,因为它是不可约的,所以该矩阵是正常的并且具有完整的本征基| λ 1| λ 。让| 一个是接受载体:即| 是1,如果是接受状态,和否则为0。WLOG假定 | 1 是初始状态,因为我们有一个完整的eigenbasis,我们知道| 1 = c ^ 1 |Dm|λ1...|λm|Ai|Ai|1对于一些系数 Ç 1Ç (注意, c ^ = λ |)。|1=c1|λ1+...+cm|λmc1...cmci=λi|i

现在我们可以证明问题中定理的一个受限情况(仅限于不可约的DFA;作为练习,将此证明推广到整个定理)。由于是转移矩阵D | 1 为状态的向量读取任何一个字符之后到达,d 2 | 1 是两个字符是相同的,等给定一个向量| X 一个| X 根本的组成部分的总和| X 是接受状态。从而:DD|1D2|1|xA|x|x

sL(n)=A|Dn|1=A|Dn(c1|λ1...cm|λm)=c1λ1nA|λ1+...+cmλmnA|λm=A|λ1λ1|1λ1n+...+A|λmλm|1λmn=p1λ1n+...+pmλmm

Now we know that for an irreducible m-state DFA, p1...pm will be zero order polynomials (i.e. constants) that depends on the DFA and λ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 D 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 L we can select the DFA with transition matrix:

D=(0110)

and accept vector:

A=(10)

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

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 A and two vectors x,y such that

sL(n)=xTAny.
(The vector x is the characteristic vector of the start state, the vector y is the characteristic vector of all accepting state, and Aij is equal to the number of transitions from state i to state j in a DFA for the language.)

Jordan's theorem states that over the complex numbers, A is similar to a matrix with blocks of one of the forms

(λ),(λ10λ),(λ100λ100λ),(λ1000λ1000λ1000λ),
If λ0, then the nth 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),
Here's how we got to these formulas: write the block as B=λ+N. Successive powers of N are successive secondary diagonals of the matrix. Using the binomial theorem (using the fact that λ commutes with N),
Bn=(λ+n)N=λn+nλn1N+(n2)λn2N2+.
When λ=0, the block is nilpotent, and we get the following matrices (the notation [n=k] is 1 if n=k and 0 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])

Summarizing, every entry in An is either of the form (nk)λnk or of the form [n=k], and we deduce that

sL(n)=ipi(n)λi(n)+jcj[n=j],
for some complex λi,cj and complex polynomials pi. In particular, for large enough 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
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.