Wednesday, 22 July 2026

IMO 2026 quick thoughts

Wow hello it's time for another year of IMO review. I even didn't realize it is mid-July instead of early August somehow with all the workload in reality where solving math problem is actually more of a relief for me.

As usual, this is a quick attempt on the questions with my thoughts and insights where I didn't try them under formal time limit. I would also feed them to mainstream AI models as a cross section study of AI capabilities. Let's go!

Q1. Wow a question on lcm and gcd! One of my favourite lemma, as I wrote a whole entry about it in 2013, is $mn = [m,n](m,n)$ where $[m,n]$ stands for lcm and $(m,n)$ stands for gcd.

We are replacing $m,n$ by $(m,n)$ and $[m,n]/(m,n)$ this time, so not quite the application of that lemma yet the direction is clear -- the way the question is formulated screamed for specific approaches.

When they asked for finite termination, this is asking for a metric that is strictly monotone upon the operation. Is there any metric better than products of all numbers?

Notice that every operation either (1) turns a number into 1 (when $(m,n)=1$) or (2) decreases the product (when $(m,n)>1$). Since the number count and the product are both finite this is done.

They also asked for the final number standing is fixed given the starting parameters. This is to find an invariant. To this end we look at the prime powers of each number -- i.e. we look at $v_p()$ of the 2026 numbers. We are sending $v_p(m), v_p(n)$ to $\min (v_p(m), v_p(n))$ and $\max (v_p(m), v_p(n)) - \min (v_p(m), v_p(n))$. But wait! This is the operation in Euclidean algorithm! And what's invariant? The gcd across all prime exponents.

When there is one number above 1 left, it must take all the prime powers (the prime powers of all the rest are zero -- think about how Euclidean algorithm works a step further to turn the two numbers $(m,n)$ and zero). Since the question does not ask to determine $M$ we don't even need to write it down! (But you can write it down right?)

Q2. Oh coordinate geometry. Not my taste and probably won't be able to brute force it under exam environment. When I checked on AoPS, it seems like this question is relatively hard as Q2 and have deep relation to projective geometry? Interesting.

Q3. While Q2 is surprisingly difficult (average score of 1.6), Q3 is actually relatively easy. In fact, one very rare combinatorics Q3/6 that I solved without trying hard.

It boils down to the essence of equilibrium where it is reached only when you make a move that opponent's move is indifferent. In this case, indifference means even by not cutting the rod. Technically you can't do that given the rules but it is always possible to cut infinitesimally small portions.

First a simple note: when the cut is done, it is clear that player A will always take the 1st, 3rd, 5th... largest portions and B will take the rest. We are therefore minmaxing the total length of the odd ordered pieces.

Consider the case $n=1$ where player A makes a cut then player B makes a cut. Where would player A choose? The answer is to cut the rod into 1/3 and 2/3 and the claim is A will be claiming 2/3 of the rod.

Case 1: If player B cuts on the 1/3 portion then A can simply take the 2/3 portion and done.

Case 2: If player B cuts on the 2/3 portion into $x, 2/3-x$ then either portion will be at least 1/3. Take the larger one so that B will take 1/3, and you will take the rest for 2/3.

The key is to realize that "cutting the 1/3 portion" has the same minmax result compared to "cutting the 2/3 portion". For case 2 above A is guaranteed to have 2/3, no more, no less. It sounds like A would get more than 2/3 in case 1 but not really if B cuts an infinitesimally small piece on the 1/3 portion leaving A with $2/3 + \varepsilon$ in total. It is easy to show that 1/3 is the sweet spot making the two cases indifferent.

Can we generalize this? Absolutely. The first cut would divide the rod into $\alpha < 1-\alpha$ such that if you don't break the $1-\alpha$ portion A will take the whole portion, with $1-\alpha$ being the part A can always get regardless of B's choice. 

With the first cut being made, this forces B's first cut to land on the $1-\alpha$ portion -- and the best he can do is to split the portion into 2 equal parts or else A would claim the larger part. How can we guarantee that he won't make multiple cuts on this portion? Again, indifference -- divide the smaller portion in a way such that making multiple cuts on the already halved $1-\alpha$ portion is equivalent to making cuts on smaller portions. A can simply make a $(1-\alpha)/2$ portion out of the $\alpha$ portion which is as much as the halved $(1-\alpha)$ portion, and so on. That gives a geometric series of division, foul proof and hence optimal.

