Night Market Mahjong Simulator 2

Night Market Mahjong Simulator 2
Loading the math board and drawing, please wait…
2017-03-14 00:47
Night Market Mahjong Simulator 2 is a GeoGebra example that demonstrates probability and optimization problems. It shows how to use probability to simulate the results of a mahjong game. The core mathematical concepts involved include probability, subtraction, and optimization problems. The construction of the example uses GeoGebra commands such as Sequence, Element, KeepIf, Union, Intersection, Length, Div, Translate, and Max. This example is suitable for middle school students and junior college students, especially those who are learning probability and optimization problems.

GeoGebra Commands & Parameters

  1. Sequence(k, k, 1, 36) → list2
  2. Sequence(Random[1, 36 - k], k, 0, 14) → list1
  3. Element(list1, 1) → carte1
  4. KeepIf(x ≠ carte1, list2) → list3
  5. Element(list3, Element[list1, 2]) → carte2
  6. KeepIf(x ≠ carte2, list3) → list4
  7. Element(list4, Element[list1, 3]) → carte3
  8. KeepIf(x ≠ carte3, list4) → list5
  9. Element(list5, Element[list1, 4]) → carte4
  10. KeepIf(x ≠ carte4, list5) → list6
  11. Element(list6, Element[list1, 5]) → carte5
  12. KeepIf(x ≠ carte5, list6) → list7
  13. Element(list7, Element[list1, 6]) → carte6
  14. KeepIf(x ≠ carte6, list7) → list8
  15. Element(list8, Element[list1, 7]) → carte7
  16. KeepIf(x ≠ carte7, list8) → list9
  17. Element(list9, Element[list1, 8]) → carte8
  18. KeepIf(x ≠ carte8, list9) → list10
  19. Element(list10, Element[list1, 9]) → carte9
  20. KeepIf(x ≠ carte9, list10) → list11
  21. Element(list11, Element[list1, 10]) → carte10
  22. KeepIf(x ≠ carte10, list11) → list12
  23. Element(list12, Element[list1, 11]) → carte11
  24. KeepIf(x ≠ carte11, list12) → list13
  25. Element(list13, Element[list1, 12]) → carte12
  26. KeepIf(x ≠ carte12, list13) → list14
  27. Element(list14, Element[list1, 13]) → carte13
  28. KeepIf(x ≠ carte13, list14) → list15
  29. Element(list15, Element[list1, 14]) → carte14
  30. KeepIf(x ≠ carte14, list15) → list16
  31. Element(list16, Element[list1, 15]) → carte15
  32. KeepIf(x ≠ carte15, list16) → pu
  33. Sequence(Element[pu, (3 * k) - b2], k, 1, 7) → pu1
  34. Element(pu1, 7) → carte22
  35. Element(pu1, 1) → carte21
  36. Element(pu1, 6) → carte20
  37. Element(pu1, 2) → carte19
  38. Element(pu1, 5) → carte18
  39. Element(pu1, 3) → carte17
  40. Element(pu1, 4) → carte16
  41. Union(list0, v1) → u1
  42. Union(v2, u1) → u2
  43. Union(v3, u2) → u3
  44. Union(v4, u3) → u4
  45. Union(v5, u4) → u5
  46. Union(v6, u5) → u6
  47. Union(v7, u6) → u7
  48. Element(u, a + 1) → list00
  49. Intersection(s1, list00) → t1
  50. Length(list1) → n
  51. Div(Length[t1], 6) → n1
  52. Intersection(s2, list00) → t2
  53. Intersection(s3, list00) → t3
  54. Intersection(s4, list00) → t4
  55. Intersection(s5, list00) → t5
  56. Intersection(s6, list00) → t6
  57. Intersection(s7, list00) → t7
  58. Intersection(s8, list00) → t8
  59. Intersection(s9, list00) → t9
  60. Intersection(s10, list00) → t10
  61. Intersection(s11, list00) → t11
  62. Intersection(s12, list00) → t12
  63. Intersection(s13, list00) → t13
  64. Intersection(s14, list00) → t14
  65. Div(Length[t2], 6) → n2
  66. Div(Length[t3], 6) → n3
  67. Div(Length[t4], 6) → n4
  68. Div(Length[t5], 6) → n5
  69. Div(Length[t6], 6) → n6
  70. Div(Length[t7], 6) → n7
  71. Div(Length[t8], 6) → n8
  72. Div(Length[t9], 6) → n9
  73. Div(Length[t10], 6) → n10
  74. Div(Length[t11], 6) → n11
  75. Div(Length[t12], 6) → n12
  76. Div(Length[t13], 6) → n13
  77. Div(Length[t14], 6) → n14
  78. Translate(Element[cartes, carte1], Vector[(0, 0), ((Mod[carte1 - 1, 6] * 2), (Div[carte1 - 1, 6] * 2.8)) + B_3]) → cart1
  79. Translate(Element[cartes, carte2], Vector[(0, 0), ((Mod[carte2 - 1, 6] * 2), (Div[carte2 - 1, 6] * 2.8)) + B_3]) → cart2
  80. Translate(Element[cartes, carte3], Vector[(0, 0), ((Mod[carte3 - 1, 6] * 2), (Div[carte3 - 1, 6] * 2.8)) + B_3]) → cart3
  81. Translate(Element[cartes, carte4], Vector[(0, 0), ((Mod[carte4 - 1, 6] * 2), (Div[carte4 - 1, 6] * 2.8)) + B_3]) → cart4
  82. Translate(Element[cartes, carte5], Vector[(0, 0), ((Mod[carte5 - 1, 6] * 2), (Div[carte5 - 1, 6] * 2.8)) + B_3]) → cart5
  83. Translate(Element[cartes, carte6], Vector[(0, 0), ((Mod[carte6 - 1, 6] * 2), (Div[carte6 - 1, 6] * 2.8)) + B_3]) → cart6
  84. Translate(Element[cartes, carte7], Vector[(0, 0), ((Mod[carte7 - 1, 6] * 2), (Div[carte7 - 1, 6] * 2.8)) + B_3]) → cart7
  85. Translate(Element[cartes, carte8], Vector[(0, 0), ((Mod[carte8 - 1, 6] * 2), (Div[carte8 - 1, 6] * 2.8)) + B_3]) → cart8
  86. Translate(Element[cartes, carte9], Vector[(0, 0), ((Mod[carte9 - 1, 6] * 2), (Div[carte9 - 1, 6] * 2.8)) + B_3]) → cart9
  87. Translate(Element[cartes, carte10], Vector[(0, 0), ((Mod[carte10 - 1, 6] * 2), (Div[carte10 - 1, 6] * 2.8)) + B_3]) → cart10
  88. Translate(Element[cartes, carte11], Vector[(0, 0), ((Mod[carte11 - 1, 6] * 2), (Div[carte11 - 1, 6] * 2.8)) + B_3]) → cart11
  89. Translate(Element[cartes, carte12], Vector[(0, 0), ((Mod[carte12 - 1, 6] * 2), (Div[carte12 - 1, 6] * 2.8)) + B_3]) → cart12
  90. Translate(Element[cartes, carte13], Vector[(0, 0), ((Mod[carte13 - 1, 6] * 2), (Div[carte13 - 1, 6] * 2.8)) + B_3]) → cart13
  91. Translate(Element[cartes, carte14], Vector[(0, 0), ((Mod[carte14 - 1, 6] * 2), (Div[carte14 - 1, 6] * 2.8)) + B_3]) → cart14
  92. Translate(Element[cartes, carte15], Vector[(0, 0), ((Mod[carte15 - 1, 6] * 2), (Div[carte15 - 1, 6] * 2.8)) + B_3]) → cart15
  93. Translate(Element[cartes, carte16], Vector[(0, 0), ((Mod[carte16 - 1, 6] * 2), (Div[carte16 - 1, 6] * 2.8)) + B_3]) → pic39
  94. Translate(Element[cartes, carte17], Vector[(0, 0), ((Mod[carte17 - 1, 6] * 2), (Div[carte17 - 1, 6] * 2.8)) + B_3]) → cart17
  95. Translate(Element[cartes, carte18], Vector[(0, 0), ((Mod[carte18 - 1, 6] * 2), (Div[carte18 - 1, 6] * 2.8)) + B_3]) → cart18
  96. Translate(Element[cartes, carte19], Vector[(0, 0), ((Mod[carte19 - 1, 6] * 2), (Div[carte19 - 1, 6] * 2.8)) + B_3]) → cart19
  97. Translate(Element[cartes, carte20], Vector[(0, 0), ((Mod[carte20 - 1, 6] * 2), (Div[carte20 - 1, 6] * 2.8)) + B_3]) → cart20
  98. Translate(Element[cartes, carte21], Vector[(0, 0), ((Mod[carte21 - 1, 6] * 2), (Div[carte21 - 1, 6] * 2.8)) + B_3]) → cart21
  99. Element(q, a + 1) → k
  100. Translate(Element[cartes, carte22], Vector[(0, 0), ((Mod[carte22 - 1, 6] * 2), (Div[carte22 - 1, 6] * 2.8)) + B_3]) → cart22
  101. Max(0, m1) → m2
  102. Div(m1, 2000) → m3

AI Drawing Prompt Reference

Draw a visualization of a randomized mahjong-like selection process. First generate an integer sequence from 1 to 36. Then build a second candidate list by taking, for each step, a random value within the range from 1 to (36 minus the current value), creating many possible positions. Iteratively refine the set by repeatedly keeping only the elements that are not equal to previously selected ones, producing a chain of distinct retained “tile/position” results. Next, choose one retained result and extract seven specific offsets from it (1 through 7), yielding seven corresponding tile points; also extract a fixed set of seven numbered positions from the same refined result. Finally, merge the lists step by step into one combined list and select the (a+1)-th element starting from a specified index to represent the final selected outcome set.
The prompt above was compiled from the original drawing commands and is for reference only.