组合数学_学习笔记(一)

Combinatorial Mathematics
(TsinghuaX: 60240013x)

Talking about combinatorics

What is combinatorics

The most ingenious arrangement —— Magic Square

幻方按策略对阶数分类:odd-ordered,4m-ordered,4m+2-ordered

  • A T-shirt will be printed with a magic square of size 3. How many different prints are possible?
    Key: 8

Suffering Parchment Roll

Is your cellphone password safe?

iPhone&Android

Brute-force Enumaration or Abstract conversion

  • The World Cup elimination rounds involve 16 teams in straight knockout matches. How many matches must there be before a champion is determined?
    Key: 15
    Hint: 161=15
  • A large tournament has 569 entrants in total. If it is a single elimination tournament, how many matches have to be played out before the champion can be decided? (Please calculate the precise value)
    Key: 568

Seven bridge problem 七桥问题
注:中文介绍可以参考这里

Euler abstracted the original problem into a graph, which he then transformed into a one-stroke problem.

问题抽象&充要条件:The number of odd nodes must either be 0 or 2.

其中,首先保证connected,然后将node按照adjacent edge的条数分为odd nodeeven node

对于“一笔画”问题的解决方案数目,Euler在论文中提到:对于odd node为0的图,start from any even node,而对于odd node为2的图,则start from any even node and at the end return to it

  • In the six-bridge problem as shown by the graph below, how many ways are there of traversing all six bridges (shown as edges here) exactly once? (Please calculate the exact figure).

    这里写图片描述
    Key: 32

Combinatorial trip of a Pingpang ball

Fundamental Counting Principals

Counting with “+” “-” “*” “/”
4 basic counting principles

Definition of Permutation and combination

Circular Permutation

The number of r- circular permutations of n is P(n,r)r , 2rn

Necklace

Similar to real necklaces. Based on circular permutation. Here two sides of the necklace are considered a same permutation.
The number of necklace permutation of picking r elements from n is P(n,r)2r,3rn

Permutations, Combinations

这里写图片描述

Generating Algorithms

Donald Knuth. The Art of Computer Programming, Volume 4: Generating
All Tuples and Permutations, Fascicle 2 first printing.
Addison-Wesley, 2005.

Idea of recursion
Generate permutations of {1,2...n} with permutations of {1,2,...n1}

Lexicographic Order
  1. Digits have moving directions.
  2. Exchange two adjacent digits each time.
  3. Exchange the largest mobile integer.

Mobile Integer
Every digit in 1,2,...,n has a moving direction.

  • If the adjacent digit in the direction of the digit is smaller, it’s a mobile integer.
  • 1 is always immobile.
  • Except when direct to the outside of the sequence, n is a mobile integer.

    1. Move the largest mobile integer.
    2. After moving a digit, change directions of all larger numbers to make them mobile again.
Steinhaus–Johnson–Trotter algorithm

Begin with 1 , 2 , …, n
While there exists a mobile integer, do
1. find the largest mobile integer m .
2. switch m and the adjacent integer its arrow points to.
3. switch the direction of all integers p with p>m .

Tools

Like A Function But Not A Function

For sequence c0,c1,c2...,G(x)=c0+c1x+c2x2+...
Function G(x) is the generating function for c0,c1,c2...

Generating Function is mother,counting sequence is a child.
Mapping Relationship

Generating function is a line of hangers which used to display a series of number sequences.
—— Herbert · Vere

Found the mapping relationship is a “Mathematic Discovery”.
Finding mapping is an important mathematic thinking.

  • If there is 1, 2, 4, 8, 16, 32g of weights each, how different weight can be weighed? How many possible solutions?
    G(x)=(1+x)(1+x2)(1+x4)(1+x8)(1+x16)(1+x32)
    =1x21x+1x41x2+1x41x8+1x81x16+1x161x32+1x321x64
    =1x641x
    =1+x+x2+x+x3
    =63k=0xk
    From the generating function it can be known that these weights can be used to weigh from 1g to 63g of weightage. And, each solution is unique.
    This problem can be generalize to prove any decimal number n, can be represented as

    n=k0ak2k,0ak1,k0
    and it is unique.

  • Integer n is split into the summation of 1,2,3,...,m, and repetition is allowed, get its generating function.

    G1(x)=(1+x+x2+)(x+x2+x4+)(1+xm+x2m+)

  • If m appeared at least once,how is the generating function?
    G2(x)=(1+x+x2+)(x+x2+x4+)(xm+x2m+)=xm(1x)(1x2)(1xm)=1(1x)(1x2)(1xm)1(1x)(1x2)(1xm1)

The above combination meaning: The partition number of integer n which is split into the summation of 1 to m , minus the partition number of the split 1 to m1 , is the partition number of m at least appeared once.

Integer Partition Number

Algorithm for Big Number Calculation?
(fg)[m]=f[n]g[mn]
Related Guess: BSD Guess

Ferrers Diagram

From top to bottom n level of grids, I is the number of grids for leveli, when mimi1, (I=1,2,,n1) , where the total grid of level above is not less than the level below (weakly decreasing ), known as Ferrers diagram.

Ferrers Diagram owns the following characteristics:
1. Each level contains at least 1 grid.
2. 1st row exchanged with 1st column, 2nd row exchanged with 2nd column.

  • The number of ways to partition n into k numbers would be the same to the number of ways to partition n with the largest number of k.
  • The partition number of integer n is split into the summation of not more than m numbers, is equaled to n is split with the partition number that is not more than m.
  • The partition number of the summation of the partitioning of integer n into different odd numbers, is equaled to the partition number of n is partitioned into the self-conjugated Ferrers Diagram.
Generating Function And Recurrence Relation

Binomial Theorem
Hanoi Problem

h(n)=2h(n1)+1,h(1)=1

Structure of Generating Function
H(x)=h(1)x+h(2)x2+h(3)x3+

这里写图片描述
or
这里写图片描述
Transformed into partial fractional algorithm.
这里写图片描述

Exercise: Find the total occurrence of even number of 5 in n length of decimal number.

From G(x) obtains sequence {an} . The key is over the bridge between sequence to generating function, and between generating function to sequence.

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值