Do you realize the solution already? Once you write down the partition the rest of the proof is easy case by case argument.

One question I really like, probably very much to my taste although students think otherwise as reflected by the average score of 0.58.

Q4. Another game? 

At first I was thinking about countability argument like is there a way to iterate all rational angle, but if they asks for the largest possible set of angle why not just $\mathbb{Q}[\pi]$? Why not $\mathbb{Q}[\pi, \sqrt{2}]$? ...then you know this isn't the way to go.

It reduces to something very simple: it only works it integral divisions of 180 degrees where you can divide the angle $k \theta$ into lower multiples of $\theta$ and there is no stopping it. If the initial triangle contain no such angle you can create that by dividing the 180 degree angle. On the other hand it is easy to prove that if a triangle contains no integral multiple of $\theta$ then there is no move that grants you a win within a single move, then induction does the job. Do you realize what is needed for the inductive step? External angle of triangle! This is such cute geometry trick when you don't have to summon huge block of geometry argument like Q2.

Q5. Functional inequality! Always nice to have them. The more complicated it looks, the more important it is to find the right substitution to draw useful information out of it. The given relation involves variable with and without passing into the function $f$, so the natural approach is to substitute $(x,y)\mapsto (f(x),x)$ so find the relation between $x$ and $f(x)$: $f(f(x)) = 2f(x) - x$.

A linear relation!

That screams a simple linear function being the sole answer, although there is a lot to do before we can reach that conclusion. The fact that recurred linear function is also linear with the sequence of $f^n$ being arithmetic themselves is also covered in another entry I wrote (in the very early days so probably not worthy for a read but yeah). 

By induction we have $f^n(x) = nf(x) - (n-1)x$, showing that $f(x)\geq x$ for all $x$ by taking $x\to \infty$. The rest is probably the hardest -- to argue $f(x)-x = g(x)$ is constant by equating $g(x)$ and $g(y)$ using the given inequality involving quadratic mean. Perhaps I can do it given the time, but I didn't spend too much time thinking into it.

Q6. A NT Q6 is always the ultimate thriller like 1988 Q6, and this one is of no difference. What an elegant formulation.

At first, I even struggle to come up with a single example where the sequence isn't simple arithmetic. I was trying larger numbers with no luck, before I finally ran into $a_1 = 15$. Then I ran into another problem: isn't it strictly arithmetic after a while, and if that was true the demanded statement is false right?!?

Well no. The sequence starting from 15 looks like 15, 18, 20, 24, 30, 36, 40, 42, 45, 48,... with an increment of 30 and period 8.

Think it this way. $a_2-a_1$ must be the smallest prime factor of $a_1$ denoted $p$. The sequence of $(a_1 + (n-1)p)$ clearly satisfies the gcd requirement, and it only fails only when an increment below $p$ somehow satisfies the gcd requirement as well. For example when $a_1 =15$ you know $a_2 = a_1+3$, but somehow an increment of 2 worked for $a_3$ breaking the pattern. It is clear that it's the small prime that matters.

That is, we claim that only prime factors at most $a_1$ would matter. Something is wrong if you have an increment that is bigger the products of these smaller primes. With that you can argue periodicity by finiteness (of course we need to be careful to show that $a_1$ is mod-repeated in the sequence).

The details aren't precisely straightforward -- of course that should be the case considering how this is Q6 not Q3 or Q5. I don't think I can write a complete proof under exam environment either. The average score of 0.38 defends the family of NT Q6 on the harder end among boss questions, although I feel like 1 or 2 points based on nature of increments shouldn't be hard.

*

How do I feel about the questions this year? It feels strangely familiar.

If we ignore the geometry question, every single question points to something familiar on my side directly applicable towards the intended solution. Writing the full proof is one thing, but being able to analyze the question without wasting time on wrong directions would be a huge bless after all. Although there's also a bad side for being familiar with the questions -- I can't really evaluate the difficulty of these questions accurately. With that being said, average score shows that the difficulty this year is surely not out of the blue.

