莫比乌斯反演

莫比乌斯反演入门讲解 莫比乌斯反演实际上是一两个公式定理的运用,自认为想要掌握它的话,其中的证明还是有必要了解的。看过网上一些博客,感觉都只证明了一半,没看到有人将这个定理完全证明出来。然而我最近在正好在学习初等数论,发现完全证明这个定理实际上并不需要很多知识,特此填坑。另外加上一些应用以构成完整的讲解。 实际上,这个定理的证明用到了一点数论函数相关知识。前置技能在此 https://blog.youkuaiyun.com/t... 阅读详情

Let ω(n)\omega(n)ω(n) be the fundementally different prime factors of n∈Nn\in\Nn∈N,Examples: ω(1)=0,ω(4)=1,ω(6)=2\text{Examples: }\omega(1)=0,\omega(4)=1,\omega(6)=2Examples: ω(1)=0,ω(4)=1,ω(6)=2。
Prove that∑d∣ng(d)μ(nd)=f(n)⇔∑d∣nf(d)=g(n),where μ(n)={0,∃p∈P,p2∣n;(−1)ω(n),otherwise. \text{Prove that} \sum_{d|n}g(d)\mu(\frac n d)=f(n)\Leftrightarrow \sum_{d|n}f(d)=g(n),\\ \text{where }\mu(n)=\begin{cases} 0,\exist p\in \mathbb{P},p^2|n;\\(-1)^{\omega(n)},\text{otherwise.} \end{cases} Prove thatd∣n∑​g(d)μ(dn​)=f(n)⇔d∣n∑​f(d)=g(n),where μ(n)={0,∃p∈P,p2∣n;(−1)ω(n),otherwise.​
Of course, d,n,p∈Nd,n,p\in \Nd,n,p∈N,
Also, if you don’t know, P\mathbb{P}P is the set of all prime numbers.

中文版

令 ω(n)\omega(n)ω(n) 为 n∈Nn\in\Nn∈N 本质不同的质因子数量,例子: ω(1)=0,ω(4)=1,ω(6)=2\text{例子: }\omega(1)=0,\omega(4)=1,\omega(6)=2例子: ω(1)=0,ω(4)=1,ω(6)=2。
求证:∑d∣ng(d)μ(nd)=f(n)⇔∑d∣nf(d)=g(n),其中 μ(n)={0,∃p∈P,p2∣n;(−1)ω(n),其他情况. \text{求证:} \sum_{d|n}g(d)\mu(\frac n d)=f(n)\Leftrightarrow \sum_{d|n}f(d)=g(n),\\ \text{其中 }\mu(n)=\begin{cases} 0,\exist p\in \mathbb{P},p^2|n;\\(-1)^{\omega(n)},\text{其他情况.} \end{cases} 求证:d∣n∑​g(d)μ(dn​)=f(n)⇔d∣n∑​f(d)=g(n),其中 μ(n)={0,∃p∈P,p2∣n;(−1)ω(n),其他情况.​
另外, d,n,p∈Nd,n,p\in \Nd,n,p∈N,
以防万一,P\mathbb{P}P 是素数集。

证明

两边同卷即可(1,μ1,\mu1,μ 为卷积下的逆元)

不止是回退SDK:深入解读UE5.2编译时那个烦人的C4756警告与INFINITY宏的变迁 本文深入解析了UE5.2源码编译时出现的C4756警告及其背后的技术原因,探讨了Windows SDK中INFINITY宏的变迁对Unreal Engine的影响。文章详细介绍了微软修改INFINITY定义的技术考量,并提供了UE5.2应对此类问题的灵活解决方案,包括通过BuildConfiguration.xml文件精确控制工具链版本,确保构建系统的可重复性和可配置性。 阅读详情

相关推荐

保姆级教程:在K230开发板上为张大头步进电机实现位置、速度、回零全功能控制

本文提供了一份详细的K230开发板与张大头步进电机的控制教程,涵盖硬件连接、协议解析、模块化代码实现及实战案例。通过位置、速度和回零功能的全面讲解,帮助开发者快速掌握步进电机的高级控制技术,适用于自动化、机器人等应用场景。

weixin_42629671的博客 710

莫比乌斯函数、莫比乌斯反演

莫比乌斯函数 在学习这个函数之前,最好先了解欧拉函数 莫比乌斯函数:数论函数,由德国数学家和天文学家莫比乌斯(Möbius ,1790–1868)提出。梅滕斯(Mertens)首先使用μ(n)作为莫比乌斯函数的记号。而据说,高斯(Gauss)比莫比乌斯早三十年就曾考虑过这个函数。莫比乌斯函数在数论中有着广泛应用。 莫比乌斯函数完整定义的通俗表达: 1)莫比乌斯函数μ(n)的定义域是N 2)μ(1)=1 3)当n存在平方因子时,μ(n)=0 4)当n是素数或奇数个不同素数之积时,μ(n)= -1 5)当n

