0%

Problem 220


Problem 220


Heighway Dragon

Let D0 be the two-letter string “Fa”. For n≥1, derive Dn from Dn-1 by the string-rewriting rules:

“a” → “aRbFR”
“b” → “LFaLb”

Thus, D0 = “Fa”, D1 = “FaRbFR”, D2 = “FaRbFRRLFaLbFR”, and so on.

These strings can be interpreted as instructions to a computer graphics program, with “F” meaning “draw forward one unit”, “L” meaning “turn left 90 degrees”, “R” meaning “turn right 90 degrees”, and “a” and “b” being ignored. The initial position of the computer cursor is (0,0), pointing up towards (0,1).

Then Dn is an exotic drawing known as the Heighway Dragon of order n. For example, D10 is shown below; counting each “F” as one step, the highlighted spot at (18,16) is the position reached after 500 steps.

What is the position of the cursor after 1012 steps in D50 ?
Give your answer in the form x,y with no spaces.


海韦龙形曲线

D0为包含两个字符的字符串“Fa”。对于n≥1,我们通过如下的字符串重写规则,由Dn-1推出Dn

“a” → “aRbFR”
“b” → “LFaLb”

因此,D0 = “Fa”,D1 = “FaRbFR”,D2 = “FaRbFRRLFaLbFR”,依此类推。

这些字符串可以作为一个计算机绘图程序的指令加以解读,其中“F”表示“向前画一单位”,“L”表示“左转90度”,“R”表示“右转90度”,而“a”和“b”可以忽略。初始状态下,计算机光标的位置是(0,0),方向指向(0,1)。

根据Dn绘制的奇异图象被称为n阶海韦龙形曲线。例如,如下所示为D10;如果把每个“F”算作一步,高亮的点(18,16)是经过500步时所到达的位置。

根据D50绘制图象,经过1012步之后,光标的位置在哪里?
将你的答案写作“x,y”的形式,中间没有空格。