1 / 39

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

张培超 2008-2009(Seed) Jakarta 2 nd Chengdu 13 th bbsID: failedstar. starforever00@gmail.com. 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

sheryl
Download Presentation

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

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 张培超 2008-2009(Seed) Jakarta 2nd Chengdu 13th bbsID: failedstar starforever00@gmail.com

  2. Funny Problems for Beginners Peichao Zhang

  3. SGU 238 Uncle Vasya and Bags for Potatoes

  4. 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

  5. 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

  6. Problem Statement • question • if we repeatedly perform the above operation • how many different layouts of bags can we get?

  7. 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

  8. A Smart Solution • just print N+1 • why?

  9. Solution Analysis • tree structure

  10. 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

  11. Solution Analysis • relation • layout  tree node • operation  tree edge

  12. SGU 251 polymania

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

  14. 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

  15. Problem Statement 2 2 1 1

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

  17. X=Y A X B C

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

  19. 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

  20. Solution Analysis X Y XAB=YAB XYA=XYB A B

  21. Solution Analysis X XAB=YAB XYA+XYB=XAB+YAB A B Y

  22. Solution Analysis X XAB=YAB XYA-XYB=XAB+YAB A B Y

  23. 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

  24. SGU 246 Black & White

  25. 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

  26. Problem Statement • find the minimal K, such that the necklace will always be “beautiful” • regardless of how the beads are arranged

  27. N=4 K=4

  28. 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

  29. 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

  30. 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

  31. 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

  32. Q&A Thanks!

More Related