discrete mathematics

21
Discrete Mathematics Reporter: Anton Kuznietsov, Kharkiv Karazin National University, Ukraine In Problems

Upload: rashad-stokes

Post on 02-Jan-2016

28 views

Category:

Documents


2 download

DESCRIPTION

Discrete Mathematics. In Problems. Reporter: Anton Kuznietsov, Kharkiv Karazin National University, Ukraine. Discrete mathematics and programming. Ideas from combination theory and graph theory. Math packages and programming. are applied in. are applied in. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Discrete Mathematics

Discrete Mathematics

Reporter: Anton Kuznietsov, Kharkiv Karazin National University, Ukraine

In Problems

Page 2: Discrete Mathematics

Discrete mathematics and programming

Ideas from combination theory and graph theory

Algorithmic programming

Some problems in discrete

mathematics

Math packages and programming

are applied in are applied in

Page 3: Discrete Mathematics

Scheme of the presentation

Problems 1. Knights and Liars 2. Competing people 3. Search for the

culprit 4. Queens 5. Knight’s move 6. Pavement

Conclusions

Page 4: Discrete Mathematics

1. Knights & Liars

Suppose, we are on a certain island and have talked with three inhabitants A, B and C.

Each of them is either a knight or a liar. Knights always say truth, liars always lie.

Two of them (A and B) came out with the following suggestions:

A: We all are liars.

B: Exactly one of us is a knight.

Question: Who of the inhabitants A, B and C is a knight, and who is a liar? Write down the inhabitants’ propositions, using formulas of proposition calculus.

a = true A – knight

A: B:cba )()()( cbacbacba

Page 5: Discrete Mathematics

1. Knights & Liars - solutiona = true A – knight

A: B:cba )()()( cbacbacba

acb

c at least 2 said truth,↯

↯a

bb

Answer: B is the only knight, A and C are liars.

Page 6: Discrete Mathematics

2. Competing people

Four boys – Alex, Bill, Charles and Daniel – had a running-competition.

Next day they were asked: “Who and what place has taken?” The boys answered so: Alex: I wasn’t the first and the last. Bill: I wasn’t the last. Charles: I was the first. Daniel: I was the last. It is known, than three of these answers are true and one is false. Question: Who has told a lie? Who is the champion?

0 1 1 0

1 1 1 0

1 0 0 0

0 0 0 1

Page 7: Discrete Mathematics

2. Competing people - solution 0 1 1 0

1 1 1 0

1 0 0 0

0 0 0 1

1 0 0 1

1 1 1 0

1 0 0 0

0 0 0 1

0 1 1 0

1 1 1 0

1 0 0 0

1 1 1 0

0 1 1 0

1 1 1 0

0 1 1 1

0 0 0 1

0 1 1 0

0 0 0 1

1 0 0 0

0 0 0 1

A - liar B - liar C - liar D - liar0 1 1 0

1 1 1 0

0 1 1 1

0 0 0 1

0 1 1 0

1 1 1 0

0 1 1 1

0 0 0 1

Answer: Charles is a liar, Bill is the champion.

0 1 1 0

0 0 0 1

1 0 0 0

0 0 0 1

0 1 1 0

1 1 1 0

1 0 0 0

1 1 1 0

1 0 0 1

1 1 1 0

1 0 0 0

0 0 0 1

Page 8: Discrete Mathematics

3. Search for the culprit

Four people (A, B, C, D) are under suspicion of committing a crime. The following is ascertained:

If A and B are guilty, then the suspected C is also guilty.

If A is guilty, then B or C is also guilty. If C is the culprit, then D is also guilty. If A is innocent, then D is the culprit. Question: Is D guilty?

A A is guiltyCBA CBA

DC DA

(1)

(2)

(3)

(4)

Page 9: Discrete Mathematics

3. Search for the culprit - solution

CBA CBA

DC DA

(1)

(2)

(3)

(4)

D)3(

A ACB )2(

D)3(C)1(

B C

D)4(

Answer: D is guilty.

Page 10: Discrete Mathematics

4. Queens Dispose eight queens

on the chess-board so, that the queens don't threaten each other.

Find all variants of such arrangement.

Page 11: Discrete Mathematics

4. Queens - solution

1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0

Page 12: Discrete Mathematics

5. Knight’s moves

There is a chess-board of size n x n (n <= 10).

A knight stands initially on the field with coordinates (x0, y0).

The knight has to visit every field of the chess-board exactly once.

Find the sequence of knight’s moves (if it exists).

Page 13: Discrete Mathematics

5. Knight’s moves - solution

1 10 5 16 25 4 17 2 11 6 9 20 13 24 15 18 3 22 7 12 21 8 19 14 23

Page 14: Discrete Mathematics

6. Pavement

Roadmen have pavement plates of size 1x1 and 1x2.

How many ways are there to pave the road of size 2xN (1<=N<=1000)?

The plates 1x2 are made on factory so, that they can be placed only with the wide side lengthwise the road.

2 x N

1, 4, 9, 25, 64, 169, 441, …

N = 1, 2, 3, …

Page 15: Discrete Mathematics

6. Pavement2 x N

– the number of ways to pave the road.

Nx;21 NNN xxx ;1,0 10 FF 1 NN Fx

;2,1 21 xx

Page 16: Discrete Mathematics

1, 4, 9, 25, 64, 169, 441, …

6. Pavement2 x N

21NF

N = 1, 2, 3, …

Page 17: Discrete Mathematics

6. Pavement

Roadmen have only plates of size 1x2.

The plates can be placed both lengthwise and crosswise the road.

How many ways are there in this case?

2 x N

;2,1 21 yy

.1 NN Fy

Page 18: Discrete Mathematics

6. Pavement3 x N

Roadmen have only plates of size 1x2.

The plates can be placed both lengthwise and crosswise the road.

How many ways are there in this case?

1 < N < 1000. N is even.

Page 19: Discrete Mathematics

6. Pavement3 x N

11 2 mmm BAA

211 mmm BAB

;2

nm

,

mA - the required quantity;

1mB- the number of ways to pave this road:

Am = 3, 11, 41, 153, 571, 2131, 7953, …

m = 1, 2, 3, …

Page 20: Discrete Mathematics

Conclusions

Combination theory, graph theory, pounding

theory, Fibonacci numbers, Catalan

numbers

Algorithmic programming

Problems of logic, combination theory, graph

theory

Programming

are applied in are applied in

Page 21: Discrete Mathematics

Thank you for your kind attention!

Reporter: Anton Kuznietsov, Kharkiv Karazin National University, Ukraine