符号


博客符号&记号参照表

这里约定了本博客中的一些数学记号的含义。

一些早期文章可能不遵循该规则,但基本不影响阅读。

比如自然常数 $\mathrm{e}$ 也是在本人学了离心率 $e$ 之后才区分写法的。


一、常用

$\mathcal{O}(f(n))$ :渐进上界记号,用于表示算法的复杂度上界。

$a \gets b+c$ :将变量 $a$ 赋值为 $b+c$

$a\uparrow b+c$ :表示 $a\gets \max\{a,b+c\}$ ,其中 $\uparrow$ 的优先级极低。有时表示 a += b+c ,会特殊说明。

$a\downarrow b+c$ :表示 $a\gets \min\{a,b+c\}$ ,其中 $\downarrow$ 的优先级极低。

$\land$ :逻辑与。一般用 $\&$ 或者 $\mathrm{and}$ 表示二进制按位与。

$\lor$ :逻辑或。一般用 $\mathrm{or}$ 表示二进制按位或。

$[p(x)]=\begin{cases}1,&p(x)=\mathtt{true} \\ 0,&p(x)=\mathtt{false}\end{cases}$

$n!$ :表示 $n$ 的阶乘。注意 $2n!$ 表示 $2\times n!$ ,$(2n)!$ 表示 $2n$ 的阶乘。

$\sum a_i$ :对序列/数组 $a_i$ 求和。

$\prod a_i$ :对序列/数组 $a_i$ 求积。

$\bigoplus_{i=1}^{n} x_i = x_1 \oplus x_2 \oplus \cdots \oplus x_n$ ,其中 $\oplus$ 一般表示二进制按位异或。

$\binom{n}{m}$ 或 $\mathrm{C}_n^{m}$ :从 $n$ 个不同元素中取 $m(m\le n)$ 个不同元素的方案数。

$\binom{r}{n} = \prod_{k=1}^{n}\frac{r - k + 1}{k}\quad(r \in \mathbb{C})$ ,即二项式系数。

$f^n(x)$ :表示 $f$ 的 $n$ 次复合,即 $f(f(\cdots f(x)))$ ,其中有 $n$ 个 $f$ 。

$f^{(n)}(x)$ :表示 $f$ 的 $n$ 阶导数。一般用 $f^{\prime}(x)$ 表示一阶导数,$f^{\prime \prime}(x)$ 表示二阶导数。

$f^{\star}(x)=k$ :最小的 $n$ 使得 $f^{n}(x) = k$ ,注意这里是 $n$ 次复合。例如 $\mathcal{O}(\varphi^{\star}(x)=1)$ 。

$[x^n]f(x)$ :表示 $f(x)$ 的第 $n$ 项系数。

${\displaystyle \int f(x)\,dx}$ :表示 $f(x)$ 的不定积分。

$\left.x^2+x\right|_{x=2}$ 将 $x$ 赋值为 $2$ 后的答案。

$\varphi,\varepsilon,\vartheta,\pi,\mathrm{e}$ 前三个是个人书写习惯而使用,后面对应圆周率和自然常数(注意与离心率 $e$ 区分)


二、数论函数

$\gcd(a,b)$ :整数 $a,b$ 的最大公约数(最大公约数为非负整数)。

$\mathrm{lcm}(a,b)$ :整数 $a,b$ 的最小公倍数(最大公约数为非负整数)。

$\varphi(n)$ :一般指欧拉函数。

$\mu(n)$ :一般指莫比乌斯函数。

$\pi(n)$ :一般指素数计数函数。

$\omega(n)$ :一般指 $n$ 的不同素因子个数。

$d(n)$ :一般指 $n$ 的因子个数。

$n \le$ $10^{1}$ $10^{2}$ $10^{3}$ $10^{4}$ $10^{5}$ $10^{6}$ $10^{7}$ $10^{8}$ $10^{9}$
$\max\{\omega(n)\}$ $\tt{2}$ $\tt{3}$ $\tt{4}$ $\tt{5}$ $\tt{6}$ $\tt{7}$ $\tt{8}$ $\tt{8}$ $\tt{9}$
$\max\{d(n)\}$ $\tt{4}$ $\tt{12}$ $\tt{32}$ $\tt{64}$ $\tt{128}$ $\tt{240}$ $\tt{448}$ $\tt{768}$ $\tt{1344}$
$n \le$ $10^{10}$ $10^{11}$ $10^{12}$ $10^{13}$ $10^{14}$ $10^{15}$ $10^{16}$ $10^{17}$ $10^{18}$
$\max\{\omega(n)\}$ $\tt{10}$ $\tt{10}$ $\tt{11}$ $\tt{12}$ $\tt{12}$ $\tt{13}$ $\tt{13}$ $\tt{14}$ $\tt{15}$
$\max\{d(n)\}$ $\tt{2304}$ $\tt{4032}$ $\tt{6720}$ $\tt{10752}$ $\tt{17280}$ $\tt{26880}$ $\tt{41472}$ $\tt{64512}$ $\tt{103680}$

三、变量&函数命名

因为是 OIer ,所以有些变量的定义不止一个字母。

下面这些都是常用的含义,如果有区别会在文章内特别说明的。

$\epsilon$ :一般表示较小的常数,或者精度范围(如 eps=1e-14 )等含义。

$\mathtt{ans}$ :通常表示答案。是 $\mathtt{answer}$ 的缩写。

$\mathtt{sz}_u$ 或 $\mathtt{size}(u)$ : 一般表示某个集合 $u$ 的大小,或者 $u$ 所在子树的大小等含义。

$dp[i][j]$ 或 $f_{i,j}$ :dp的状态,更正式的写法应该是 $f(i,j)$ ,可能算一个二元函数。

$\mathtt{rt}(u)$ 或 $\mathtt{rt}_u$ :一般表示 $u$ 所在的树的根结点,是 $\mathtt{root}$ 的缩写。

$\mathtt{popc}(A)$ :表示集合 $A$ 的基数(元素个数),源于函数 __builtin_popcount()


四、集合

$\bigcup_{i=1}^{n} A_i = A_1 \cup A_2 \cup \cdots \cup A_n$ 。

$\bigcap_{i=1}^{n} A_i = A_1 \cap A_2 \cap \cdots \cap A_n$ 。

$A\setminus B$ :$B$ 对 $A$ 的相对补集(可以理解为 $A$ 去掉 $A\cap B$ 后剩余的部分)

$\sim!A$ :$A$ 的绝对补集(对于全集的补集)


Author: q779
Reprint policy: All articles in this blog are used except for special statements CC BY-NC-ND 4.0 reprint polocy. If reproduced, please indicate source q779 !
评论
  TOC