As for AI models, it is not surprising that GPT 5.6 Sol has managed to solve it all. When someone like me managed to get all directions correct easily it is madness to expect difficulty for leading models to do the same.

...leading thinking models only, of course.

It is still far away for mid level LLMs to perform up to that level. GPT Terra had problem from Q3, Grok can't even solve Q1 properly. Our poor follow Gemini Pro 3.1 managed to solve Q1-4 properly, completely messed up Q5 but solved Q6 with minor mistakes.

It has been a spectacular year of AI progress, so much to the point it becomes fearsome. But for now, there is no better timing to start embrace the use of AI to relief us from the calculation. It has been shown that once we get the direction right, AI can do the rest for us.

Let's meet again in 2027.

Thursday, 16 July 2026

被青梅竹馬抓來(略) (17):戴手套也是為了銷毀文件

Character design: @kuonyuu, Illust: @BAZA commissioned by forretrio. Skeb
Editing and re-posting are prohibited // 無断転載、無断使用禁止です

「早安,庫里斯大人。你有三封新信件。」管家把早餐的餐車推了進來。早餐被放到餐桌中央,他把蓋子掀開露出蒸氣騰騰的早餐全餐。他把報紙和信件放到早餐旁邊伸手就能碰到的地方後便彎腰示意後倒退出房間,沒有多餘的動作。

他一邊吃著豐富的早餐一邊看著報紙。報紙上沒有甚麼跟他有關的東西,全是甚麼地區抓了個飛賊、甚麼食材最近價格飛漲、當然還有最近王都地下城的冒險進展。在他以前理解裡,一邊吃早餐一邊看報紙就算得上是富足生活了。當然,這種觀念在他進學園以後就被擊得粉碎。

他的老爸勉強有個爵位,但也就領點象徵性的月俸,跟貴族完全扯不上關係。小時候的生活品質只能算是個中產。雖然請得起佣人下廚,但他從少就被教導不要浪費食物,煮食的份量都是按食量來的。與之相比,眼前的早餐可就豐盛多了。他是能堪堪把這盤早餐吃完,但換成女性或者老人的話肯定就會浪費掉,而廚房裡肯定還預備了額外的份量。那些有錢人的家裡還會讓廚房一直煮東西,這樣才能讓主人可以隨時吃到新鮮出爐的東西。那得消耗多少食物啊?

所謂的報紙也只是滿足自以為看了就能知道天下事的人的慾望罷了,有價值的資訊從來不會在這種地方出現。「千面鴉」好像有提供類似報紙的定期服務,但收費大概不是正常人能負擔的吧。比起有用的資訊報紙更像是一種娛樂,看到街頭巷尾那誰遭到不幸的事可以讓讀者笑上幾下,看到哪個權貴的秘聞更能讓讀者以為他們就是這圈子的人。就算明知道這種感受如此虛偽,報紙還是成了社會的必讀之物。

一邊胡思亂想一邊把餐盤清空,他放下報紙拿起信件一封一封閱讀。

第一封信來自阿蕾西亞。她問候了庫里斯,又問他適應了沒有。她隻字不提測驗和出來的成績,但是在這個時間來信已經說明了一切。他能想象對方就坐在房間的沙發,用淡淡的語氣問著同一問題。那麼這封信更像是個給他講故事的機會,又或者是邀請她吃飯的機會。他要好好想一下怎樣回信,現在他先把這封信珍重的疊好放進抽屜裡面。

第二封來自魔法師協會,協會邀請庫里斯前去演講。這是學園的魔法科老師能享受的諸多禮遇之一。協會雖然勢力龐大,但魔法科老師掌握了未來苗子的人脈,是協會不能不交好的對象。加上酒會和晚宴,這算是高規格的社交活動了。

第三封來自校園裡的另一位老師,史特勞斯老師。她負責管理學生社團,這次寫信來問庫里斯能有沒有興趣看看兩個在存廢邊緣的社團。雖然實際管理學生組織的是學生會,但如果由學生會找上老師的話不太合適,由史特勞斯老師出面正好。

平日根本不會有人寫信給庫里斯。他的上司也就是學園長、或者他的學生直接找上他就可以,根本不需要寫信。這樣一口氣來三封信的原因是甚麼呢?

