2: 3 Rules Flashcards

1
Q

3 principles

A

parity

pigeon hole principle

inclusion/exclusion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

parity

A

prove impossible by parity mismatch
odd even,
black white

(can’t prove possible only disprove)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

12x+18y=2
2x+6y=11
do they have sols

A

12x+18y=2
has even parity but no Solutions
2x+6y=11
left hand side is even but right hand side is odd so there are no Solutions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

EXAMPLE: for nxn chess board Domino’s cover without overlap if

A

Domino’s cover without overlap if and only if n is even.

  • if n is odd then parity mismatch as each covers 2 squares and reduced #uncovered by 2. Thus #uncovered is odd and never equal to 0
  • if n is even integer valued nxn/2 blacks and nxn/2 whites hence covered by nxn/2 Domino’s each covering one black and one white each
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

EXAMPLE: for nxn chess board Domino’s cover without overlap ..

when removing squares from two opposite corners

A

board cannot be covered

  • even: two black squares missing hence two more white squares than black squares, #uncovered never equal to 0 as 2 White’s always uncovered.
  • if n is odd require odd half of domino ie parity mismatch
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

EXAMPLE: 7 components,each 4 squares: 4x7 grid?

1x4 rectangle

{3 across one up} x 2 L shapes

{2 across one up one across} x 2

{2x2 square}

t shape ( 3 across then one up in middle)

A

impossible:

most tiles cover 2 • and 2W no matter how they’re rotated

T shape covers 3•1w or 3w1•.

altogether all shapes cover 15•13W or 15W13•

however colour party mismatch as 4 by 7 grid covers 14•14W

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

for a tour of all vertices

A

supposed set of nodes A_1,…,A_n with bridges such that #bridges attached to A_i is d_i. For a tour starting at A_p and ending at A_q Crossing each path exactly once.

consider node A_i st ≠ p or q (ie not end or start). Let K_i = #times tour passes through A_i. each time we arrive and leave and thus use 2 Bridges. Must use every Bridge d_i = 2K_i ie d_i is even for all i ≠ p or q.
so every node not at start / finish must have even #Bridges d_i.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

the pigeonhole principle

A

placing more than n in n pigeon holes:

then some will contain more than one

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

EXAMPLE: handshaking between n ppl ST none shake own and no pair more than once

A

supposed A_1,…,A_n shake hands in some combo with d_i = # hands A_i shakes. d_i in {0,1,…,n-1}. assume all d_i different. as n choices i.e. size of set |{0,1,…,n-1}.|=n must completely fill up set. So there exists p,q such that d_p=0 and d_q=n-1. A_p shakes none, A_q everyone. but this must includeA_p, contradiction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

EXAMPLE: there are at least 2 people in the world with the same number of hairs

A

assume everyone less than 10 ^ 6.

divide people into groups H_0, H_1,…, H_10^6 where H_k is the set of those with k hairs. total #people is |H_0| +|H_1|+…+|H_10^6|=1+1+…+1 =10^6 if each set at most one.

but there are more than this in the world. so there exists a H_k st |H_k| bigger than 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

EXAMPLE: given any 10 different positive integers less than 100, there will be two disjoint subsets with the same sum

A

suppose U ⊆{1,2,…,100} with |U|=10. U has 2^10=1024 subsets (A_1,…,A_1024). let S_k be the sum of elements in A_k. S_k is that most the sum of the 10 terms which is at most 91+92+…+100= 10 (91+100)/2 = 955 buy standard arithmetic formula.

So the 1024 S_k are in the set S={0,1,…,955} which has |S| = 956 less than 1024. So S_i cannot all be different. We can find p≠q st S_p = S_q. ie A_p and A_q have the same sum.

Let Z= A_p ∩ A_q
Y=A_q \ A_p
X= A_p \ A_q
put x= sum of elements of X, Y= …of y, Z=… of z

S_p = x+ z, S_q = y+z. By assumption S_p=S_q, x+z = y+z implies x=y. X and Y are disjoint subsets of U with the same sum

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

EXAMPLE: show that given any sequence of n integers, x_1, x_2,…,x_n. some consecutive collection has a sum divisible by n

ie partial sums are ___mod n

A

“consecutive block whose sum is 0 mod n”

by considering partial sums in terms of mod n & by taking the difference between two equations we can find a consecutive block whose sum is 0 mod n.

consecutive subsequence x_p, x_{p+1},…,x_q (p≤q)
st x_p +…+x_q = 0 mod n.

put y_0=0 mod n, y_1= x_1 mod n, y_2 = x_1 + x_2 modn ,…, y_n = x_1 +…+x_q = 0 mod n. Giving (n+1) numbers y_0,…,y_n (mod n) lying in set {0,…,n-1} size n. hence they cannot all be different. we can thus find m less than q with y_m = y_q. now y_m = x_1+…+x_m mod n, y_q= x_1+…+x_m + … + x_q so y_q- y_m = x_{m+1}+…+x_q mod n.

thus take p=m+1 ≤q for x_p +…+x_q = 0 mod n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

EXAMPLE: each day for 100 Days £1 or £2 deposited into bank. on 50 days at £1 other 50 £2. Let k in Z with 1 ≤k ≤50
show that over some consecutive period of days I will put a total of precisely k pounds into bank

