Yosemite 小游记
几个星期前,一位小伙伴 wzc 问我有啥娱乐活动。聊着聊着,我们就约起了 Yosemite。于是几天前,我们终于趁着还不需要预约的时候,赶个 ddl 去了趟 Yosemite.
TL;DR 实在是妙啊!不愧是国家公园啊!瀑布量大管饱。
几个星期前,一位小伙伴 wzc 问我有啥娱乐活动。聊着聊着,我们就约起了 Yosemite。于是几天前,我们终于趁着还不需要预约的时候,赶个 ddl 去了趟 Yosemite.
TL;DR 实在是妙啊!不愧是国家公园啊!瀑布量大管饱。
我最近又准备小翻新一下博客了。虽然东西没写多少,但是主题更新的快呀哈哈哈哈哈毕竟差生文具多
一个集合 \(S\) 被称为 sum-free set 当且仅当 \(\forall a, b \in S, a + b \not\in S\)。
试证明:对于任何一个集合 \(A \subseteq \ZZ\backslash\{0\}\),其最大的 sum-free subset 大小至少为 \(|A| / 3\).
(有一个和题面差不多长度的解答)
解答
对于 \(t \sim U[0, 1]\),令 \(A_t := \{x \in A: 1/3 < xt \bmod 1 < 2/3 \}\)。显然 \(A_t\) 为 sum-free set. 最后再注意到 \(\max_t |A_t| \geq \mathbb{E}_t [|A_t|] = |A|/3\) 即可。
解法来自 Erdos。
Recently I'm playing with a new code editor, Zed. I used it for about ten days and here write a review to share my experiences with it. This review is based on the latest version (v0.186.9).
My feelings about Zed are mixed: as an editor, it's pretty good; as a (Python) code editor, it's pretty bad; as an AI code editor, it's reasonable. As of its current state (v0.186.9), it's hard for me to recommend it to colleagues due to its poor Python experience, but I think I'll keep an eye on it.
Update (@2025-05-19): After tuning LSP configurations, the Python experience is much better. See below.
In this post, we are interested in finding all integer and rational solutions for a general binary quadratic equation: \[ \begin{equation} ax^2 + bxy + cy^2 + dx + ey + f = 0, \label{eq:general} \end{equation} \] for any integer coefficients \(a, b, c, d, e, f\). The equation might degenerate; we only point it out when it does but do not solve it, as it's typically easier to solve a degenerate equation.
This post mainly serves as an entry point for a series of posts and also contains a little bit of the story behind the posts. That is why this post has index 0 in the title.
In this post, we are interested in finding all integer solutions of the following equation: \[ \begin{equation} ax^2 + bxy + cy^2 = n. %\label{eq:ibqf} \end{equation} \] where \(acn \neq 0\), \(b^2 - 4ac \neq 0\). This equation can certainly be solved using methods from the generalized Pell equation, but here, we explore other methods.
In this post, we are interested in finding all integer solutions of Pell equation \[ \begin{equation} x^2 - d y^2 = 1, \label{eq:pell} % \tag{Pell Equation} \end{equation} \] and generalized Pell equation \[ \begin{equation} x^2 - d y^2 = n, \label{eq:generalized-pell} % \tag{Generalized Pell Equation} \end{equation} \] for a non-square integer \(d > 0\) and \(n \neq 0\).
In this post, we're interested in finding all integer solutions of a binary quadratic equation: \[ \begin{equation} ax^2 + by^2 = n, \label{eq:ellipse} \end{equation} \] for \(a, b, n > 0\).
In this post, we're interested in finding any or all integer solutions of a binary quadratic equation: \[ x^2 - ny - a = 0. \] We assume that the equation is non-degenerate in the sense that \(n \neq 0\).
In this post, we're interested in finding any or all rational solutions of the following equation: \[ ax^2 + by^2 + c = 0, \] or alternatively, all integer solutions to the Legendre equation: \[ \begin{equation} ax^2 + by^2 + cz^2 = 0, \label{eq:legendre} % \tag{Legendre Equation} \end{equation} \] where \(abc \neq 0\).