Forgot password
 Register account
View 1026|Reply 3

[组合] 用三种颜色的珠子各若干个穿成固定数目的珠串的组合数

[Copy link]

126

Threads

430

Posts

1

Reputation

Show all posts

TSC999 posted 2021-7-4 23:33 |Read mode
Last edited by hbghlyj 2025-5-16 02:46有大小相同的珠子共 9 个,其中黄色的 4 颗,绿色的 4 颗,红色的 1 颗。用它们穿成 9 颗珠子的手串,有多少种不同的花色组合?

例如下面只是其中一小部分组合:

不需要列出所有的花色图案,只须解出正确的组合数目即可。

可以参考常新德(河南永城职业学院老师)写的论文。网址:max.book118.com/html/2017/0729/125132578.shtm

126

Threads

430

Posts

1

Reputation

Show all posts

original poster TSC999 posted 2021-7-14 23:10
Last edited by hbghlyj 2025-5-16 02:49有重复元素的圆排列和环排列计数公式。
第一步,先按下式求出有重复元素的圆排列计数 $Q$$$Q=\frac{1}{s} \sum_{d \mid D}\left(\varphi(d)\left(\frac{s}{d}\right)!/ \prod_{i=1}^m\left(\frac{n_i}{d}\right)!\right)$$式中 $s=\sum_{i=1}^m n[i], \varphi(d)$ 为欧拉函数。 $d$ 是 $D$ 的所有约数,包括 1 和 $D$ 本身。
第二步,算出 $Q$ 中的对称圆排列数 $M$,当 $n_i$ 中多于两个奇数时,$M=0$,否则 $M=\left(\sum_{i=1}^m\left\lfloor\frac{n[i]}{2}\right\rfloor\right)!/ \prod_{i=1}^m\left\lfloor\frac{n[i]}{2}\right\rfloor!$ 种,$\left\lfloor\frac{n[i]}{2}\right\rfloor$ 表示取整。
第三步,环排列数 $\Phi=\frac{Q+M}{2}$。

MMA 写的程序代码:
  1. Clear["Global`*"];  
  2. m = 3; n[1] = 4; n[2] = 4; n[3] = 1;
  3. k = 1;  (* n[i]奇数个数 *)
  4. s = \!\(
  5. \*UnderoverscriptBox[\(\[Sum]\), \(i = 1\), \(m\)]\(n[i]\)\);
  6. Q = (Sum[EulerPhi[d] *(s/d)!/\!\(
  7. \*UnderoverscriptBox[\(\[Product]\), \(i = 1\), \(m\)]\(\((
  8. \*FractionBox[\(n[i]\), \(d\)])\)!\)\), {d,
  9.      Divisors[GCD[n[1], n[2], n[3]]]}])/s;(*圆排列数*)
  10. If[k < 3, M = (\!\(
  11. \*UnderoverscriptBox[\(\[Sum]\), \(i = 1\), \(m\)]\(\[LeftFloor]
  12. \*FractionBox[\(n[i]\), \(2\)]\[RightFloor]\)\))!/\!\(
  13. \*UnderoverscriptBox[\(\[Product]\), \(i = 1\), \(m\)]\(\[LeftFloor]
  14. \*FractionBox[\(n[
  15.         i]\), \(2\)]\[RightFloor]!\)\), 0];  (*圆排列中的对称排列数*)
  16. \[CapitalPhi] = ((Q + M)/2)(*环排列数*)
Copy the Code
运行结果为  38。

126

Threads

430

Posts

1

Reputation

Show all posts

original poster TSC999 posted 2021-7-14 23:22
常新德老师的论文中,关于 M 的计算,少说了一句话,折腾了好几天,没有弄明白。这句话就是当那个奇数个数多于 2 个时 M=0,就没有必要算了,如果还是按公式计算,则算出的结果是不对的。

4

Threads

137

Posts

12

Reputation

Show all posts

Aluminiumor posted 2025-5-16 02:06
根据我的帖子,容易计算得:
$$\frac{1}{18}\left(\frac{9!}{4!4!1!}+9\times\frac{4!}{2!2!}\right)=38$$
Wir müssen wissen, wir werden wissen.

Quick Reply

Advanced Mode
B Color Image Link Quote Code Smilies
You have to log in before you can reply Login | Register account

$\LaTeX$ formula tutorial

Mobile version

2025-7-20 06:00 GMT+8

Powered by Discuz!

Processed in 0.019398 seconds, 42 queries