A
*let x_i = amount deposited on day i, x_i in {1,2}. y_i=x_1+...+ x_i = total deposited up to and including i 
y_0=0
y_100=150 as 50 are 1 and 50 are 2, so 0 ≤ y_i ≤ 150 for all i.
y_{i+1} = y_i + x_{i+1} bigger than y_i
so y's are all distinct, put Y={y_0,...,y_100}. So |Y|=101 and is subset of {1,...,150}
  • Fix k such that so 1 ≤ k ≤ 50 and z_i = y_i +k, z={z_0,…,z_100} so |Z|=101 and is a subset of {k,…,150+k} subset of {0,..,199}=U. |U|=200 and |Y| +|Z| = 202 bigger than |U|. it follows that Y and Z cannot be disjoint .
  • thus, z_i = y_j for some i,j. this implies that y_i + k = y_j. as sequence why is increasing we must have i Less Than j. Now x_{i+1} +…+x_j = y_j - y_i = k, so we deposit a total of k for days i+1 to j.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

inclusion exclusion principle

A

related to number of items with at least one of properties

and

|X∪Y| = |X| + |Y| - |X∩Y|

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

inclusion exclusion principle theorem

A

suppose we have a finite set of items and properties 1,2,…,n. Let N(i_1, i_2,…,i_r) be the #items with properties i_1,…,i_r (and maybe others). Then #items with at least one of the properties is

N(1) + N(2) + N(3) +...+N(n)
- N(1,2) - N(1,3)-...-N(n-1,n)
\+N(1,2,3) + N(1,2,4)+...
-N(1,2,3,4)-...
...
\+ (-1)^{n-1}N(1,2,3,...,N)

={for (i_1, i_2,…,i_r)} Σ (-1)^{r-1}N(i_1, i_2,…,i_r)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

EXAMPLE: show that given any sequence of n integers, x_1, x_2,…,x_n. some consecutive collection has a sum divisible by n

x_1,…,x_10 = 16,4,40,22,52,30,39,90,13,9

A

x_1,…,x_10 = 16,4,40,22,52,30,39,90,13,9

y_0= 0 mod 10
y_1= 16= 6 mod 10
y_2= 16+4 = 0 mod 10…
(ie must have two sums the same as sums in set {0,..,9} mod 10 size 10)
y_5= 4 mod 10
y_6= 4 mod 10
y_5 to y_6 is 30 ie 0 mod 10 ie divisible by 10

17
Q

EXAMPLE in a sports club 10 play tennis, 12 squash and 3 both. How many play at least one of the two?

A

10 play T: three of these play squash. So 7 play T only.
12 play S: 3 of these T, so 9 play S only

3+7+9 = 19 total (venn ?)
inclusion exclusion: |T∪S| = |T| + |S| - |T∩S|

18
Q

EXAMPLE: 10T, 15S, 12B, 5 play Tennis and Squash, four play tennis and badminton, three play squash and badminton and 2 play tennis squash and badminton.

how many play at least one of the three?

A
|T∪S∪B| = |T| + |S| + |B| - |T∩S| - |T∩B| - |S∩B| + |T∩S∩B| 
= 10 +15 + 12 - 5 -4 -3 - 2 
*tennis only: 10 - (5-2) - (4-2) - 2 = 3
*squash only: 15- (5-2)- (4-2) - 2 = 3
*badminton only: 12 - (4-2) - (3-2) - 2 = 7
*tennis and badminton only: 4-2 = 2
*squash and badminton only: 3-2 = 1
*Squash and Tennis only: 5-2 = 3

total = 27

(venn diagram helps)

19
Q

EXAMPLE: a permutation of {1,..,n} is called a derangement if 1 does not go to 1, 2 does not go to 2,.., n does not go to n. ie no number map to itself,

(1) how many derangements of {1,..,n}
(2) show that the probability of a path been a derangement tends to 1/e as n tends to infinity

eg {1,2,3,4} |D|=9
{1,2,3,4,5} |D|=44

|P_I|= (5-k)!, 5Ck of these

A
let B= { permutations of 1,...,n}.
B_i = {permutation sending i to i}
So B* = B_1 U...U B_n = {permutations that have a fixed point}

B\B* = {permutations with no fixed points}= {derangements}

The I in P give #derangements= {for I subset of {1,…,n}} Σ (-1)^{| I |}|B_I|

Here B_I is the set of permutations that act as the identity on I, but permute {1,..,n}\ I (size n- |I|) arbitrarily

so |B_I| = (n- |I|)!

also if we fix k than there are nCk possible choices of x with |I| = k and for each subset I: |B_I | =(n-k)!.

so number of derangements is equal to
{from k=0 to Infinity} Σ (-1)^{k}(nCk)(n-k)! = n! Σ (-1)^{k}/(k)!

total #permutations of {1,..,n} is n! so proportion of derangements is P_n = (sum from k=0 to n) n! Σ (-1)^{k}/(k)!

so p_n tends to e^-1 as n tends to infinity

20
Q

EXAMPLE: list {1,…,42} which are relatively prime to 42

A

42= 2 x 3 x 7 so #coprime with 42 not divisible by 2, 3 or 7.

listing all and marking off : 12 coprime with 42

ie crossing off D_2 = 42/2 = 21 divisible by 2
D_3 = 42/3 = 14, D_7= 42/7=6

21
Q

eulers function

A

let m be a positive integer whose distinct prime factors are p_1, p_2,.., p_n. Then #integers from {1,2,..,m} which are relatively prime to m is

m(1- 1/p_1) (1- 1/p_2)…(1- 1/p_n)