blaze003003的博客 9231

ADS仿真功率放大器实例学习笔记

ADS仿真功率放大器实例学习笔记

qq_36521926的博客 1万+

【数论】莫比乌斯反演

莫比乌斯反演是数论重要工具,通过莫比乌斯函数实现求和变换,常用于GCD计数等问题,结合线性筛与数论分块可高效求解。

zhangmohan123321的博客 1226

Windows11安装UE4+Airsim

Windows11安装UE4+Airsim

Legendyyy的博客 3743

从飞机翼型仿真到燃烧模拟:Fluent多物理场耦合的3种实战策略

本文深入探讨了Fluent在多物理场耦合仿真中的三种实战策略,涵盖可压缩流动与燃烧耦合、湍流模型选择及网格策略,以及顺序耦合、强耦合和混合耦合方法。通过具体案例和工程实践,帮助中高级用户提升仿真精度和效率,适用于航空航天和能源化工等领域。

aa123的博客 994

数论-莫比乌斯反演

1.这可能是数论里面比较难的一个地方,但是我觉得只要你认真把这篇博客读完,就会有新的认识。 2.首先,我是凭借这自己的理解写下了这篇博客,疏漏之处还请各位julao指出来。嗯,那么我要开始了。 3.说道莫比乌斯反演,我们就不得不说一个东西:狄利克雷卷积。什么叫做卷积?这是一个问题,其实卷积就是一种求和(个人观点)再概率论中,也有卷积公式。我觉得和这里的卷积是一个意思,只不过概率论中是积分,也就...

YG爱木木 4362

【信号与系统】Multisim 仿真信号合成与分解

软件 Multisim 进行方波信号的产生、分解和合成,观察信号波形的分解与合成,加深对信号频谱的理解。

AXYZdong的博客 2万+

莫比乌斯反演总结

一.莫比乌斯反演基础 1.莫比乌斯函数 定义: μ(x):μ(x):\mu(x): 若x为1,则μ(x)=1若x为1,则μ(x)=1若x为1,则\mu(x)=1; 若x=p1p2p3p4...pk,即每一项的指数都不超过1,那么μ(x)=(−1)k若x=p1p2p3p4...pk,即每一项的指数都不超过1,那么μ(x)=(−1)k若x=p_1p_2p_3p_4...p_k,即每一项的指数...

G20202502的博客 2259

【无人机项目实战】第三章:fast_planner工程解读(附C++代码)

系列文章目录 提示:这里可以添加系列文章的所有文章的目录,目录需要自己手动添加 TODO:写完再整理 文章目录系列文章目录前言一、规划系统运行逻辑【业务部分】1.Fast_planner_node.cpp【程序入口】功能代码实现2.kino_replan_fsm.cpp【状态机转移】功能代码实现KinoReplanFSM::init()函数订阅目标点回调函数订阅里程计回调函数检查路径规划是否成功【重要】执行状态机FSM定时器回调函数【重要】判断目标点是否有障碍物或者是轨迹执行过程中是否有障碍物的回调函数3