他覺得是他的試用期合格了。這種合格與否甚至不需要學園長出來點頭,測驗的成績所有人都打聽到了,他們紛紛作出反應。阿蕾西亞是適時的問候,而協會和史特勞斯老師則是把他看成一位正式的魔法科老師了。有了更大的權力,當然也要肩負更多的責任,這兩封信都是衝著這樣的想法來的。

協會邀請的演講題目並沒有限制,但他知道魔法師協會是個很講求純度的地方,所以演講要以理論為主。這個純度不是血統的純度,而是他們看重純粹的魔法理論而非其應用。講求應用的魔法師不是去當冒險者就是從事各種魔法相關工作、而綜合實力最強大的人都跑到宮庭魔法師體系裡了,剩下的人自然以理論派為大宗。

可是叫他講魔法理論不是自曝其短嗎?教一年級學生們是一件事,要講出能滿足老學究們的內容則是另一回事。當然就算自己開宗名義說自己對理論沒興趣他們也不會說甚麼,但是能交好的大勢力少了一個還是有點可惜。

史特勞斯老師的請求就簡單得多了。只要擺出老師的架子,大不了雙手一攤自己也不願意掛名,這件事就算完了對吧?

其實庫里斯最希望的是把探索地下城的大型計劃交上去,但現在還不是時候。整個計劃只有最後一步,也就是挑戰有危險性的地下城這一步要得到額外批准,在此之前的訓練和在地下城的練習聽上去都不會超出過往的難度--當然實際上可能是另一回事。學生們先前表現出極佳的學習能力,但他們有能力「安全地」挑戰地下城嗎?這是他接下來要證明的目標。

他看著窗邊的景色。早上的晨光照在學園上特別柔和,連帶著空氣中的風元素也給他一種生機勃發的感覺。今天又是新的一天,是他真正被認可為老師的第一天。他將在這裡從處理雜務開始重新出發。

*

學園鼓勵學生成立興趣社團,但不代表隨便成立一個都能拿到官方的認可。沒有官方身分的話就不能用社團名義利用學園的資源,不能租用設施、不能找老師掛名、當然也不會拿到經費。這個身份由學生會續年批核,要持續拿到許可就要拿出實績來。新社團的門檻相對高,但往後的審查沒那麼嚴格,不少社團實際上不怎樣活躍。學生會每年都會挑出不過審的社團並傳到史特勞斯老師手上。史特勞斯老師找上相近領域的老師。如果有老師願意掛名拉一把的話社團就能續命下去,如果沒人願意出手的話這社團就要被除名了。

史特勞斯老師給他挑的是……「荒廢地下城研究會」和「飛行興趣小組」。

「……怎麼有這麼奇怪的社團啊,」庫里斯想了很久擠出了簡短的嘀咕:「我以前都沒聽過這種東西。」

「庫里斯老師你沒有聽過也是正常的,」史特勞斯笑道:「這是現在學園長上來才有的政策。就算社團聽上去十分奇怪,只要有實績就沒問題。當然這兩家就是這方面過不了關才被送到你我手上。」

史特勞斯把紀錄翻給他看,飛行興趣小組的年度活動報告跟廢話沒兩樣。活動大部分都是例行聚會,也沒有詳細寫上聚會都幹了甚麼。比較好認出來的是書本讀後分享……只是書本的水平有點慘。作為研究魔法的社團,居然也沒有像樣的魔法練習。

「這個社團前身是風魔法研究小組,三年前才改成這樣。交上來的活動紀錄乏善可陳,學生會沒直接除名就算不錯了。」

他瞳孔猛地一縮,風魔法研究小組?不就是那個當年被小圈子霸佔,拒絕他進去的那個小組嗎?他也不知道這社團以前過得怎樣,大概是學生畢業後沒人要繼承才變成這樣的吧。

「然後這是荒廢地下城研究會的。」史特勞斯遞上另一份資料,他們的活動報告也沒好到哪去。雖然有固定的每週聚會,但活動方面還是以情報交流和心得分享為主。很可惜最重要的地下城相關活動數量為零,更別提跟荒廢地下城相關的探險活動。正因如此學生會判定其欠缺實績而放在除名名單之上。

