张培超 2008-2009(seed) jakarta 2 nd chengdu 13 th bbsid: failedstar

39
张张张 2008- 2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar [email protected]

Upload: nasim-alvarez

Post on 31-Dec-2015

42 views

Category:

Documents


0 download

DESCRIPTION

张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar. [email protected]. Funny Problems for Beginners. Peichao Zhang. SGU 238. Uncle Vasya and Bags for Potatoes. Problem Statement. N different bags some bags on the floor some bags in the other bags - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

张培超

2008-2009(Seed)Jakarta 2nd

Chengdu 13th

bbsID: [email protected]

Page 2: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Funny Problems for Beginners

Peichao Zhang

Page 3: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

UNCLE VASYA AND BAGS FOR POTATOES

SGU 238

Page 4: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Problem Statement

• N different bags• some bags on the floor• some bags in the other bags• one can do the following operation at each

turn

Page 5: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Problem Statement

• select some bag and open it• put all other bags originally on the floor into

the selected bag• pour all bags originally inside the selected bag

to the floor

Page 6: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar
Page 7: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar
Page 8: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Problem Statement

• question– if we repeatedly perform the above operation– how many different layouts of bags can we get?

Page 9: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

A Stragithforward Solution

• devise a way to represent the layout of bags• maintain a collection of layouts that have been

expanded• simulate the above operation on each layout

to expand the collection• count the number of layouts in the collection

Page 10: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

A Smart Solution

• just print N+1• why?

Page 11: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Solution Analysis

• tree structure

Page 12: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Solution Analysis

• 2 operations on the same bag = nothing changed

• number of operations = number of bags on the floor

• if we choose a bag, we cannot choose other bags originally on the floor after the operation

Page 13: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar
Page 14: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Solution Analysis

• relation– layout tree node– operation tree edge

Page 15: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar
Page 16: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

POLYMANIASGU 251

Page 17: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Problem Statement

• N points (N>=3)• each point has a positive special number• at least two points have the same special

number

Page 18: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Problem Statement

• try to arrange the points in a Cartesian coordinate, so that for each triangle formed by 3 different points, the area of the triangle equals the sum of the special number associated with each point

Page 19: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Problem Statement

1 1

22

Page 20: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Solution Analysis

• how to utilize the condition “at least two points have the same special number”?

Page 21: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

B

A

C

X

X=Y

Page 22: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Solution Analysis

• we can conclude from this condition that for any N>4, no solution exists!

Page 23: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Solution Analysis

• so we need only consider the situation when N=3 and N=4

• when N=3, we can construct a solution easily• when N=4, we can also construct a solution

with some calculations

Page 24: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

XAB=YABXYA=XYB

Solution Analysis

A

X

B

Y

Page 25: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

XAB=YABXYA+XYB=XAB+YAB

Solution Analysis

A

X

B

Y

Page 26: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

XAB=YABXYA-XYB=XAB+YAB

Solution Analysis

A

X

B

Y

Page 27: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Solution Analysis

• for N=4, we can calculate the areas of all the 4 triangulars

• we can choose to apply one position layout above that satisfying the corresponding equations

Page 28: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

BLACK & WHITESGU 246

Page 29: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Problem Statement

• a necklace with 2N-1 beads• K of them are black, the rest are white• the necklace is “beautiful” if there exists two

black beads such that exactly N beads are between them

Page 30: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Problem Statement

• find the minimal K, such that the necklace will always be “beautiful”

• regardless of how the beads are arranged

Page 31: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

N=4K=4

Page 32: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Solution Analysis

• try to make the situation as worst as possible• that is, try to maximize the number of black

beads, and keep the necklace “ugly”• two beads with the distance of N+1 in a

circular manner cannot be black at once

Page 33: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Solution Analysis

• construct a graph of 2N-1 nodes, each representing a bead

• for any two beads that cannot be black at once, connect the corresponding nodes with an edge in the graph

• try to paint as many nodes as possible black, such that no two nodes are adjacent to each other

Page 34: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar
Page 35: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar
Page 36: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Solution Analysis

• with some math analysis• when 2N-1 = 0 (mod 3), the graph is

composed of 3 circles• otherwise, the graph is just a circle• the proof is not difficult, so we omit it here

Page 37: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar
Page 38: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Solution Analysis

• finally, with some basic calculations, we end up with a fairly simple answer for the problem

• when 2N-1 = 0 (mod 3), the answer is N-1, otherwise the answer is N

Page 39: 张培超 2008-2009(Seed) Jakarta  2 nd Chengdu  13 th bbsID: failedstar

Q&A

Thanks!