![Page 2: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/2.jpg)
Funny Problems for Beginners
Peichao Zhang
![Page 3: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/3.jpg)
UNCLE VASYA AND BAGS FOR POTATOES
SGU 238
![Page 4: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/4.jpg)
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](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/5.jpg)
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](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/6.jpg)
![Page 7: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/7.jpg)
![Page 8: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/8.jpg)
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](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/9.jpg)
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](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/10.jpg)
A Smart Solution
• just print N+1• why?
![Page 11: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/11.jpg)
Solution Analysis
• tree structure
![Page 12: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/12.jpg)
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](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/13.jpg)
![Page 14: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/14.jpg)
Solution Analysis
• relation– layout tree node– operation tree edge
![Page 15: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/15.jpg)
![Page 16: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/16.jpg)
POLYMANIASGU 251
![Page 17: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/17.jpg)
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](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/18.jpg)
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](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/19.jpg)
Problem Statement
1 1
22
![Page 20: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/20.jpg)
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](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/21.jpg)
B
A
C
X
X=Y
![Page 22: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/22.jpg)
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](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/23.jpg)
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](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/24.jpg)
XAB=YABXYA=XYB
Solution Analysis
A
X
B
Y
![Page 25: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/25.jpg)
XAB=YABXYA+XYB=XAB+YAB
Solution Analysis
A
X
B
Y
![Page 26: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/26.jpg)
XAB=YABXYA-XYB=XAB+YAB
Solution Analysis
A
X
B
Y
![Page 27: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/27.jpg)
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](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/28.jpg)
BLACK & WHITESGU 246
![Page 29: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/29.jpg)
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](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/30.jpg)
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](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/31.jpg)
N=4K=4
![Page 32: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/32.jpg)
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](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/33.jpg)
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](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/34.jpg)
![Page 35: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/35.jpg)
![Page 36: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/36.jpg)
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](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/37.jpg)
![Page 38: 张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/38.jpg)
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](https://reader035.vdocuments.pub/reader035/viewer/2022062217/56812d15550346895d91fe01/html5/thumbnails/39.jpg)
Q&A
Thanks!