2007/11/30

Chapter A and B from "Combinatorics, a problem-oriented approach"

CHAPTER A

Standard Problem 1:

Find the number of strings of a given length k
using n distinct symbols

Ans: n**k


Find the number of strings of a given length k
using n distinct symbols, if no repetition is allowed.

Ans: n*(n-1)...(n-k+1)

###################
Permutations

###################

Rearrangement: any orderdering including the original 1

Derangement: rearrengement which leaves no element in
it original position.





CHAPTER B

DEFINITION:
combination = list of elements (symbols) in which the order is not taken into account

Standard Problem 3:

Find the number of combinations of a given length k consisting
of distinct symbols from a set of size n.

Ans: BinCoeff(n, k) since
- Distinct ==> n * (n-1) ... (n-k+1)
- Order not taken into account ==> k! strings represent
the same combination, so divide by k!.

####################

Pascal's triangle etc

The commutative property makes
BA equivalent to AB etc etc.

There must be a link to the change-problem here.

####################
B15:
Rearrange 3 As and 7 Bs such that no two consecutive A repeat.

Solution: start with BBBBBBBB and observe that the 3 As
can be put in 8 different places: 8*7*6 / 3*2*1

==>
Standard Problem 4

Find the number bitstrings with
m 0s and n 1s such that there are no consecutive 1s.

Ans:
BinCoeff(m+1, n)

####################
Find all k=5-digit combinations from the set {1,2,3}, #{}=n=3
with at least one symbol each.

Put them in lexicographical order and observe where
the < can be placed:

111<2<3
11<22<3
11<2<33
1<222<3
1<22<33
1<2<333

BinCoeff(4,2) = 6

==>
Standard Problem 5

Find the number of combinations of a given length k
using symbols from a given set of size n, not
allowing missing symbols.

BinCoeff(k-1, n-1)

####################
B21
20 letter combinations of A, B and C with at least
1 A, 2 Bs and 3 Cs

A+ (< B)B+ (< CC)C+

Well, instead of putting two "<"
we can put one "< B" and one "< CC",
which can be done in (19-3)=16 choose 2
ways.
####################
Find all k=2-digit combinations from the set {1,2,3}, #{}=n=3
allowing missing elements.

Adding 123 it reduces to the previous case:
11+123=11123
22+123=12233
33+123=12333
12+123=11223
13+123=11233
23+123=12233

==>
Standard Problem 6

Find the number of combinations of a given length k
using symbols from a given set of size n, allowing
repetition and missing symbols.

Ans:
BinCoeff(k+n-1, n-1)

####################
A symbol A dominates consistently if for any
initial segment (prefix) A occurs at least
1/2 of the time.

B25
0000=0
0001=0
0010=0
0011=0
0100=0
0101=0
0110=x
0111=x

B26
A-dominates sequences of 3 As and 3 Bs:
000111
001110x
001101
001011
010011
010101
so 5 are 0-dominated
and 20-5 = 15 are not.

There is a one-to-one correspondence with
with all sequences of length 6 including 4 As
and 2 Bs:

For each rearrangement of AAAABB:
- find the smallest initial segment
in which A outnumbers B
- flip the symbols in that segment

A-AAABB --> B-AAABB
BAA-AAB --> ABB-AAB
B27
BBAAA-A --> AABBB-A
ABA-ABA --> BAB-ABA

ABB-BAA < - BAA-BAA
ABABB-A < - BABAA-A

Why is this 1-to-1???

==>
Standard Problem 7

Find the number of 0-dominated bitstrings with
m 0s and n 1s.

Ans: BinCoeff(m+n, m) - BinCoeff(m+n, m+1)



B29

2007/11/29

Approximation from Concrete Mathematics [111]


for x > 67 and where \pi(x) is the number of prime numbers <= x And if P_n is the n'th prime, then

birthday paradox



Halmos[104], see also Stinson[237]


some how related to the birtday paradox. It follows that n> sqrt(730 ln(2)) = 22.49438.
In general sqrt( 2 ln(2) n ) = 1.177 sqrt(n)

test



Wow, this seems to work wel
lexcept that the alignment is not great. So it looks as if it wont work with in-line equations.

2007/11/27

hash PGP key: 103F 49A8 2819 C48A 551D F482 2931 8CF1 92FD 1212

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.5 (MingW32)

mQGiBETmAkERBADLtgBOPwzRi5FH7w0rduyST8ZquVf9i6wKElFRQSWfRK8/7nEc
kGcpaP3OSsvnTJkUxPNPGYyJXCvoSMHpR0/sj+dlK7uZQhNr3N9kM7CWWlgwrNAa
SNT4faZP2CVb2TLev1q4/X1VY+RuTILw+N3mIXVT/zKMLM5Y4knnpaiVRwCgv6oA
upVVt97dc4q7mxIxC7QIVcMD/A5mZkIl2ELOkDxFu7eynFCTzBlEOakIVx5f0CiM
yx2uOL7pyxq2rH22nJ6A/7ARBAF2vqKO+OrUvtJyheUt738dVSytX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xMdizrtqOzf4Jmr5uabg8vx+NO2AqxT+6A3Xr2z5SeyE/
4wNkbMLdiHoWThzc6dAfAX0if2mXKw9iKfEzSEZJgR2F49v7KYhPBBgRAgAPBQJE
5gJgAhsMBQkJZgGAAAoJECkxjPGS/RISzCYAoIpsx9rKr+v5HyJyHEC6ChmmNS3o
AJwI81nHLYnOmkkHfYxRh41EBe13sg==
=Xs0y
-----END PGP PUBLIC KEY BLOCK-----

ir e vir, levar e trazer

VocĂȘ vem?
Estou indo! (I am coming)

VocĂȘ traz meu livro?
Vou levar.

It is always relative to the place
of the person who speaks.

combinatorial analysis

I think I have found two nice books about combinatorial analysis:
- A walk through combinatorics, by Bona
- Combinatorics, a problem oriented approach.

At first I was not very enthusiastic about the second, because,
as the title says, one has to absorb the material solving problems.
Aaagh. Work :-(. But I worked myself thru Chapter A and B, and
the exercises are really well-written and well-tuned. A pity
that the book is relatively expensive (about 40$) for its size.