当前位置:网站首页>容斥原理
容斥原理
2022-07-29 03:28:00 【AC__dream】
设S是一个有限集,a1,a2,……,an是n种性质
记N(ai)为S中有ai性质的元素的数量。特殊的,记N(1)=|S|。
记N(1-ai)为S中没有ai性质的元素的数量。
N(aj1,aj2,……,ajk)为S中同时有aj1,aj2,……,ajk性质的元素的数量
记N(a+b)=N(a)+N(b) N(a-b)=N(a)-N(b)
则容斥原理可以写成:

当直接求一个问题不是特别容易的时候我们可以考虑他的对立面,然后利用容斥原理来求解,往往会使得问题变得简单。
边栏推荐
- Easy to use remote sensing data set download website~~~
- Regular expression bypasses WAF
- AI platform, AI midrange architecture
- Practical application cases of digital Twins - smart energy
- Code speed optimization
- "PHP Basics" output approximate value of PI
- xxxxx
- [technology 1]
- 军品技术文件划分及说明
- Division and description of military technical documents
猜你喜欢

How to deploy sentinel cluster of redis

Machine learning based on deepchem

Configure vscade to realize ROS writing

【C】 Array

3D高级渲染器:Artlantis studio 2021.2中文版

Learn more than 4000 words, understand the problem of this pointing in JS, and handwrite to realize call, apply and bind

Let's talk about the summary of single merchant function modules

深入C语言(1)——操作符与表达式

最新二开版漫画小说听书三合一完整源码/整合免签接口/搭建教程/带采集接口

Rdkit I: using rdkit to screen the structural characteristics of chemical small molecules
随机推荐
1.6 example: cifar-10 classification
2 neural network toolbox NN
Redis之sentinel哨兵集群怎么部署
力扣刷题之数组序号计算(每日一题7/28)
Simple code implementation of decision tree
How to deploy sentinel cluster of redis
MYCAT read / write separation configuration
3D advanced renderer: artlandis studio 2021.2 Chinese version
[technology 1]
STC单片机驱动1.8‘TFT SPI屏幕演示示例(含资料包)
Makefile details
Build redis environment under windows and Linux
VISO fast rendering convolution block
Sleuth+Zipkin 来进行分布式服务链路的追踪
Precautions for using latex
for_ Example of each usage
深入C语言(3)—— C的输入输出流
美联储再加息,75基点 鲍威尔“放鸽”,美股狂欢
Server operation management system
Naive Bayes -- continuous data