当前位置:网站首页>容斥原理
容斥原理
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)
则容斥原理可以写成:

当直接求一个问题不是特别容易的时候我们可以考虑他的对立面,然后利用容斥原理来求解,往往会使得问题变得简单。
边栏推荐
- Practical application cases of digital Twins - smart energy
- Use of leak scanning (vulnerability scanning) tool burpsuite or burp Suite (with installation and installation package download of burpsuite+1.7.26)
- How to solve the time zone problem in MySQL timestamp
- 3D advanced renderer: artlandis studio 2021.2 Chinese version
- Does domestic ERP have a chance to beat sap?
- 深入C语言(4)——switch的定义与使用
- During the year, the first "three consecutive falls" of No. 95 gasoline returned to the "8 Yuan era"“
- How to deploy sentinel cluster of redis
- The difference between int and integer. Is int or integer used in practical applications?
- Summary of SAP localized content in China
猜你喜欢

for_each用法示例

Example analysis of while, repeat and loop loops in MySQL process control

Implement Lmax disruptor queue from scratch (VI) analysis of the principle of disruptor solving pseudo sharing and consumers' elegant stopping

Pp-yoloe details
![Machine learning [numpy]](/img/6b/3e7f08c5d379ce35687e4f14545929.png)
Machine learning [numpy]

How to deploy sentinel cluster of redis

Digital image processing Chapter 10 - image segmentation

How does DataGrid export and recover the entire database data, using a single SQL file

Use of leak scanning (vulnerability scanning) tool burpsuite or burp Suite (with installation and installation package download of burpsuite+1.7.26)

NXP i.mx8mp-deepviewrt
随机推荐
What is eplato cast by Plato farm on elephant swap? Why is there a high premium?
Rdkit: introduce smiles code, smart code and Morgan fingerprint (ECFP)
Environment configuration stepping pit during colab use
Use of leak scanning (vulnerability scanning) tool burpsuite or burp Suite (with installation and installation package download of burpsuite+1.7.26)
简历竟然敢写精通并发编程,那你说说AQS为什么要用双向链表?
A case of gradually analyzing the splitting of classes -- colorful ball collisions
C language programming | exchange binary odd and even bits (macro Implementation)
Leetcode 1331 array sequence number conversion [map] the leetcode path of heroding
Web uploader cannot upload multiple files
Precautions for using latex
Shortcut key for adjusting terminal size in ROS
Introduction and advanced level of MySQL (12)
Alibaba Sentinel - workflow and principle analysis
Asynchronous callback future mode of concurrent mode
Understanding of p-type problems, NP problems, NPC problems, and NP hard problems in natural computing
Sanzi chess (player + computer)
基于单片机烟雾温湿度甲醛监测设计
机器学习【Numpy】
数字孪生实际应用案例-智慧能源篇
The difference between /g /m /i of JS regular expressions