庫里斯:「這也叫欠缺實績嗎?」

「沒辦法啊,學生會定下的唯一標準就是實績。如果沒有跟名字對應的實績能拿出手的話是很難通過審查的。比如說,冒險科的學生不少都在『地下城學會』裡面,他們每年都舉辦冒險活動,也會請畢業生來演講。學生會多半會說如果只是對地下城有興趣的話為何不參加地下城學會而要另立門戶呢?」

他拿著兩邊的報告互相比對。如果是他的學生找上他詢問這兩方面的事情的話他二話不說就會出手幫忙,但這兩個不過是熱情不足的社團罷了。史特勞斯以為他非得二選一不可連忙補充道:「庫里斯老師不別勉強自己選一個,就算兩個都不救或者兩個都救也沒有問題,他們不會知道是你下的決定。」

是嗎?一股私心閃過,他很快就把風魔法研究小組給判了個死刑:「我就不看了。有夢想是不錯,可是夢想太遙遠也沒有實際的行動,留著也沒有意思。」

史特勞斯附和:「的確,是我也會直接當掉他們。不過庫里斯老師你是這方面的專家,這方面會比我更清楚。那老師是怎樣看荒廢地下城研究會的呢?」

大概是想要補償剛才的私心他點頭道:「我去看一下吧。」

「太好了!那庫里斯老師可以在兩星期內下決定除名還是續留嗎?」

「沒問題。」

他拿著資料離開的時候不禁在想,憑甚麼他就要看一下這個荒廢地下城研究會呢?兩邊的報告都差不多爛,同樣被學生會刷下來。論實績,兩邊大概也拿不出任何實績。他想帶自己學生去地下城都要搗鼓許久,怎可能放任學生去危險的荒廢地下城呢?不要說是他,任何老師都不會批准這種活動。還有研究飛行是甚麼鬼?現在的風魔法跟飛行是兩回事不是常識嗎?

他只知道他拒絕飛行興趣小組的原因不是因為報告寫得不好,單純就是因為他的私心罷了。也許這算是他的小小特權吧。

……

飛行興趣小組被除名了。他們毫無掙扎,大概是把報告交上去那一刻就知道結局了吧。學生會給他們幾天時間把專屬活動室裡重要東西拿走,但這幾天下來活動室完封不動,彷彿這裡所有東西都跟他們無關一樣。

庫里斯以尋找有用資料的名義要到了鑰匙,現在就在飛行興趣小組的前.活動室裡面。這裡沒有甚麼佈置,單純地只有一長桌、一堆椅子和一整列儲物櫃而已。儲物櫃的鎖已經全數解開,他現在可以不受阻攔地調閱裡面已經無主的東西。

他首先想看的是飛行興趣小組--或者以前的風魔法研究小組,到底真的有在研究魔法的嗎?如果他們真的有努力過只是拿不出成績來,他可能會後悔自己這樣下決定。

幸運的是他翻不出太多有關利用飛行研的資料。他只翻了淺淺一層,上面標示的社團名稱已經從飛行研究小組變回風魔法研究小組,說明改組後他們就是單純在混,被除名了一點也不可惜。他繼續翻下去,發現風魔法研究小組以前真的有在認真研究,文件上的內容超出了教學的範圍。儲物櫃的陰暗角落裡還有一些舊書,雖然蒙了塵但書本的狀態還不錯,就是好一段日子沒人碰過了。那些都是正經的魔法書籍,不是圖書館藏,大概是舊書店撿來的。

這風魔法研究小組看上去還可以,至少真的有在研究東西。可是如果以前的風魔法研究小組是正經的研究向社團的話,為何當初要搞小圈子、為何又要拒絕他呢?

他繼續翻查剩下這些留下來的文件。某屆某社員留下來沒寫完的作業(沒交上去嗎?)、毫無吸引力的宣傳單張(當然宣傳的是風魔法研究小組)、簡潔得可怕的帳目表等等。最吸引他注意的是用文件夾特別裝起來的歷屆成員名單。

