狄利克雷卷积总结

狄利克雷卷积

约定

  n = p 1 a 1 p 2 a 2 ⋯ p r a r \ n=p_{1}^{a_{1}} p_{2}^{a_{2}} \cdots p_{r}^{a_{r}}  n=p1a1p2a2prar

  a ∣ b \ a \mid b  ab   a \ a  a整除   b \ b  b

  a ∤ b \ a \nmid b  ab   a \ a  a不整除   b \ b  b

  a k ∥ b \ a^{k} \parallel b  akb   a k ∣ b \ a^{k} \mid b  akb   a k + 1 ∤ b \ a^{k+1} \nmid b  ak+1b

  ( a , b ) \ (a,b)  (a,b)最大公约数

  [ a , b ] \ [a,b]  [a,b]最小公倍数

定义

h ( n ) = ∑ d ∣ n f ( n ) g ( n d ) = ∑ d 1 d 2 = n f ( d 1 ) g ( d 2 ) h(n)= \sum_{d \mid n} f(n) g(\frac{n}{d})=\sum_{d_{1} d_{2} =n} f(d_{1})g(d_{2}) h(n)=dnf(n)g(dn)=d1d2=nf(d1)g(d2)

也可写作:

h = f ∘ g h=f \circ g h=fg

这相当于一种运算。

性质

结合律

( f ∘ g ) ∘ h = f ∘ ( g ∘ h ) (f \circ g) \circ h=f \circ(g \circ h) (fg)h=f(gh)

证明

        ( f ∘ g ) ∘ h = ∑ d 1 ∣ n { ∑ d 2 ∣ d 1 f ( d 2 ) g ( d 1 d 2 ) } g ( n d 1 )   = ∑ d 1 d 2 d 3 = n ( f ( d 1 ) g ( d 2 ) ) g ( d 3 )   = ∑ d 1 d 2 d 3 = n f ( d 1 ) ( g ( d 2 ) g ( d 3 ) )   = f ∘ ( g ∘ h )   \begin{array}{crl} & &\,\,\,\,\,\,\,(f \circ g) \circ h\\& &=\sum_{d_{1} \mid n}\{ \sum_{d_{2} \mid d_{1}}f(d_{2})g(\frac{d_{1}}{d_{2}})\} g(\frac{n}{d_{1}}) \\\,\\ & &=\sum_{d_{1} d_{2} d_{3}= n} (f(d_{1})g(d_{2}))g(d_{3}) \\\,\\ & &=\sum_{d_{1} d_{2} d_{3}= n} f(d_{1})(g(d_{2})g(d_{3}))\\\,\\ & &=f \circ(g \circ h)\\\,\\ \end{array} (fg)h=d1n{ d2d1f(d2)g(d2d1)}g(d1n)=d1d2d3=n(f(d1)g(d2))g(d3)=d1d2d3=nf(d1)(g(d2)g(d3))=f(gh)
证毕

交换律

f ∘ g = g ∘ f f \circ g=g \circ f fg=gf

证明

f ∘ g = ∑ d 1 d 2 = n f ( d 1 ) g ( d 2 ) = ∑ d 1 d 2 = n g ( d 1 ) f ( d 2 ) = g ∘ f f \circ g=\sum_{d_{1} d_{2} =n} f(d_{1})g(d_{2})=\sum_{d_{1} d_{2} =n} g(d_{1})f(d_{2})=g \circ f fg=d1d2=nf(d1)g(d2)=d1d2=ng(d1)f(d2)=gf

证毕

逆元

对于   f \ f  f存在   g \ g  g使
f ∘ g = ϵ ( n ) f \circ g = \epsilon(n) fg=ϵ(n)
其中
ϵ ( n ) = [ n = 1 ] \epsilon(n)= [n=1] ϵ(n)=[n=1]
证明

g ( n ) = 1 f ( 1 ) ( [ n = 1 ] − ∑ i ∣ n , i ≠ n f ( i ) g ( n i ) ) g(n)=\frac{1}{f(1)} \left( \left[ n=1 \right] - \sum_{i \mid n,i \neq n}f(i) g(\frac{n}{i}) \right) g(n)=f(1)1[n=1]in,i̸=nf(i)g(in)

如此一来

∑ d ∣ n f ( d ) g ( n d ) = f ( 1 ) g ( n ) − ∑ d ∣ n , d ≠ 1 f ( d ) g ( n d ) = [ n = 1 ] \sum_{d \mid n}f(d)g(\frac{n}{d})=f(1)g(n)-\sum_{d \mid n,d \neq 1}f(d)g(\frac{n}{d})=\left[ n=1 \right] dnf(d)g(dn)=f(1)g(n)dn,d̸=1f(d)g(dn)=[n=1]

证毕

分配率

f ∘ ( g + h ) = f ∘ g + f ∘ h f \circ (g + h)=f \circ g+f \circ h f(g+h)=fg+fh

证明

f ∘ ( g + h ) = ∑ d 1 d 2 = n f ( d 1 ) ( g ( d 2 ) + h ( d 2 ) ) = ∑ d 1 d 2 = n f ( d 1 ) g ( d 2 ) + ∑ d 1 d 2 = n f ( d 1 ) h ( d 2 ) = f ∘ g + f ∘ h f \circ (g + h)=\sum_{d_{1} d_{2} =n} f(d_{1})(g(d_{2})+h(d_{2}))=\sum_{d_{1} d_{2} =n} f(d_{1})g(d_{2})+\sum_{d_{1} d_{2} =n} f(d_{1})h(d_{2})=f \circ g+f \circ h f(g+h)=d1d2=nf(d1)(g(d2)+h(d2))=d1d2=nf(d1)g(d2)+d1d2=nf(d1)h(d2)=fg+fh

