Volume 8, Number 4 August 2003 – October 2003
利用 GW-BASIC 繪畫曼德勃羅集的方法
梁子傑老師
香港道教聯合會青松中學
Olympiad Corner
The 2003 International Mathematical Olympiad took place on July 2003 in Japan. Here are the problems.
Problem 1. Let A be a subset of the set S = {1, 2, …, 1000000} containing exactly 101 elements. Prove that there exist numbers t1, t2, … , t100 such that the sets
aj = {x + tj | x∊A } for j = 1, 2, … , 100
are pairwise disjoint.
Problem 2. Determine all pairs of positive integers (a, b) such that
1 2 2 3 2 + − b ab a is a positive integer.
Problem 3. A convex hexagon is given in which any two opposite sides have the following property: the distance between their midpoints is 3/2times the sum of their lengths. Prove that all the angles of the hexagon are equal. (A convex hexagon ABCDEF has three pairs of opposite sides: AB and DE, BC and EF,
CD and FA.)
(continued on page 4)
Editors: 張 百 康(CHEUNG Pak-Hong), Munsang College, HK 高 子 眉 (KO Tsz-Mei)
梁 達 榮 (LEUNG Tat-Wing)
李 健 賢 (LI Kin-Yin), Dept. of Math., HKUST 吳 鏡 波 (NG Keng-Po Roger), ITC, HKPU
Artist: 楊 秀 英 (YEUNG Sau-Ying Camille), MFA, CU
Acknowledgment: Thanks to Elina Chiu, Math. Dept., HKUST
for general assistance.
On-line: http://www.math.ust.hk/mathematical_excalibur/
The editors welcome contributions from all teachers and students. With your submission, please include your name, address, school, email, telephone and fax numbers (if available). Electronic submissions, especially in MS Word, are encouraged. The deadline for receiving material for the next issue is
November 30, 2003.
For individual subscription for the next five issues for the 03-04 academic year, send us five stamped self-addressed envelopes. Send all correspondence to:
Dr. Kin-Yin LI Department of Mathematics
The Hong Kong University of Science and Technology Clear Water Bay, Kowloon, Hong Kong
Fax: (852) 2358 1643 Email: [email protected] 已知一個複數c0,並由此定義一 個複數數列 { cn },使 cn+1 = cn2 + c0, 其中n = 0, 1, 2, ……。如果這個數列 有界,即可以找到一個正實數 M,使 對於一切的n,| cn | < M,那麼 c0便屬 於曼德勃羅集(Mandelbrot Set)之內。 可 以 將 以 上 定 義 寫 成 一 個 GW-BASIC 程序(對不起!我本人始 終都是喜歡最簡單的電腦語言,而且 我認為將GW-BASIC 程序翻譯成其他 電腦語言亦不難),方法如下: 10 LEFT = 150 : TOP = 380 : W = 360 : M = .833 20 R = 2.64 : S = 2 * R / W 30 RECEN = 0 : IMCEN = 0 40 SCREEN 9 : CLS 50 FOR Y = 0 TO W 60 FOR X = 0 TO W 70 REC = S * (X – W / 2) + RECEN : IMC = S * (Y – W / 2) + IMCEN 80 RE = REC : IM = IMC 90 RE2 = RE * RE : IM2 = IM * IM : J = 0
100 WHILE RE2 + IM2 <= 256 AND J < 15
110 IM = 2 * RE * IM + IMC 120 RE = RE2 – IM2 + REC 130 RE2 = RE * RE : IM2 = IM * IM : J = J + 1 140 WEND
150 IF J < 3 THEN GOTO 220 160 IF J >= 3 AND J < 6 THEN COLOR 14 : REM YELLOW
170 IF J >= 6 AND J < 9 THEN COLOR 1 : REM BLUE 180 IF J >= 9 AND J < 12 THEN COLOR 2 : REM GREEN 190 IF J >= 12 AND J < 15 THEN COLOR 15 : REM WHITE 200 IF J >= 15 THEN
COLOR 12 : REM RED
210 PSET (X + LEFT, (TOP – Y)* M) 220 NEXT X
230 NEXT Y
240 COLOR 15 : REM WHITE 250 LINE (LEFT, (TOP – W / 2) * M) – (W + LEFT, (TOP – W / 2) * M) 260 LINE (W / 2 + LEFT, (TOP – W) * M) – (W / 2 + LEFT, TOP * M) 270 END 以下是這程序的解釋: W 紀錄在電腦畫面上將要畫出 圖形的大小。現將W 設定為 360(見 第 10 行),表示打算在電腦畫面上一 個360 × 360 的方格內畫出曼德勃羅集 (見第50 及 60 行)。 LEFT 是繪圖時左邊的起點,TOP 是圖的最低的起點(見第210、250 及 260 行)。注意:在 GW-BASIC 中,畫 面坐標是由上至下排列的,並非像一 般的理解,將坐標由下至上排,因此 要以 “TOP − Y” 的方法將常用的坐標 轉換成電腦的坐標。 由於電腦畫面上的一點並非正 方形,橫向和縱向的大小並不一樣, 故引入 M(= 5 6)來調節長闊比(見 第10、210、250 及 260 行)。 留意W 祇是「畫面上」的大小, 並非曼德勃羅集內每一個複數點的實 際坐標,故需要作出轉換。R 是實際 的數值(見第 20 行),即繪畫的範圍 實軸由 −R 畫至 +R,同時虛軸亦由 −R 畫至 +R。S 計算 W 與 R 之間的比例, 並應用於後面的計算之中(見第20 及 70 行)。
Mathematical Excalibur, Vol. 8, No. 4, Aug 03- Oct 03 Page 2 RECEN 和 IMCEN 用來定出中心 點的位置,現在以 (0, 0) 為中心(見 第30 行)。我們可以通過更改 R、 RECEN 和 IMCEN 的值來移動或放 大曼德勃羅集。 第 40 行選擇繪圖的模式及清除 舊有的畫面。 程序的第 50 及 60 行定出畫面上 的坐標X 和 Y,然後在第 70 行計 算出對應複數c0的實值和虛值。 注意:若c0 = a0 + b0 i,cn = an + bn i, 則 cn+1 = cn2 + c0 = (an + bn i)2 + (a0 + b0 i) = an2 − bn2 + 2anbn i + a0 + b0 i = (an2 − bn2 + a0) + (2anbn + b0)i。 所以cn+1的實部等於an2− bn2 + a0, 而虛部則等於2anbn + b0。 將以上的計算化成程序,得第 110 及 120 行。REC 和 IMC 分別是 c0的實值和虛值。RE 和 IM 分別是 cn的實值和虛值。RE2 和 IM2 分別 是cn的實值和虛值的平方。 J 用來紀錄第 100 至 140 行的循 環的次數。第100 行亦同時計算 cn 模的平方。若模的平方大於256 或 者循環次數多於 15,循環將會終 止。這時候,J 的數值越大,表示 該數列較「收斂」,即經過多次計 算後,cn的模仍不會變得很大。第 150 至 200 行以顏色將收斂情況分 類,紅色表示最「收歛」的複數, 其次是白色,跟著是綠色、藍色和 黃色,而最快擴散的部分以黑色表 示。第210 行以先前選定的顏色畫 出該點。 曼德勃羅集繪畫完成後,以白色 畫出橫軸及縱軸(見第240 至 260 行),以供參考。程序亦在此結束。 執行本程序所須的時間,要視乎 電腦的速度,以現時一般的電腦而 言,整個程序應該可以1 分鐘左右 完成。 參考書目
Heinz-Otto Peitgen, Hartmut Jürgens and Dietmar Saupe (1992) Fractals
for the Classroom Part Two: Introduction to Fractals andChaos.
NCTM, Springer-Verlag.
IMO 2003
T. W. Leung
The 44th International Mathematical
Olympiad (IMO) was held in Tokyo, Japan during the period 7 - 19 July 2003. Because Hong Kong was declared cleared from SARS on June 23, our team was able to leave for Japan as scheduled. The Hong Kong Team was composed as follows. Chung Tat Chi (Queen Elizabeth School) Kwok Tsz Chiu (Yuen Long Merchants Assn. Sec. School)
Lau Wai Shun (T. W. Public Ho Chuen Yiu Memorial College)
Siu Tsz Hang (STFA Leung Kau Kui College)
Yeung Kai Sing (La Salle College) Yu Hok Pun (SKH Bishop Baker Secondary School)
Leung Tat Wing (Leader) Leung Chit Wan (Deputy Leader) Two former Hong Kong Team members, Poon Wai Hoi and Law Ka Ho, paid us a visit in Japan during this period. The contestants took two 4.5 Hours contests on the mornings of July 13 and 14. Each contest consisted of three questions, hence contest 1 composed of Problem 1 to 3, contest 2 Problem 4 to 6. In each contest usually the easier problems come first and harder ones come later. After normal coordination procedures and Jury meetings cutoff scores for gold, silver and bronze medals were decided. This year the cutoff scores for gold, silver and bronze medals were 29, 19 and 13 respectively. Our team managed to win two silvers, two bronzes and one honorable mention. (Silver: Kwok Tsz Chiu and Yu Hok Pun, Bronze: Siu Tsz Hang and Yeung Kai Sing, Honorable Mention: Chung Tat Chi, he got a full score of 7 on one question, which accounted for his honorable mention, and his total score is 1 point short of bronze). Among all contestants three managed to obtain a perfect score of 42 on all six questions. One contestant was from China and the other two from Vietnam. The Organizing Committee did not give official total scores for individual countries, but it is a tradition that scores between countries were compared. This year the top five teams were Bulgaria, China, U.S.A., Vietnam and Russia
respectively. The Bulgarian contestants did extremely well on the two hard questions, Problem 3 and 6. Many people found it surprising. On the other hand, despite going through war in 1960s Vietnam has been strong all along. Perhaps they have participated in IMOs for a long time and have a very good Russian tradition.
Among 82 teams, we ranked unofficially 26. We were ahead of Greece, Spain, New Zealand and Singapore, for instance. Both New Zealand and we got our first gold last year. But this year the performance of the New Zealand Team was a bit disappointing. On the other hand, we were behind Canada, Australia, Thailand and U.K.. Australia has been doing well in the last few years, but this year the team was just 1 point ahead of us. Thailand has been able to do quite well in these few years.
IMO 2004 will be held in Greece, IMO 2005 in Mexico, IMO 2006 in Slovenia. IMO 2007 will be held in Vietnam, the site was decided during this IMO in Japan.
For the reader who will try out the IMO problems this year, here are some comments on Problem 3, the hardest problem in the first day of the competitions.
Problem 3. A convex hexagon is given in which any two opposite sides have the following property: the distance between their midpoints is
2 /
3 times the sum of their lengths. Prove that all the angles of the hexagon are equal. (A convex hexagon ABCDEF has three pairs of opposite sides: AB and DE, BC and
EF, CD and FA.)
The problem is hard mainly because one does not know how to connect the given condition with that of the interior angles. Perhaps hexagons are not as rigid as triangles. It also reminded me of No. 5, IMO 1996, another hard problem of polygons.
The main idea is as follows. Given a hexagon ABCDEF, connect AD, BE and CF to form the diagonals. From the given condition of the hexagon, it can be proved that the triangles formed by the diagonals and the sides are actually equilateral triangles. Hence the interior angles of the hexagons are
o
Problem Corner
We welcome readers to submit their solutions to the problems posed below for publication consideration. The solutions should be preceded by the solver’s name, home (or email) address and school affiliation. Please send submissions to Dr. Kin Y. Li,
Department of Mathematics, The Hong Kong University of Science & Technology, Clear Water Bay, Kowloon.
The deadline for submitting solutions is November 30, 2003.
Problem 186. (Due to Fei Zhenpeng,
Yongfeng High School, Yancheng City, Jiangsu Province, China) Let α, β, γ be
complex numbers such that α + β + γ = 1,
α2 + β2 + γ2 = 3, α3 + β3 + γ3 = 7.
Determine the value of α21 + β21 + γ21 .
Problem 187. Define f (n) = n!. Let
a = 0. f (1) f (2) f (3) … .
In other words, to obtain the decimal representation of a write the numbers
f(1), f (2), f (3), … in base 10 in a row.
Is a rational? Give a proof.
Problem 188. The line S is tangent to the circumcircle of acute triangle ABC at B. Let K be the projection of the orthocenter of triangle ABC onto line S (i.e. K is the foot of perpendicular from the orthocenter of triangle ABC to S). Let L be the midpoint of side AC. Show that triangle BKL is isosceles.
Problem 189. 2n + 1 segments are marked on a line. Each of the segments intersects at least n other segments. Prove that one of these segments intersect all other segments.
Problem 190. (Due to Abderrahim
Ouardini) For nonnegative integer n,
let ⌊x⌋ be the greatest integer less than or equal to x and
[
]
[
9 1]
. 2 1 ) ( + − + + + + = n n n n n fFind the range of f and for each p in the range, find all nonnegative integers n such that f (n) = p.
*****************
Solutions
****************
Problem 181. (Proposed by Achilleas
PavlosPorfyriadis, AmericanCollege of Thessaloniki “Anatolia”, Thessaloniki, Greece) Prove that in a convex polygon,
there cannot be two sides with no common vertex, each of which is longer than the longest diagonal.
Proposer’s Solution.
Suppose a convex polygon has two sides, say AB and CD, which are longer than the longest diagonal, where A, B, C, D are distinct vertices and A, C are on opposite side of line BD. Since AC, BD are diagonals of the polygon, we have AB >
AC and CD > BD. Hence, AB + CD > AC + BD.
By convexity, the intersection O of diagonals AC and BD is on these diagonals. By triangle inequality, we have
AO + BO > AB and CO + DO > CD.
So AC + BD > AB + CD, a contradiction.
Other commended solvers: CHEUNG
Yun Kuen (Hong Kong Chinese Women’s Club College, Form5), John PANAGEAS (Kaisari High School, Athens, Greece), POON Ming Fung (STFA Leung Kau Kui College, Form 6), SIU Tsz Hang (CUHK, Math Major, Year 1) and YAU Chi Keung (CNC Memorial College, Form 6).
Problem 182. Let a0, a1, a2, … be a
sequence of real numbers such that
an+1 ≥ an2+ 1/5 for all n ≥ 0.
Prove that an+5≥an2−5 for all n≥5. (Source: 2001 USA Team Selection Test)
Solution. CHEUNG Yun Kuen (Hong
Kong Chinese Women’s Club College, Form5) and TAM Choi Nang Julian (Teacher, SKH Lam Kau Mow Secondary School).
Adding an+1 – an2≥1/5 for nonnegative
integers n = k, k + 1, k + 2, k + 3, k + 4, we get 1 ) ( 2 4 1 2 5− ∑ − − ≥ + + = + k k k n n n k a a a a . Observe that 0 ) 2 / 1 ( 4 / 1 2 2−x+ = x− ≥ x
implies 1/4≥−(x2−x). Applying this to the inequality above and simplifying, we easily get ak+5≥ak2 for nonnegative integer k. Then ak+10≥ak2+5≥ak4 for
nonnegative integer k. Taking square
root, we get the desired inequality.
Other commended solvers: POON
Ming Fung (STFA Leung Kau Kui College, Form 6) and SIU Tsz Hang (CUHK, Math Major, Year 1).
Problem 183. Do there exist 10 distinct integers, the sum of any 9 of which is a perfect square? (Source: 1999 Russian Math Olympiad)
Solution. Achilleas Pavlos PORFYRIADIS (American College of Thessaloniki “Anatolia”, Thessaloniki, Greece) and SIU Tsz Hang (CUHK, Math Major, Year 1). Let a1, a2, …, a10 be distinct integers and S be their sum. For i = 1, 2, …, 10, we
would like to have S – ai = ki2 for some
integer ki. Let T be the sum of k12, …, k102. Adding the 10 equations, we get 9S
= T. Then ai = S – (S – ai) = (T/9) – ki2.
So all we need to do is to choose integers
k1, k2, …, k10 so that T is divisible by 9.
For example, taking ki = 3i for i = 1, …,
10, we get 376, 349, 304, 241, 160, 61, –56, –191, –344, –515 for a1, …, a10. Other commended solvers: CHEUNG
Yun Kuen (Hong Kong Chinese Women’s Club College, Form 5). Problem 184. Let ABCD be a rhombus with ∠B=60o. M is a point
inside ∆ADC such that ∠AMC = o
120 . Let lines BA and CM intersect at P and lines BC and AM intersect at Q.
Prove that D lies on the line PQ.
(Source: 2002 Belarussian Math
Olympiad)
Solution. John PANAGEAS (Kaisari
High School, Athens, Greece), and POON Ming Fung (STFA Leung Kau Kui College, Form 6).
Since ABCD is a rhombus and ∠ABC =
o
60 , we see ∠ADC, ∠DAC, ∠DCA, ∠PAD and ∠DCQ are all 60o. Now ∠CAM+∠MCA = 180 –o ∠AMC =60 o and ∠DCM + ∠MCA =∠DCA = 60 o imply ∠CAM = ∠DCM. Since AB || CD, we get ∠APC = ∠DCM = ∠CAQ.
Mathematical Excalibur, Vol. 8, No. 4, Aug 03- Oct 03 Page 4 Also, ∠PAC = 120 = o ∠ACQ. Hence
APC
∆ and CAQ∆ are similar. So PA/AC = AC/CQ.
Since AC = AD = DC, so PA/AD = DC/CQ. As ∠PAD = 60o = ∠DCQ, so PAD∆ and
DCQ
∆ are similar. Then ∠PDA + ∠ADC + ∠CDQ
=∠PDA + ∠PAD + ∠APD = 180o. Therefore, P, D, Q are collinear.
Other commended solvers: CHEUNG
Yun Kuen (Hong Kong Chinese Women’s Club College, Form 5), Achilleas Pavlos PORFYRIADIS (American College of Thessaloniki “Anatolia”, Thessaloniki, Greece), SIU Tsz Hang (CUHK, Math Major, Year 1), TAM Choi Nang Julian (Teacher, SKH Lam Kau Mow Secondary School).
Problem 185. Given a circle of n lights, exactly one of which is initially on, it is permitted to change the state of a bulb provided one also changes the state of every d-th bulb after it (where d is a divisor of n and is less than n), provided that all n/d bulbs were originally in the same state as one another. For what values of n is it possible to turn all the bulbs on by making a sequence of moves of this kind?
Solution.
Let ω = cos (2π/n) + i sin (2π/n) and the lights be at 1, ω ,ω2, …, ωn−1 with the one at 1 on initially. If d is a divisor of n that is less than n and the lights at
) ( 2
,
,
,
,
a d a d a n d aω
+ω
+ω
+ −ω
L
have the same state, then we can change the state of these n/d lights. Note their sum is a geometric series equal to
. 0 ) 1 /( ) 1 ( − n − d = a ω ω ω
So if we add up the numbers corresponding to the lights that are on before and after a move, it will remain the same. Since in the beginning this number is 1, it will never be
.
0
1
+
ω
+
ω
2+
+
ω
n−1=
L
Therefore, all the lights can never be on at the same time.
Comments: This problem was due to
Professor James Propp, University of Wisconsin, Madison (see his website http://www.math.wisc.edu/~propp/ ) and was selected from page 141 of the highly recommended book by Paul Zeitz titled
The Art and Craft of Problem Solving,
published by Wiley.
Olympiad Corner
(continued from page 1)
Problem 4. Let ABCD be a cyclic quadrilateral. Let P, Q and R be the feet of the perpendiculars from D to the lines BC,
CA and AB respectively. Show that PQ = QR if and only if the bisector of ∠ABC and
∠ADC meet on AC.
Problem 5. Let n be a positive integer and
x1, x2, … , xn be real numbers with x1 ≤ x2
≤ ≤ L xn.
(a) Prove that
2 1 1 ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ∑ ∑ − = = n i n j xi xj . ) ( 3 ) 1 ( 2 1 1 2 2 ∑ ∑ − − ≤ = = n i n j xi xj n
(b) Show that equality holds if and only if
x1, x2, …, xn is an arithmetic sequence.
Problem 6. Let p be a prime number. Prove that there exists a prime number q such that for every integer n, the number
p
np− is not divisible by q.
The 2003 Hong Kong IMO team from left to right: Wei Fei Fei (Guide), Leung Chit Wan (Deputy Leader), Chung Tat Chi, Siu Tsz Hang, Kwok Tsz Chiu, Yu Hok Pun, Yeung Kai Sing, Lau Wai Shun, Leung Tat Wing (Leader).