how many shortest paths from a to b do not pass …jjlee/teaching/intro_to_catalan.pdf · how many...

27
How many shortest paths from A to B do not pass above the diagonal? A B Discrete Mathematics Catalan Numbers

Upload: trantram

Post on 28-Aug-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

How many shortest paths from A to B do not pass abovethe diagonal?

A

B

Discrete Mathematics Catalan Numbers

A

B

Blue path is good

Discrete Mathematics Catalan Numbers

A

B

Blue path is good

Discrete Mathematics Catalan Numbers

A

B

Red path is bad

Discrete Mathematics Catalan Numbers

A

B

Red path is bad

Discrete Mathematics Catalan Numbers

Number of good paths

= Total Number of paths− Number of bad paths

=(2n)!n!n!

− Number of bad paths

So it is sufficient to count the number of bad paths.

Discrete Mathematics Catalan Numbers

Number of good paths = Total Number of paths− Number of bad paths

=(2n)!n!n!

− Number of bad paths

So it is sufficient to count the number of bad paths.

Discrete Mathematics Catalan Numbers

Number of good paths = Total Number of paths− Number of bad paths

=(2n)!n!n!

− Number of bad paths

So it is sufficient to count the number of bad paths.

Discrete Mathematics Catalan Numbers

Number of good paths = Total Number of paths− Number of bad paths

=(2n)!n!n!

− Number of bad paths

So it is sufficient to count the number of bad paths.

Discrete Mathematics Catalan Numbers

How to count the number of bad paths?

A

B

Discrete Mathematics Catalan Numbers

A

B

(n, n+ 1)

Discrete Mathematics Catalan Numbers

A

B

(n, n+ 1)

Discrete Mathematics Catalan Numbers

A

B

Discrete Mathematics Catalan Numbers

A

B

(n, n+ 1)

Discrete Mathematics Catalan Numbers

A

B

(n, n+ 1)

Discrete Mathematics Catalan Numbers

A

B

(n, n+ 1)

A

B

(n, n+ 1)

In fact, reflection turns every bad path into a path reaching (n−1, n+1).

Discrete Mathematics Catalan Numbers

Moreover, every path reaching (n− 1, n + 1) is obtained from a bad path.

A

B

(n, n+ 1)

A

B

(n, n+ 1)

Discrete Mathematics Catalan Numbers

Moreover, every path reaching (n− 1, n + 1) is obtained from a bad path.

A

B

(n, n+ 1)

A

B

(n, n+ 1)

Discrete Mathematics Catalan Numbers

Moreover, every path reaching (n− 1, n + 1) is obtained from a bad path.

A

B

(n, n+ 1)

A

B

(n, n+ 1)

Discrete Mathematics Catalan Numbers

Conclusion: There is a one-to-one correspondence between the set of badpaths and the set of paths reaching (n− 1, n + 1).

Therefore the number of bad paths must equal the number of paths

reaching (n− 1, n + 1), which is (2n)!(n−1)!(n+1)! .

Finally,

Number of good paths = Total Number of paths− Number of bad paths

=(2n)!n!n!

− (2n)!(n− 1)!(n + 1)!

=1

n + 1

(2n

n

)The number Cn = 1

n+1

(2nn

)is called the nth Catalan number and has a

lot of applications.

Discrete Mathematics Catalan Numbers

Conclusion: There is a one-to-one correspondence between the set of badpaths and the set of paths reaching (n− 1, n + 1).

Therefore the number of bad paths must equal the number of paths

reaching (n− 1, n + 1)

, which is (2n)!(n−1)!(n+1)! .

Finally,

Number of good paths = Total Number of paths− Number of bad paths

=(2n)!n!n!

− (2n)!(n− 1)!(n + 1)!

=1

n + 1

(2n

n

)The number Cn = 1

n+1

(2nn

)is called the nth Catalan number and has a

lot of applications.

Discrete Mathematics Catalan Numbers

Conclusion: There is a one-to-one correspondence between the set of badpaths and the set of paths reaching (n− 1, n + 1).

Therefore the number of bad paths must equal the number of paths

reaching (n− 1, n + 1), which is (2n)!(n−1)!(n+1)! .

Finally,

Number of good paths = Total Number of paths− Number of bad paths

=(2n)!n!n!

− (2n)!(n− 1)!(n + 1)!

=1

n + 1

(2n

n

)The number Cn = 1

n+1

(2nn

)is called the nth Catalan number and has a

lot of applications.

Discrete Mathematics Catalan Numbers

Conclusion: There is a one-to-one correspondence between the set of badpaths and the set of paths reaching (n− 1, n + 1).

Therefore the number of bad paths must equal the number of paths

reaching (n− 1, n + 1), which is (2n)!(n−1)!(n+1)! .

Finally,

Number of good paths

= Total Number of paths− Number of bad paths

=(2n)!n!n!

− (2n)!(n− 1)!(n + 1)!

=1

n + 1

(2n

n

)The number Cn = 1

n+1

(2nn

)is called the nth Catalan number and has a

lot of applications.

Discrete Mathematics Catalan Numbers

Conclusion: There is a one-to-one correspondence between the set of badpaths and the set of paths reaching (n− 1, n + 1).

Therefore the number of bad paths must equal the number of paths

reaching (n− 1, n + 1), which is (2n)!(n−1)!(n+1)! .

Finally,

Number of good paths = Total Number of paths− Number of bad paths

=(2n)!n!n!

− (2n)!(n− 1)!(n + 1)!

=1

n + 1

(2n

n

)The number Cn = 1

n+1

(2nn

)is called the nth Catalan number and has a

lot of applications.

Discrete Mathematics Catalan Numbers

Conclusion: There is a one-to-one correspondence between the set of badpaths and the set of paths reaching (n− 1, n + 1).

Therefore the number of bad paths must equal the number of paths

reaching (n− 1, n + 1), which is (2n)!(n−1)!(n+1)! .

Finally,

Number of good paths = Total Number of paths− Number of bad paths

=(2n)!n!n!

− (2n)!(n− 1)!(n + 1)!

=1

n + 1

(2n

n

)The number Cn = 1

n+1

(2nn

)is called the nth Catalan number and has a

lot of applications.

Discrete Mathematics Catalan Numbers

Conclusion: There is a one-to-one correspondence between the set of badpaths and the set of paths reaching (n− 1, n + 1).

Therefore the number of bad paths must equal the number of paths

reaching (n− 1, n + 1), which is (2n)!(n−1)!(n+1)! .

Finally,

Number of good paths = Total Number of paths− Number of bad paths

=(2n)!n!n!

− (2n)!(n− 1)!(n + 1)!

=1

n + 1

(2n

n

)

The number Cn = 1n+1

(2nn

)is called the nth Catalan number and has a

lot of applications.

Discrete Mathematics Catalan Numbers

Conclusion: There is a one-to-one correspondence between the set of badpaths and the set of paths reaching (n− 1, n + 1).

Therefore the number of bad paths must equal the number of paths

reaching (n− 1, n + 1), which is (2n)!(n−1)!(n+1)! .

Finally,

Number of good paths = Total Number of paths− Number of bad paths

=(2n)!n!n!

− (2n)!(n− 1)!(n + 1)!

=1

n + 1

(2n

n

)The number Cn = 1

n+1

(2nn

)is called the nth Catalan number and has a

lot of applications.

Discrete Mathematics Catalan Numbers