当前位置:网站首页>Inclusion exclusion principle
Inclusion exclusion principle
2022-07-29 03:32:00 【AC__ dream】
set up S It's a finite set ,a1,a2,……,an yes n Nature
remember N(ai) by S There is ai Number of elements of property . special , remember N(1)=|S|.
remember N(1-ai) by S There is no ai Number of elements of property .
N(aj1,aj2,……,ajk) by S At the same time aj1,aj2,……,ajk Number of elements of property
remember N(a+b)=N(a)+N(b) N(a-b)=N(a)-N(b)
Then the principle of inclusion and exclusion can be written as :

When it is not particularly easy to solve a problem directly, we can consider its opposite , Then we use the principle of inclusion and exclusion to solve , It often makes the problem simple .
边栏推荐
- Functions and comparison of repeaters, hubs, bridges, switches and routers
- HDU多校第二场 1011 DOS Card
- Rdkit: introduce smiles code, smart code and Morgan fingerprint (ECFP)
- 【科技1】
- NXP i.mx8mp-deepviewrt
- 复现20字符短域名绕过以及xss相关知识点
- Build redis environment under windows and Linux
- Simple understanding of CDN, SDN and QoS
- 1.6 example: cifar-10 classification
- JS regular expression finds the number of times a character (string) appears (one line of code)
猜你喜欢

(codeforce547)C-Mike and Foam(质因子+容斥原理)

Bingbing learning notes: operator overloading -- implementation of date class

exness:鸽派决议帮助黄金反弹,焦点转向美国GDP

暴力递归到动态规划 01 (机器人移动)

CUDA GDB prompt: /tmp/tmpxft**** cudafe1.stub. c: No such file or directory.

Violence recursion to dynamic programming 01 (robot movement)

Realize multi-level linkage through recursion

数字孪生实际应用案例-智慧能源篇

今晚7:30 | 连界、将门、百度、碧桂园创投四位大佬眼中的AI世界,是继续高深还是回归商业本质?...

ROS-Errror:Did you forget to specify generate_ messages(DEPENDENCIES ...)?
随机推荐
Matlab learning - accumulation of small knowledge points
机器学习【Numpy】
Flask creation process day05-06 creation project
深入C语言(1)——操作符与表达式
如何判定是stun协议
Rdkit II: use rdkit screening to screen 2D pharmacophores of chemical small molecules
Principle knowledge is useful
通过递归实现多级联动
Pp-yoloe details
A case of gradually analyzing the splitting of classes -- colorful ball collisions
Introduction and advanced MySQL (XIV)
3.2 model saving and loading
Summary of basic knowledge points of C language
【科技1】
How to realize multi line annotation in MATLAB
ROS-Errror:Did you forget to specify generate_ messages(DEPENDENCIES ...)?
复现20字符短域名绕过以及xss相关知识点
Three military product baselines (functional baseline, distribution baseline, product baseline) and the documents contained in the baseline
后缀自动机(sam)板子 from jly
three. JS Part 54 how to pass structure array to shader