名單沒有很厚。這個社團加上前身也就十幾年左右,每年也沒招到多少社員。庫里斯默默翻到他二年級那一年,上面果然有幾個他在意的名字。他凝視名單很久,臉上看不到一點表情,最後他把整疊成員名單摺起放進衣服裡。他把裝著名單的文件夾撕成可以握在拳頭裡的大小。心念一動,拳頭裡一股火炎把文件夾化為灰燼卻沒有傷他分毫;拳頭張開的時候就剩一捧灰了,一陣清風把灰燼吹出窗外。他重覆這個動作好幾次,直到裝有成員名單的文件夾徹底消失為止。

這……也算是他的小小特權吧?

完成了這事心情大好的他輕快地向魔法科教室上方的社團活動室走去,今天也是「荒廢地下城研究會」每週聚會的日子。

在掛著「荒廢地下城研究會」牌子的門上叩了幾下的庫里斯推門而入。裡面大概有十人,其中一人臉色變得煞白快要昏倒的樣子,他肯定就是這研究會的會長了--如果一個跟你社團無關的老師在學年這個時候突然走進來,很可能就只有一個原因。

一把熟悉的聲音立刻怪叫起來:「庫里斯老師你怎麼會在這裡?!?」
「…………艾基爾同學你怎麼會在這裡?!?」

***

再次提醒大家,好孩子不要玩火。如果要在緊閉的拳頭裡面召喚火炎,請務必配戴有足夠魔防的高級手套。可以的話不要學他那樣耍帥用短手套,手套應該至少及腕才能完整保護施法者的安全。

這次也沒有甚麼要補充的,簡短講兩點就好了。

說到報紙,最有名的描述當數英國政治喜劇Yes Minister:每份報紙都有自己的取向,有甚麼樣的讀者就會有甚麼樣的報紙。我有想過,這個世界裡有報紙嗎?答案當然是有的,報紙這東西在古羅馬就有了。但是這個世界會有讓讀者自以為在管治國家的報紙嗎?會有真正給治理國家的讀者的報紙嗎?這兩個我不知道,但我知道這世界肯定會有足夠下流的小報。

說到社團的審核機制,我總覺得這種規制下的社團更像一家公司了?把審核的機制簡化,設立清晰的指標也就是與社團相關的實績,自然讓社團進行淘汰但不用增加審核的工作量。

這種機制會引發社團之間的惡性競爭嗎?在我的設定下是不會。

我引用一個實驗好了:有一個著名的實驗是把老鼠放在資源充足的箱子裡養著。不用勞動就有水和食物,老鼠也樂得把精力放在生殖上。直到鼠口突破臨界那一刻,天堂變成了地獄。即使食物和水還是充足,但空間不足的牠們還是開始了慘烈的撕殺。剩下來的老鼠又回到那個無憂無慮的狀態,直到下次突破臨界點的時候。

在這個名為學園的養殖箱裡,社團資源充足又不會增殖,惡性競爭當然不會出現。廢話,這是王國最重要的學園耶,各種資源還不是手到拿來?以空間為例,除了魔法科教室上方的社團活動室以外,學園還有一座學生活動大樓之類的東西,各種社團活動室都塞在裡面了。學園還預留了一堆備舉辦茶會、舞會等社交活動的地方,根本不愁學生們不夠用。只要能分到的資源夠多,淘汰下來的都是像上面那兩家廢到不行的社團,真能拿出成績的社團不用擔心被裁。

至於躺平的社團當然有,上面那兩個在除名以前大概也混了好幾年了吧。那為甚麼大家一起擺爛的情況不會出現呢?大家都知道自己只能在這養殖箱裡留個三年,三年以後就要靠自己了。退一步來說,人類總是渴求進步的。在需求層次裡面自我實現就在金字塔的頂端,是人類需求的極緻。既然環境許可,為甚麼不試一試呢?

最後是插圖時間。這次是BAZA老師的插圖!本來我已經看膩了「發動魔法」的姿勢,但老師在其他委託畫這個姿勢又打動了我,所以才有了這張插圖。到底庫里斯的魔法會以何種形式呈現,文中似乎還沒有定論,但在下一章我們或許能窺探一二。只能說いのた老師影響我太多,對庫里斯的構建都成了她筆下的樣子(?)了。