組合數學 容斥原理 學習筆記 (福利向)和Leo一起做愛數學的好孩子(未完待續
演算法競賽考得很多的部分啊
這個還是很重要的
在目前的演算法競賽中有三大計數考點
1)組合計數
2)線性計數
3)群論計數
其中群論計數比較困難,我又不知道什麼是線性計數,所以只能頹組合計數。
首先是最簡單的東西
加法原理
若完成一件事的方法有類,其中第類方法包含種不同的方法, 且這些方法互不重合,則完成這件事共有種不同的方法
乘法原理
若完成一件事需要個步驟,其中第個步驟包含種不同的方法, 且這些步驟互不干擾,則完成這件事共有種不同的方法
這些是稍有常識的OI小學生都會的東西
接著是組合數和排列數
組合數
In mathematics, a combination is a selection of items from a collection, such that (unlike permutations) the order of selection does not matter. For example, given three fruits, say an apple, an orange and a pear, there are three combinations of two that can be drawn from this set: an apple and a pear; an apple and an orange; or a pear and an orange. More formally, a -combination of a set is a subset of distinct elements of . If the set has n elements, the number of -combinations is equal to the binomial coefficient
摘自wiki
從個不同元素中取出個組成一個集合(不考慮順序),產生的 不同的集合數量為
這個存在是一個二項式係數的東西
觀察上式可知展開是存在一個規律的這實際上也是高考知識點
總結一下 這是二項式的一個簡單形式(實際上還有牛頓的二項式定理)
這個時候偉大的數學家楊輝和帕斯卡先生先後獨立發現了一個神奇的三角形
這個三角形有幾個好性質
1)每一個數都是由左上角和右上角加在一起 2)一列加在一起等於右下角的值(以後講 第一個式子可以配湊 第二個式子就是性質二(實際上是把個裡選個給拆開選
組合數計算
這實際上很複雜,而且他很難直接算數理解,主要還是數形結合