qq_35635374的博客 1万+

【PINN物理信息网络】基于PINN物理信息网络结合Wave 2D有限差分方法(python)

【PINN物理信息网络】基于PINN物理信息网络结合Wave 2D有限差分方法(python)

k8291121的博客 1818

莫比乌斯反演入门

这个算是竞赛中用到的组合数学里最多的知识点,也是比较难理解的,在被将近一个星期的折磨后总算是理解了一些。 其实莫比乌斯反演就只有两个重要的公式,而且用到的最多的也只有一个(其实都差不多),但是需要一些预备知识。 莫比乌斯函数,质数线性筛,整除分块,积性函数以及一些其他的数论知识,下面会将其中一部分重要的算法, 目录 1.莫比乌斯函数 2.莫比乌斯函数的线性筛 3.整除分块 4....

mumei的博客 1229

华为OD机试新系统真题-魔法咒语组合(Java/Py/C++/Go/C/Js)

华为OD机试 新系统真题【魔法咒语组合】,提供C语言、Java、C++、Python、Go、JavaScript源码实现,并提供完整思路讲解,以及在线OJ模拟做题。华为OD机试真题【魔法咒语组合】多语言题解

qq_45776114的博客 667

莫比乌斯函数与莫比乌斯反演

以下笔记整理自:《算法设计编程实验》吴永辉 1.结论 1.1 莫比乌斯函数:莫比乌斯函数可以看做一个辅助函数,它在莫比乌斯反演公式中用到。 1.2 莫比乌斯反演:莫比乌斯反演公式是 根据和函数来求算数函数的一个公式。 1.3 算数函数:所有在正整数上运算的函数称为算数函数。 1.4 和函数:设 f 是算数函数,f 的和函数为。其中d为n的约数,所以 f 的和函数F(n)就是n的所有约数的...

帅比王的博客 1097

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

浅谈算法——莫比乌斯反演

前言 莫比乌斯反演(又称懵逼钨丝繁衍),那种让人看了就懵逼的东西(其实是我太菜了) 莫比乌斯反演在知道之后对解题十分有帮助,\(O(n)\)的柿子分分钟化成\(O(\sqrt n)\) 那么,什么是莫比乌斯反演呢? 莫比乌斯反演 1.莫比乌斯反演 如果说,有\(f(n)\)和\(g(n)\)是定义在正整数集合上的两个函数,并且满足 \[f(n)=\sum\limits_{d|n} g(d...

a5163273的博客 802

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

【数论】(莫比乌斯反演)关于莫比乌斯反演的小结

课件来源:莫比乌斯反演课件本博客是我本人对课件的一些理解,如果看不懂课件或许可以参考本博客。 注:我学完后并不觉得和bilibili2017拜年祭里面神奇的莫比乌斯环有什么关系。。 首先,要了解一个叫莫比乌斯函数的东西。 设一个函数参考下面的例子如果我们要求f的值,就可以进行如下操作为了方便运算,我们希望得到一个f(i)的表达式,于是就引入了莫比乌斯函数μ (别和cch学读作“u”) 换言

氧化钠的博客 747

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

【莫比乌斯反演】莫比乌斯反演入门及推导

参考于http://www.cnblogs.com/chenyang920/p/4811995.html 改成更容易理解的一个格式吧。 这个文章主要ACM中的莫比乌斯反演公式,自己看《组合数学》很难,又很少博客写这些内容,所以chenyang920就写了一篇这样的文章 就自己想了种证明方法,觉得比《组合数学》的证明简单些,就写一下,希望对初学莫比乌斯反演的同学有帮助。 PS:下面公式出现

正汰的学习笔记 1417
上一篇: [USACO24DEC] Deforestation S(包括正确性证明)
下一篇: FFT快速傅里叶变换(多项式乘法)
peter_code
博客等级 码龄5年 41粉丝 22原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值