Forgot password?
 Create new account
Search
View: 109|Reply: 6

[组合] $A,B$为$\{1,2,\dots,n\}$的$k$元子集,$\max((A\Delta B)^∁)$在$A\cap B$中的数目

[Copy link]

3150

Threads

8388

Posts

610K

Credits

$\style{scale:11;fill:#eff}꩜$

Credits
65413
QQ

Show all posts

hbghlyj Post time 2024-3-10 00:17 |Read mode
尝试理解一下AoPS帖子
This equals the number of pairs of subsets $A, B \subseteq \{1, \dots, n\}$ of the same size $k$, where such a pair is weighted with $(-1)^k$.

We will group most of these pairs with another pair with the opposite weight as follows: given some $(A, B)$, find the largest $s$ not in $A \Delta B$, and pair $(A, B)$ with $(A \Delta \{s\}, B \Delta \{s\})$.

This is a weight-reversing involution on all the pairs $(A, B)$ with $A \Delta B \ne \{1, \dots, n\}$, so to find the desired sum, we can just examine the pairs $(A, B)$ with $A \Delta B = \{1, \dots, n\}$.

    If $n$ is odd, then $|A| = |B| = \tfrac{n}{2}$, not possible. Thus the sum is $0$.
    If $n$ is even, then $|A| = |B| = \tfrac{n}{2}$. There are $\tbinom{n}{n/2}$ such pairs, and each contributes a weight of $(-1)^n$, for a total of $(-1)^n \tbinom{n}{n/2}$.

To summarize: the answer is
\[ \begin{cases*} 0 & $n$ odd\\ (-1)^n \binom{n}{n/2} & $n$ even. \end{cases*} \]

$A,B$为$U=\{1,2,\dots,n\}$的两个$k$元子集,$A\ne B$,有序对$(A,B)$共有$\binom{\binom{n}{k}}2$个。
这些有序对$(A,B)$可分为3类:
$S_0(n,k)=\#\{(A,B):A\Delta B=U\}$
$S_1(n,k)=\#\{(A,B):A\Delta B\ne U,\max((A\Delta B)^\complement)\in (A\cup B)^\complement\}$
$S_2(n,k)=\#\{(A,B):A\Delta B\ne U,\max((A\Delta B)^\complement)\in A\cap B\}$
那么$S_0(n,k)+S_1(n,k)+S_2(n,k)=\binom{\binom{n}{k}}2$.
显然,$S_0(n,k)=\cases{\binom{n}{k}&if $n=2k$\\0&if $n\ne2k$}$.
问:$S_1(n,k)=?$

730

Threads

110K

Posts

910K

Credits

Credits
93648
QQ

Show all posts

kuing Post time 2024-3-10 00:30
`A\Delta B` 是啥意思麻烦介绍一下。

3150

Threads

8388

Posts

610K

Credits

$\style{scale:11;fill:#eff}꩜$

Credits
65413
QQ

Show all posts

 Author| hbghlyj Post time 2024-3-10 00:31
kuing 发表于 2024-3-9 16:30
`A\Delta B` 是啥意思麻烦介绍一下。

en.wikipedia.org/wiki/Symmetric_difference
${\displaystyle A\,\Delta \,B=(A\cup B)\setminus(A\cap B)=\left(A\setminus B\right)\cup \left(B\setminus A\right),}$
可以画Venn图帮助理解
size(0,150);

pen colour1=red;
pen colour2=green;

pair z0=(0,0);
pair z1=(-1,0);
pair z2=(1,0);
real r=1.5;
path c1=circle(z1,r);
path c2=circle(z2,r);
fill(c1,colour1);
fill(c2,colour2);

picture intersection;
fill(intersection,c1,white);
clip(intersection,c2);

add(intersection);

draw(c1);
draw(c2);

label("$A$",z1);
label("$B$",z2);

pair z=(0,-2);
real m=3;
margin BigMargin=Margin(0,m*dot(unit(z1-z),unit(z0-z)));

draw(Label("$A\mathbin\Delta B$",0,defaultpen),z--z0,invisible,Arrow,BigMargin);
draw(z--z1,Arrow,Margin(0,m));
draw(z--z2,Arrow,Margin(0,m));

shipout(bbox(0.25cm));

3150

Threads

8388

Posts

610K

Credits

$\style{scale:11;fill:#eff}꩜$

Credits
65413
QQ

Show all posts

 Author| hbghlyj Post time 2024-3-10 01:23
用SageMath验证一下:
  1. def S0(n, k):
  2.     if n==2*k:
  3.         return binomial(n,k)
  4.     else:
  5.         return 0
  6. def S1(n, k):
  7.     i = 0
  8.     U = Set(range(1, n+1))
  9.     for A in Subsets(U, k):
  10.         for B in Subsets(U, k):
  11.             complement_symmetric_difference = U.difference(A.symmetric_difference(B))
  12.             if complement_symmetric_difference.is_empty():
  13.                 continue
  14.             intersection = A.intersection(B)
  15.             if max(complement_symmetric_difference) not in intersection:
  16.                 i += 1
  17.     return i
  18. def S2(n, k):
  19.     i = 0
  20.     U = Set(range(1, n+1))
  21.     for A in Subsets(U, k):
  22.         for B in Subsets(U, k):
  23.             complement_symmetric_difference = U.difference(A.symmetric_difference(B))
  24.             if complement_symmetric_difference.is_empty():
  25.                 continue
  26.             intersection = A.intersection(B)
  27.             if max(complement_symmetric_difference) in intersection:
  28.                 i += 1
  29.     return i
  30. # Example:
  31. n = 4
  32. k = 2
  33. print(S1(n,k)==S2(n,k+1))
  34. print(S0(n,k)+S1(n,k)+S2(n,k)==binomial(n,k)^2)
Copy the Code

得到一些恒等式:
$S_1(n,n)=0$
$S_2(n,0)=0$
$S_1(n,k)=S_2(n,k+1)$
$S_0(n,k)+S_1(n,k)+S_2(n,k)=\binom{n}{k}^2$

3150

Threads

8388

Posts

610K

Credits

$\style{scale:11;fill:#eff}꩜$

Credits
65413
QQ

Show all posts

 Author| hbghlyj Post time 2024-3-10 01:54
$\cancel{S_1(n,0)}+S_2(n,0)=\binom{n}{0}^2-S_0(n,0)$
$\cancel{S_1(n,1)}+\cancel{S_2(n,1)}=\binom{n}{1}^2-S_0(n,1)$
$\cancel{S_1(n,2)}+\cancel{S_2(n,2)}=\binom{n}{2}^2-S_0(n,2)$
$\cdots$
$S_1(n,k)+\cancel{S_2(n,k)}=\binom{n}{k}^2-S_0(n,k)$
因為$S_1(n,k)=S_2(n,k+1)$,如果第$i$式乘$(-1)^{i}$求和,划去的项恰好能消掉,且$S_2(n,0)=0$,我们得到
$(-1)^kS_1(n,k)=\sum_{i=0}^k(-1)^{i}\left(\binom{n}{i}^2-S_0(n,i)\right)$
所以
$S_1(n,k)=(-1)^k\sum_{i=0}^k(-1)^{i}\left(\binom{n}{i}^2-S_0(n,i)\right)$

3150

Threads

8388

Posts

610K

Credits

$\style{scale:11;fill:#eff}꩜$

Credits
65413
QQ

Show all posts

 Author| hbghlyj Post time 2024-3-10 01:59
验证了一下,应该是对的🤔
  1. n = 9
  2. k = 3
  3. print(S1(n,k)==(-1)^k*sum([(-1)^i*(binomial(n,i)^2-S0(n,i)) for i in range(k+1)]))
Copy the Code

另外,我发现当$n$为偶数,好像成立$S_1(n,\frac n2)=S_1(n,\frac n2-1)$?
  1. n = 8
  2. print(S1(n,n/2)==S1(n,n/2-1))
Copy the Code

3150

Threads

8388

Posts

610K

Credits

$\style{scale:11;fill:#eff}꩜$

Credits
65413
QQ

Show all posts

 Author| hbghlyj Post time 2024-3-10 02:37
hbghlyj 发表于 2024-3-9 17:59
另外,我发现当$n$为偶数,好像成立$S_1(n,\frac n2)=S_1(n,\frac n2-1)$?

🤔这个能推出$\frac12(-1)^{n}\left(\binom{n}{n/2}^2-\binom{n}{n/2}\right)$
  1. n = 6
  2. print(S1(n,n/2)==1/2*(-1)^n*(binomial(n,n/2)^2-binomial(n,n/2)))
Copy the Code

手机版|悠闲数学娱乐论坛(第3版)

2025-3-6 03:23 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list