我们如何才能正确地在分数内进行选择格式化?

我们如何才能正确地在分数内进行选择格式化?

我正在尝试格式化下面的文档。

我最初的目标是在分数符号内添加选择符号,这是用户帮助我解决的。有没有更好的方法来格式化此文档以使其看起来更合适?

\documentclass{article} \usepackage{amsmath} \begin{document}

A class has 2n students who must be split up into pairs. We consider two sets of pairs S and T different if at least one pair in the set S isn't a pair in the set T. A pair is unordered, so we consider the pair (1, 2) and (2, 1) to be the same pair. How many different sets of pairs can the class be split up into, in terms of n? (For example, with n = 2, the answer is 3. Sets are {(1, 2), (3, 4)}, {(1, 3), (2, 4)} and {(1, 4), (2, 3)}.)

For the first pair choose $\dbinom{2n}{2}$

For the second pair choose $\dbinom{2n-2}{2}$

For the third pair choose $\dbinom{2n-4}{2}$

The total number  of ways to choose is$\dbinom{2n}{2}$ * $\dbinom{2n-2}{2}$ * $\dbinom{2n-4}{2}$ ... $\dbinom{2}{2}$

Therefore, the total number of different sets of pairs which the class may be split up into, in terms of n, is as follows:

\[ \frac{ \dbinom{2n}{2} * \dbinom{2n-2}{2} * \dbinom{2n-4}{2}...*\dbinom{2}{2} }{n!} \]

  $\frac{2n!}{(2n-2)!2!}$ * $\frac{(2n-2)!}{(2n-4)!2!}$ * ... $\frac{2!}{0!2!}$$\frac{1}{n!}$

= $\frac{2n!}{(2!^nn!}$

\end{document}

文档编译视图

答案1

就我个人而言,我将使用枚举来构造itemize。然后使用align*环境。我将使用\times而不是*。我会在问题和其解决方案之间留出一点空间。

格式

\documentclass{article} 
\usepackage{amsmath}
\usepackage{showframe}
\begin{document}

A class has $2n$ students who must be split up into pairs. We consider two sets of pairs $S$ and $T$ different if at least one pair in the set $S$ isn't a pair in the set $T$. A pair is unordered, so we consider the pair $(1, 2)$ and $(2, 1)$ to be the same pair. 

How many different sets of pairs can the class be split up into, in terms of~$n$? 

\begin{itemize}
\item For example, with $n = 2$, the answer is $3$. The sets are $\{(1, 2), (3, 4)\}$, $\{(1, 3), (2, 4)\}$ and $\{(1, 4), (2, 3)\}$.

\item For the first pair choose $\dbinom{2n}{2}$.

\item For the second pair choose $\dbinom{2n-2}{2}$.

\item For the third pair choose $\dbinom{2n-4}{2}$.

\item The total number  of ways to choose is \[\dbinom{2n}{2}\times \dbinom{2n-2}{2}\times \dbinom{2n-4}{2}\times \dots \times \dbinom{2}{2}.\]
\end{itemize}

Therefore, the total number of different sets of pairs which the class may be split up into, in terms of $n$, is as follows:
\begin{align*}
\frac{ \dbinom{2n}{2} \times \dbinom{2n-2}{2} \times  \dots \times\dbinom{2}{2} }{n!} &= \frac{2n!}{(2n-2)!2!} \times \frac{(2n-2)!}{(2n-4)!2!} \times\dots\times \frac{2!}{0!2!}\times \frac{1}{n!}\\
&= \frac{2n!}{2!^nn!}.
\end{align*}
\end{document}

答案2

您的输入中存在一些不一致之处。例如,表示数学变量或常量的符号应该总是排版为数学。

因此使用A class has $2n$ students; 类似地,

the pair $(1, 2)$ and $(2, 1)$ to be the same pair

即使结果与使用 获得的结果非常相似$,但省略它可能会导致问题,最糟糕的情况是(2, 1)可以跨行拆分,而$(2, 1)$不能。

在算法的演示中使用它\dbinom只是浪费空间;仅在特殊情况下使用它,例如显示大分数。

别忘了关系:你不希望in the set S在 之前拆分S,所以最好输入

in the set~$S$

(带有$,因为它是一个数学变量)。

在正式数学中,星号从不用于表示乘法。对于你的情况,没有哪个符号是最好的。

如果阶乘前面有一个乘法因子,则最好用一个细空格将其与阶乘分开\,

这是我的建议。

\documentclass{article}
\usepackage{amsmath}

\begin{document}

A class has $2n$ students who must be split up into pairs. We consider 
two sets of pairs $S$ and $T$ different if at least one pair in the set~$S$ 
isn't a pair in the set~$T$. A pair is unordered, so we consider the pair
$(1, 2)$ and $(2, 1)$ to be the same pair. How many different sets of pairs 
can the class be split up into, in terms of~$n$? (For example, with $n = 2$, 
the answer is~$3$. Sets are $\{(1, 2), (3, 4)\}$, $\{(1, 3), (2, 4)\}$ and 
$\{(1, 4), (2, 3)\}$.)
\begin{itemize}
\item For the first pair choose $\binom{2n}{2}$,

\item for the second pair choose $\binom{2n-2}{2}$,

\item for the third pair choose $\binom{2n-4}{2}$,

\item and so on.
\end{itemize}

The total number  of ways to choose is
\[
\dbinom{2n}{2}\dbinom{2n-2}{2}\dbinom{2n-4}{2}\dotsm\dbinom{2}{2}.
\]
Therefore, the total number of different sets of pairs which the class may 
be split up into, in terms of~$n$, is as follows:
\begin{align*}
\frac{\dbinom{2n}{2}\dbinom{2n-2}{2}\dbinom{2n-4}{2}\dotsm\dbinom{2}{2}}{n!}
&=
\frac{(2n)!}{(2n-2)!\,2!}\frac{(2n-2)!}{(2n-4)!\,2!}\dotsm\frac{2!}{0!\,2!}\frac{1}{n!}
\\
&=\frac{(2n)!}{(2!)^n\,n!}
\end{align*}

\end{document}

通过一些其他修复:例如2n!与 不一样,(2n)!而您想要后者。

在此处输入图片描述

相关内容