数乘结合律

( s ⋅ f ) ∘ g = s ⋅ ( f ∘ g ) (s \cdot f) \circ g=s \cdot (f \circ g) (sf)g=s(fg)

证明

( s ⋅ f ) ∘ g = ∑ d 1 d 2 = n ( s ⋅ f ( d 1 ) ) g ( d 2 ) = s ∑ d 1 d 2 = n f ( d 1 ) g ( d 2 ) (s \cdot f) \circ g=\sum_{d_{1} d_{2} =n} (s\cdot f(d_{1}))g(d_{2})=s\sum_{d_{1} d_{2} =n}f(d_{1})g(d_{2}) (sf)g=d1d2=n(sf(d1))g(d2)=sd1d2=nf(d1)g(d2)

证毕

积性的传递性

  f ( n ) , g ( n ) \ f(n),g(n)  f(n),g(n)为积性   h = f ∘ g \ h=f \circ g  h=fg也是积性的

        h ( n m )   = ∑ d ∣ n m f ( d ) g ( n m d )   = ∑ a ∣ n , b ∣ m f ( a b ) g ( n m a b )   = ∑ a ∣ n , b ∣ m f ( a ) g ( n a ) f ( b ) g ( m b )   = { ∑ a ∣ n f ( a ) g ( n a ) } { ∑ b ∣ m f ( b ) g ( m b ) }   = h ( n ) h ( m ) \begin{array}{rcl} & &\,\,\,\,\,\,\,h(nm)\\\,\\ & &=\sum_{d \mid nm} f(d) g(\frac{nm}{d}) \\\,\\ & &=\sum_{a \mid n,b \mid m} f(ab)g(\frac{nm}{ab}) \\\,\\ & &=\sum_{a \mid n,b \mid m} f(a)g(\frac{n}{a}) f(b)g(\frac{m}{b}) \\\,\\ & &=\{ \sum_{a \mid n} f(a)g(\frac{n}{a}) \}\{ \sum_{b \mid m} f(b)g(\frac{m}{b}) \} \\\,\\ & &=h(n)h(m) \end{array} h(nm)=dnmf(d)g(dnm)=an,bmf(ab)g(abnm)=an,bmf(a)g(an)f(b)g(bm)={ anf(a)g(an)}{ bmf(b)g(bm)}=h(n)h(m)

证毕

  f \ f  f积性则   f − 1 \ f^{-1}  f1积性

证明

  n m > 1 \ nm>1  nm>1时有   n ′ m ′ < n m , g ( n ′ m ′ ) = g ( n ′ ) g ( m ′ ) \ n'm' < nm,g(n'm')=g(n')g(m')  nm<nm,g(nm)=g(n)g(m)成立
  f ( n ) \ f(n)  f(n)的逆元   g ( n ) = 1 f ( 1 ) ( [ n = 1 ] − ∑ i ∣ n , i ≠ n f ( i ) g ( n i ) ) \ g(n)=\frac{1}{f(1)} \left( \left[ n=1 \right] - \sum_{i \mid n,i \neq n}f(i) g(\frac{n}{i}) \right)  g(n)=f(1)1([n=1]in,i̸=nf(i)g(in))
        g ( n m )   = − ∑ d ∣ n m , d ≠ 1 f ( d ) g ( n m d )   = − ∑ a ∣ n , b ∣ m , a b ≠ 1 f ( a b ) g ( n m a b )   = f ( 1 ) f ( 1 ) g ( n ) g ( m ) − ∑ a ∣ n , b ∣ m , a b ≠ 1 f ( a ) f ( b ) g ( n a ) g ( m b )   = g ( n ) g ( m ) − { ∑ a ∣ n , a ≠ 1 f ( a ) g ( n a ) } { ∑ b ∣ m , b ≠ 1 f ( b ) g ( m b ) }   = g ( n ) g ( m ) − ϵ ( n ) ϵ ( m )   = g ( n ) g ( m ) \begin{array}{rcl} & &\,\,\,\,\,\,\,g(nm) \\\,\\ & &=- \sum_{d \mid nm,d \neq 1}f(d)g(\frac{nm}{d}) \\\,\\ & &=- \sum_{a \mid n,b \mid m,ab \neq 1} f(ab) g(\frac{nm}{ab}) \\\,\\ & &=f(1)f(1)g(n)g(m)- \sum_{a \mid n,b \mid m,ab \neq 1} f(a) f(b) g(\frac{n}{a}) g(\frac{m}{b}) \\\,\\ & &=g(n)g(m)- \{ \sum_{a \mid n,a \neq 1} f(a) g(\frac{n}{a}) \} \{ \sum_{b \mid m,b \neq 1} f(b) g(\frac{m}{b}) \}\\\,\\ & &=g(n)g(m)-\epsilon(n) \epsilon(m) \\\,\\ & &=g(n)g(m) \end{array} g(nm)=dnm,d̸=1f(d)g(dnm)=an,bm,ab̸=1f(ab)g(abnm)=f(1)f(1)g(n)g(m)an,bm,ab̸=1f(a)f(b)g(an)g(bm)=g(n)g(m){ an,a̸=1f(a)g(an)}{ bm,b̸=1f(b)g(bm)}=g(n)g(m)ϵ(n)ϵ(m)=g(n)g(m)

证毕

应用

我们总可以证明求一个狄利克雷卷积的复杂度是   O ( n ln ⁡ n ) \ O(n \ln n)  O(nlnn)的。

你可能感兴趣的:(数学,数论,狄利克雷卷积)