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

当直接求一个问题不是特别容易的时候我们可以考虑他的对立面,然后利用容斥原理来求解,往往会使得问题变得简单。
边栏推荐
- Use of leak scanning (vulnerability scanning) tool burpsuite or burp Suite (with installation and installation package download of burpsuite+1.7.26)
- 力扣刷题之分数加减运算(每日一题7/27)
- Design of smoke temperature, humidity and formaldehyde monitoring based on single chip microcomputer
- Practical guidance for interface automation testing (Part I): what preparations should be made for interface automation
- Build redis environment under windows and Linux
- Bingbing learning notes: operator overloading -- implementation of date class
- What is eplato cast by Plato farm on elephant swap? Why is there a high premium?
- [technology 1]
- 力扣刷题之数组序号计算(每日一题7/28)
- Shell script summary
猜你喜欢

Producer consumer model of concurrent model

复现20字符短域名绕过以及xss相关知识点

Tonight at 7:30 | is the AI world in the eyes of Lianjie, Jiangmen, Baidu and country garden venture capital continue to be advanced or return to the essence of business

深入C语言(1)——操作符与表达式
![MOS管 —— 快速复苏应用笔记(贰)[参数与应用]](/img/54/eb040a51304192def8cfb360c7c213.png)
MOS管 —— 快速复苏应用笔记(贰)[参数与应用]

Idea configuration web container and war packaging

简历竟然敢写精通并发编程,那你说说AQS为什么要用双向链表?

The Federal Reserve raised interest rates again, Powell "let go of doves" at 75 basis points, and US stocks reveled

July 28, 2022 Gu Yujia's study notes

Realize multi-level linkage through recursion
随机推荐
Idea configuration web container and war packaging
web-uploader不能多文件上传
Server operation management system
Digital image processing Chapter 10 - image segmentation
Shell script summary
mysql的timestamp存在的时区问题怎么解决
Complexity analysis learning
GJB常见混淆概念
Example analysis of while, repeat and loop loops in MySQL process control
Simple understanding of CDN, SDN and QoS
GJB common confused concepts
Whole process record of yolov3 target detection
简历竟然敢写精通并发编程,那你说说AQS为什么要用双向链表?
力扣刷题之数组序号计算(每日一题7/28)
腾讯云使用pem登录
July 28, 2022 Gu Yujia's study notes
最新二开版漫画小说听书三合一完整源码/整合免签接口/搭建教程/带采集接口
Understanding of p-type problems, NP problems, NPC problems, and NP hard problems in natural computing
Environment configuration stepping pit during colab use
Rdkit I: using rdkit to screen the structural characteristics of chemical small molecules