List
For example,
It’s clear that
Then
Plug
Move a double
Let
Insert
By referring to the answer, I found out that my approach above wasn’t correct. I’ve made a mistake that I postulated all disks never change the order during their moves, which is not necessary.
It can be shown that no strategy does better than
This is an equation of the “generalized Josephus” type, whose solution is
We already know
Let the zig-zags be extremely narrow to be seen as straight lines to some extent. So when the
We could also see that when two zig-zags intersect,
And when the
So, in recurrence form
We have
The function
Thus, we cannot find a unique
Let’s represent in terms of
Then we can stop here, so far the function
That is to say
Express
Let
Let
Let
Let
I also checked that for
The recurrence is solvable; hence
Then
I have finished reading the first two chapters of Concrete Mathematics. Here are my notes on the book and solutions to the exercises.
题目链接:Codeforces Hello 2015 (Div.2) - LCM Query 求出某个序列所有给定长度的连续子序列的最小公倍数中的最小值。考虑到有大量询问、无需进行修改,故采用 稀疏表 + 离线处理 的方法。 题目描述出题人喜欢最小公倍数 $({\rm lcm})$,他
整理了 Miller–Rabin 素性测试的原理及实现方法. 为了探究一奇数 $n>1$ 是否为素数, 将其用 $e$ 和 $k$ 来表示, 使得 $n-1=2^ek$, 其中 $k$ 为奇数. 根据 Keith Conrad[1] 的推导, 多项式 $x^{n-1}-1=x^{2^ek}-1
最近学校在教 “信息安全数学基础” 这门课程, 目前讲到了数论的基础知识. 我选择了 Kenneth H. Rosen 著作的《初等数论及其应用》作为辅助教材, 阅读过程中理解了一些有趣的结论, 证明和习题. 目录1. “如果 $a,b$ 和 $c$ 为整数, 且 $c\mid ab,$
Struggled for hours tweaking themes and preferences, I finally end up with this. Hexo was amazing, that simple and elegant writing experience really c
PrefaceBuilding reliable software is hard. The developing of large-scale systems are prone to bugs and insecurities. Computer scientists have responde
PrefaceThese are my notes on Concrete Mathematics. Exercises in this book, compared to their SICP counterparts, are really more challenging. I’m runni
PrefaceThese are my notes on Structure and Interpretation of Computer Programs. To advance my proficiency in written English, I’ll be taking notes in
There’re at least three possible explanations for your clicking on my avatar. If you want to inspect my avatar, here’s a high resolution one. If you w
對它們的我的逃避,事情,列出了它們的白紙。這紙,看著它的我。我的安心。事情的列出,逃避的加深,對此對我的懷疑。 (嘗試儘量讓名詞主導整個句子。看來這個嘗試不是很成功。)