当前位置:网站首页>[learning notes] matroid
[learning notes] matroid
2022-07-04 15:04:00 【OneInDark】
“ Matroids are of vector space ‘ Linearly independent ’ Extension of concept .” —— Zhihu net friend
use ⊊ \subsetneq ⊊ Express “ Not included in ”.
one 、 Definition
1. Matroid
Matroid ( M a t r o i d \rm Matroid Matroid) M = ( U , I ) \mathcal M=(\Bbb U,\mathcal I) M=(U,I), among I \mathcal I I yes U \Bbb U U Set family on , Satisfy
- genetic : about I ∈ I , J ⊆ I I\in\mathcal I,\;J\subseteq I I∈I,J⊆I Yes J ∈ I J\in\mathcal I J∈I .
- Base exchangeability or Expansibility : about I , J ∈ I , ∣ I ∣ < ∣ J ∣ I,J\in\mathcal I,\;|I|<|J| I,J∈I,∣I∣<∣J∣ Yes ∃ x ∈ J ∖ I \exists x\in J\setminus I ∃x∈J∖I bring I ∪ { z } ∈ I I\cup\{z\}\in\mathcal I I∪{ z}∈I .
It may be stipulated that ∣ I ∣ ≠ 0 |\mathcal I|\ne 0 ∣I∣=0, therefore ∅ ∈ I \varnothing\in\mathcal I ∅∈I .
about I ∈ I I\in\mathcal I I∈I, call I I I by Independent set , namely I I I It's independent . Otherwise, it is called I I I Not independent .
2. Base and ring
The base ( b a s i s \rm basis basis) Is a maximal independent set , Ring ( c i r c u i t \rm circuit circuit) Is a minimal dependent set .
Lemma 1. All bases in the matrix have the same size .
Corollary 1. For different rings X , Y X,Y X,Y, If exist e ∈ X ∩ Y e\in X\cap Y e∈X∩Y, be X + Y − { e } X+Y-\{e\} X+Y−{ e} Is not independent .
Proof. There is obviously f ∈ X ∖ Y f\in X\setminus Y f∈X∖Y, set up Z Z Z by X ∪ Y X\cup Y X∪Y Contained in the X ∖ { f } X\setminus\{f\} X∖{ f} The largest independent set of , because Y ⊊ Z Y\subsetneq Z Y⊊Z have to ∣ Z ∣ < ∣ X + Y − { f } ∣ = ∣ X + Y − { e } ∣ |Z|<|X+Y-\{f\}|=|X+Y-\{e\}| ∣Z∣<∣X+Y−{ f}∣=∣X+Y−{ e}∣, because Z Z Z It's the biggest , So the original proposition is proved . ■ \blacksquare ■
Corollary 2. about I ∈ I I\in\mathcal I I∈I, if I ∪ { e } ∉ I I\cup\{e\}\notin\mathcal I I∪{ e}∈/I be I ∪ { e } I\cup\{e\} I∪{ e} There is a unique ring in .
Proof. If there are two rings C 1 , C 2 C_1,C_2 C1,C2, obviously e ∈ C 1 ∩ C 2 e\in C_1\cap C_2 e∈C1∩C2, from corollary 1 \text{corollary 1} corollary 1 know C 1 + C 2 − { e } C_1+C_2-\{e\} C1+C2−{ e} Not independent , And I I I It is the contradiction of independent sets . ■ \blacksquare ■
3. Rank function
about S ⊆ U S\subseteq\Bbb U S⊆U, Definition Rank ( function ) r ( S ) r(S) r(S) by S S S The size of the maximal independent set in .
- Boundedness : 0 ⩽ r ( S ) ⩽ ∣ S ∣ 0\leqslant r(S)\leqslant |S| 0⩽r(S)⩽∣S∣ .
- monotonicity : ∀ A ⊆ B \forall A\subseteq B ∀A⊆B Yes r ( A ) ⩽ r ( B ) r(A)\leqslant r(B) r(A)⩽r(B) .
- Submodularity ( submodular \text{submodular} submodular, Also called submodule ): r ( A ∪ B ) + r ( A ∩ B ) ⩽ r ( A ) + r ( B ) r(A\cup B)+r(A\cap B)\leqslant r(A)+r(B) r(A∪B)+r(A∩B)⩽r(A)+r(B) .
Proof. prove r ( A ∪ { x } ) − r ( A ) ⩽ r ( B ∪ { x } ) − r ( B ) r(A\cup\{x\})-r(A)\leqslant r(B\cup\{x\})-r(B) r(A∪{ x})−r(A)⩽r(B∪{ x})−r(B) among B ⊆ A B\subseteq A B⊆A It's ordinary . And then from * A , A ∩ B * \langle A,\;A\cap B\rangle *A,A∩B* Start , take B ∖ A B\setminus A B∖A Join... One by one A A A Then we get * A ∪ B , A ∩ B * \langle A\cup B,\;A\cap B\rangle *A∪B,A∩B*, Join in A ∩ B A\cap B A∩B Then we get * A , B * \langle A,B\rangle *A,B*, Already joined S S S when , The former is gathering A + S A+S A+S Internal increase , The latter in ( A ∩ B ) + S (A\cap B)+S (A∩B)+S Internal increase , Bigger . ■ \blacksquare ■
4. Define by rank
“ We transform the combinatorial problem of matroids into algebraic problems on rank functions , The properties of matroids are obtained by studying the properties of rank functions .”
According to the rank function satisfying the above three properties r : 2 S ↦ N + r:2^S\mapsto\mathbb{N}^+ r:2S↦N+, We can redefine matroids M = ( U , I ) \mathcal M=(\Bbb U,\mathcal I) M=(U,I), among I = { I : r ( I ) = ∣ I ∣ } \mathcal I=\{I:r(I)=|I|\} I={ I:r(I)=∣I∣} .
Proof. genetic : if r ( B ) = ∣ B ∣ , A ⊆ B r(B)=|B|,\;A\subseteq B r(B)=∣B∣,A⊆B, from Submodularity
know r ( B ) ⩽ r ( A ) + r ( B ∖ A ) r(B)\leqslant r(A)+r(B\setminus A) r(B)⩽r(A)+r(B∖A), from Boundedness
know r ( A ) = ∣ A ∣ r(A)=|A| r(A)=∣A∣ .
Exchangeability : Reduction to absurdity , set up B = { b 1 , b 2 , … , b ∣ B ∣ } B=\{b_1,b_2,\dots,b_{|B|}\} B={ b1,b2,…,b∣B∣}, be r ( A ∪ { b i } ) = ∣ A ∣ r(A\cup\{b_i\})=|A| r(A∪{ bi})=∣A∣ . Prove by induction r ( A ∪ { b 1 , b 2 , … , b n } ) = ∣ A ∣ r(A\cup\{b_1,b_2,\dots,b_n\})=|A| r(A∪{ b1,b2,…,bn})=∣A∣ . Yes n > 1 n>1 n>1, take X = A ∪ { b 1 , b 2 , … , b n − 1 } , Y = A ∪ { b n } X=A\cup\{b_1,b_2,\dots,b_{n-1}\},\;Y=A\cup\{b_n\} X=A∪{ b1,b2,…,bn−1},Y=A∪{ bn}, from Submodularity
Yes r ( A ∪ { b 1 , b 2 , … , b n } ) + r ( A ) ⩽ r ( X ) + r ( Y ) r(A\cup\{b_1,b_2,\dots,b_n\})+r(A)\leqslant r(X)+r(Y) r(A∪{ b1,b2,…,bn})+r(A)⩽r(X)+r(Y), from r ( A ) = r ( X ) = r ( Y ) = ∣ A ∣ ⩽ r ( A ∪ { b 1 , b 2 , … , b n } ) r(A)=r(X)=r(Y)=|A|\leqslant r(A\cup\{b_1,b_2,\dots,b_n\}) r(A)=r(X)=r(Y)=∣A∣⩽r(A∪{ b1,b2,…,bn}) Knowledge induction is established .
However r ( B ) = ∣ B ∣ > r ( A ∪ B ) = ∣ A ∣ r(B)=|B|>r(A\cup B)=|A| r(B)=∣B∣>r(A∪B)=∣A∣ A violation of the monotonicity
. ■ \blacksquare ■
Ii. 、 Linear matroids and linear representations
“ Our linear matroids are the big brother of your graph matroids !”
Linear matroid ( linear matroid \text{linear matroid} linear matroid) namely U \Bbb U U Is a set of vectors , and I = { I ∈ 2 U : dim ( span ( I ) ) = ∣ I ∣ } \mathcal I=\{I\in 2^{\Bbb U}:\dim(\text{span}(I))=|I|\} I={ I∈2U:dim(span(I))=∣I∣} Special matroid of .
The linear table out ( linear representation \text{linear representation} linear representation) the U \Bbb U U Each element in the is mapped to a vector , So that the linear matroids of these vectors are obtained I \mathcal I I Is the independent set family of primitive matroids .
Press : As O I e r \rm OIer OIer I don't want to study the base field of vector space , Therefore, the relevant content is briefly written
If matroids can be expressed linearly , The problem becomes linear matroid .
1. Uniform matroid
Uniform matroid ( uniform matroid \text{uniform matroid} uniform matroid) by I = { I : ∣ I ∣ ⩽ k } \mathcal I=\{I:|I|\leqslant k\} I={ I:∣I∣⩽k} .
It can be linearly expressed as k k k Dimension vector v i = ( 1 , α i , α i 2 , … , α i k − 1 ) v_i=(1,\alpha_i,\alpha_i^2,\dots,\alpha_i^{k-1}) vi=(1,αi,αi2,…,αik−1), among { α i } \{\alpha_i\} { αi} It's two different non-zero elements : exceed k k k A positive linear correlation , But not more than k k k Time , The determinant of vandermond matrix is ∏ i < j ( α j − α i ) ≠ 0 \prod_{i<j}(\alpha_j-\alpha_i)\ne 0 ∏i<j(αj−αi)=0, So linear is irrelevant .
2. Graph matroid
Graph matroid ( graph matroid \text{graph matroid} graph matroid) Defined in an undirected graph G = ( V , E ) G=(V,E) G=(V,E) On , U = E \Bbb U=E U=E and I \mathcal I I Is a set family of edge sets that do not form rings .
to E E E Arbitrary orientation , Opposite side e = ( u , v ) e=(u,v) e=(u,v), vector v e v_e ve In the u u u Weishang is 1 1 1, In the v v v Weishang is − 1 -1 −1 . It is not difficult to verify its correctness .
“ Graph matroids are regular matroids ; The count of the basis of any regular matroid can be obtained by calculating the determinant of an incidence matrix , The matrix tree theorem is a special case .”
3 、 Optimization problems
1. Most powerful independent set
Given a function ω : U ↦ R \omega:\Bbb U\mapsto\Reals ω:U↦R, seek max I ∈ I ∑ x ∈ I ω ( x ) \max_{I\in\mathcal I}\sum_{x\in I}\omega(x) maxI∈I∑x∈Iω(x) . obviously ω ( x ) ⩽ 0 \omega(x)\leqslant 0 ω(x)⩽0 Can be ignored .
Just put the U \Bbb U U The inner element follows ω \omega ω Monotonous sequence , Then linear scanning , Join as soon as you can .
Proof. Make X = { x 1 , x 2 , … , x r } X=\{x_1,x_2,\dots,x_r\} X={ x1,x2,…,xr} Is the real maximum weight independent set , among ω ( x i ) \omega(x_i) ω(xi) Monotony does not increase , remember X n = { x 1 , x 2 , … , x n } X_n=\{x_1,x_2,\dots,x_n\} Xn={ x1,x2,…,xn} . Make S n S_n Sn To join the second n n n Independent set obtained after elements , To prove by induction ω ( S n ) ⩾ ω ( X n ) \omega(S_n)\geqslant\omega(X_n) ω(Sn)⩾ω(Xn) . Yes n ⩾ 1 n\geqslant 1 n⩾1, set up { u } = S n ∖ S n − 1 \{u\}=S_n\setminus S_{n-1} { u}=Sn∖Sn−1, according to Expansibility
Yes ∃ v ∈ X n ∖ S n − 1 \exists v\in X_n\setminus S_{n-1} ∃v∈Xn∖Sn−1 bring S n − 1 ∪ v ∈ I S_{n-1}\cup v\in\mathcal I Sn−1∪v∈I, However, according to the algorithm flow ω ( u ) ⩾ ω ( v ) \omega(u)\geqslant\omega(v) ω(u)⩾ω(v), according to X X X Sort by ω ( v ) ⩾ ω ( x n ) \omega(v)\geqslant\omega(x_n) ω(v)⩾ω(xn), therefore ω ( S n ) = ω ( S n − 1 ∪ { u } ) ⩾ ω ( X n − 1 ) + ω ( x n ) = ω ( X n ) \omega(S_n)=\omega(S_{n-1}\cup\{u\})\geqslant\omega(X_{n-1})+\omega(x_n)=\omega(X_n) ω(Sn)=ω(Sn−1∪{ u})⩾ω(Xn−1)+ω(xn)=ω(Xn) . ■ \blacksquare ■
notes : among ω ( S ) \omega(S) ω(S) yes ∑ x ∈ S ω ( x ) \sum_{x\in S}\omega(x) ∑x∈Sω(x) Abbreviation . The following questions may also be abbreviated .
2. Minimum weight basis
Given a function ω : U ↦ R \omega:\Bbb U\mapsto\Reals ω:U↦R, seek min ∣ I ∣ = r ( I ) = r ( U ) ∑ x ∈ I ω ( x ) \min_{|I|=r(I)=r(\Bbb U)}\sum_{x\in I}\omega(x) min∣I∣=r(I)=r(U)∑x∈Iω(x) .
Process and Most powerful independent set
equally , It just can't be removed ω ( x ) ⩾ 0 \omega(x)\geqslant 0 ω(x)⩾0 Of .
3. Max min weighted ring
unfortunately , The maximum weighted ring is ω = 1 \omega=1 ω=1 The existence of Hamiltonian paths can be determined on the graph matroid of , So it is NP-hard \text{NP-hard} NP-hard .
The minimum weighted ring can be reduced to Even Set \text{Even Set} Even Set On the issue of , and Even Set \text{Even Set} Even Set yes NPC \text{NPC} NPC problem , Therefore, the minimum weighted ring is also NP-hard \text{NP-hard} NP-hard .
boss 、 Matroid operation
1. Dual matroids
M ∗ = ( U , I ∗ ) \mathcal M^*=(\Bbb U,\mathcal I^*) M∗=(U,I∗) yes M = ( U , I ) \mathcal M=(\mathbb{U},\mathcal I) M=(U,I) Of Dual matroids ( dual matroid \text{dual matroid} dual matroid), among I ∗ = { I : ∃ B is basis of M , B ⊆ U ∖ I } \mathcal I^*=\{I:\exists B\text{ is basis of }\mathcal M,\;B\subseteq\mathbb{U}\setminus I\} I∗={ I:∃B is basis of M,B⊆U∖I} .
let me put it another way , remember B ( M ) \mathcal{B(M)} B(M) by M \mathcal M M All of the b a s i s \rm basis basis Set family of , be B ( M ∗ ) = { U − I : I ∈ B ( M ) } \mathcal{B(M^*)}=\{\Bbb U-I:I\in\mathcal{B(M)}\} B(M∗)={ U−I:I∈B(M)} .
Proof. Direct proof is slightly difficult ; use Define by rank
The method is feasible .
r ∗ ( S ) = max { ∣ S ∖ B ∣ : B ∈ B ( M ) } = ∣ S ∣ − min { ∣ S ∩ B ∣ : B ∈ B ( M ) } = ∣ S ∣ − r ( U ) + max { ∣ B ∩ ( U ∖ S ) ∣ : B ∈ B ( M ) } = ∣ S ∣ − r ( U ) + r ( U ∖ S ) \begin{aligned} r^*(S)&=\max\{|S\setminus B|:B\in\mathcal{B(M)}\}\\ &=|S|-\min\{|S\cap B|:B\in\mathcal{B(M)}\}\\ &=|S|-r(\Bbb U)+\max\{|B\cap(\Bbb U\setminus S)|:B\in\mathcal{B(M)}\}\\ &=|S|-r(\Bbb U)+r(\Bbb U\setminus S) \end{aligned} r∗(S)=max{ ∣S∖B∣:B∈B(M)}=∣S∣−min{ ∣S∩B∣:B∈B(M)}=∣S∣−r(U)+max{ ∣B∩(U∖S)∣:B∈B(M)}=∣S∣−r(U)+r(U∖S)
Boundedness 、 Monotonicity is obvious . Just verify the Submodularity . It is not difficult to find that at this time ∣ S ∣ − r ( U ) |S|-r(\Bbb U) ∣S∣−r(U) Can eliminate , In fact, it is equivalent to “ The submodular function is still submodular after taking the complement ”. And this is t r i v i a l \rm trivial trivial Of . ■ \blacksquare ■
2. Delete and shrink
about M = ( U , I ) \mathcal M=(\Bbb U,\mathcal I) M=(U,I) and S ⊆ U S\subseteq\Bbb U S⊆U, Definition M \mathcal M M Delete S S S The matroid of is ( U ∖ S , I ′ ) (\Bbb U\setminus S,\;\mathcal I') (U∖S,I′) among I ′ = { I : I ∈ I , I ⊆ U ∖ S } \mathcal I'=\{I:I\in\mathcal I,\;I\subseteq\Bbb U\setminus S\} I′={ I:I∈I,I⊆U∖S}, Write it down as M ∖ S \mathcal M\setminus S M∖S . Definition M \mathcal M M shrinkage S S S The matroid of is ( M ∗ ∖ S ) ∗ (\mathcal M^*\setminus S)^* (M∗∖S)∗, Write it down as M / S \mathcal M/S M/S .1
The former no longer considers these elements . The latter is equivalent to S S S The base within must be selected —— stay M ∗ \mathcal M^* M∗ Removing the S S S, That is, we have to choose .
Of course, it can also be from r r r From the perspective of function , Yes r M / S ( Z ) = r M ( Z ∪ S ) − r M ( S ) r_{\mathcal M/S}(Z)=r_{\mathcal M}(Z\cup S)-r_{\mathcal M}(S) rM/S(Z)=rM(Z∪S)−rM(S) .
These operations are closed to matroids , This can be done by r r r Function proof . Here I choose to believe the paper .
3. Minima
M \mathcal M M after d e l e t i o n \rm deletion deletion and c o n t r a c t i o n \rm contraction contraction Any matroid obtained M ′ \mathcal M' M′ yes M \mathcal M M Of Minima .
“ Say... Loosely , The minimal element of the matroid can be seen as a local feature of the original matroid .”
4. Matroid and
For a given k k k Matroids M i = ( U i , I i ) ( 1 ⩽ i ⩽ k ) \mathcal M_i=(\Bbb U_i,\mathcal I_i)\;(1\leqslant i\leqslant k) Mi=(Ui,Ii)(1⩽i⩽k), Define this k k k individual Union of matroids by M = ( U , I ) \mathcal M=(\Bbb U,\mathcal I) M=(U,I), among U = ⋃ i = 1 k U i , I = { ⋃ j = 1 k I j : ∀ j , I j ∈ I j } \Bbb U=\bigcup_{i=1}^{k}\Bbb U_i,\;\mathcal I=\{\bigcup_{j=1}^{k}I_j:\forall j,\;I_j\in\mathcal I_j\} U=⋃i=1kUi,I={ ⋃j=1kIj:∀j,Ij∈Ij} .
Its heredity and expansibility are obvious , That is, the operation is closed .
For the time being, skip the change law of its rank function , And independent set decision method .
Please remind me to make it up later.
wu 、 Matroid intersection
Hungarian algorithm is the origin of everything!—— Bipartite graph matching is the intersection of matroids , Again matroid and .
because Matroid intersection
It is not closed on matroids , So it is not listed in Matroid operation
among .
l l l- Matroid intersection ( l -matroid intersection l\text{-matroid intersection} l-matroid intersection): Given M i = ( U , I i ) ( 1 ⩽ i ⩽ l ) \mathcal M_i=(\Bbb U,\mathcal I_i)\;(1\leqslant i\leqslant l) Mi=(U,Ii)(1⩽i⩽l), seek max { I : ∀ j ∈ [ 1 , l ] , I ∈ I j } \max\{I:\forall j\in[1,l],\;I\in\mathcal I_j\} max{ I:∀j∈[1,l],I∈Ij} .
Theorem 1. 3 3 3- The intersection problem of matroids is NPC \text{NPC} NPC problem .
Proof. The Hamiltonian path problem on a bipartite graph is NPC \text{NPC} NPC Of . On two points , Define matroids as “ Edge sets do not share vertices of this part ”, Then intersect with the graph matroid , We can find the Hamilton path on the bipartite graph , therefore 3 3 3- The intersection problem of matroids is NPC \text{NPC} NPC Of . ■ \blacksquare ■
So we only learn the following P P P Of 2 2 2- Just cross the matroid !
Theorem 2.( Max min theorem ) max { ∣ I ∣ : I ∈ I 1 ∩ I 2 } = min S ⊆ U { r 1 ( S ) + r 2 ( U ∖ S ) } \max\{|I|:I\in\mathcal{I}_1\cap\mathcal{I}_2\}=\min_{S\subseteq\Bbb U}\{r_1(S)+r_2(\Bbb U\setminus S)\} max{ ∣I∣:I∈I1∩I2}=minS⊆U{ r1(S)+r2(U∖S)} .
The simple side , namely LHS ⩽ RHS \text{LHS}\leqslant\text{RHS} LHS⩽RHS It's obvious . The proof of equivalence is the constructive algorithm .
1. Strong base exchange theorem
Definition Closure ( closure \text{closure} closure) operator clos ( A ) = { x ∈ U : r ( A ∪ { x } ) = r ( A ) } \text{clos}(A)=\{x\in\Bbb U:r(A\cup\{x\})=r(A)\} clos(A)={ x∈U:r(A∪{ x})=r(A)} .
Lemma 2. if A ⊆ S A\subseteq S A⊆S be clos ( A ) ⊆ clos ( S ) \text{clos}(A)\subseteq\text{clos}(S) clos(A)⊆clos(S) .
Proof. x ∈ clos ( A ) x\in\text{clos}(A) x∈clos(A) Equivalent to A A A Some base of B B B Satisfy B ∪ { x } ∉ I B\cup\{x\}\notin\mathcal I B∪{ x}∈/I, and S S S Existential basis B ′ ⊇ B B'\supseteq B B′⊇B, therefore x ∈ clos ( S ) x\in\text{clos}(S) x∈clos(S) Set up immediately . ■ \blacksquare ■
Lemma 3. if x ∈ clos ( A ) x\in\text{clos}(A) x∈clos(A) be clos ( clos ( A ) ) = clos ( A ) = clos ( A ∪ { x } ) \text{clos}(\text{clos}(A))=\text{clos}(A)=\text{clos}(A\cup\{x\}) clos(clos(A))=clos(A)=clos(A∪{ x}) .
Theorem 3.( Strong base exchange theorem ) about M \mathcal M M Two different bases of A , B A,B A,B, about ∀ x ∈ A ∖ B \forall x\in A\setminus B ∀x∈A∖B All exist y ∈ B ∖ A y\in B\setminus A y∈B∖A bring A − { x } + { y } A-\{x\}+\{y\} A−{ x}+{ y} and B − { y } + { x } B-\{y\}+\{x\} B−{ y}+{ x} Are the basis of matroids .
Proof. from corollary 2 \text{corollary 2} corollary 2 have to B + { x } B+\{x\} B+{ x} Contains a unique ring C ⊇ { x } C\supseteq\{x\} C⊇{ x} . obviously x ∈ clos ( C − { x } ) x\in\text{clos}(C-\{x\}) x∈clos(C−{ x}), from lemma 2,3 \text{lemma 2,3} lemma 2,3 Yes clos ( ( A ∪ C ) ∖ { x } ) = clos ( A ∪ C ) = U \text{clos}((A\cup C)\setminus\{x\})=\text{clos}(A\cup C)=\Bbb U clos((A∪C)∖{ x})=clos(A∪C)=U, Therefore exist M \mathcal M M Base A ′ ⊆ ( A ∪ C ) ∖ { x } A'\subseteq(A\cup C)\setminus\{x\} A′⊆(A∪C)∖{ x} . from Exchangeability
, There is y ∈ A ′ ∖ ( A − { x } ) y\in A'\setminus(A-\{x\}) y∈A′∖(A−{ x}) bring A − { x } + { y } A-\{x\}+\{y\} A−{ x}+{ y} yes M \mathcal M M Base .
be aware A ′ ∖ ( A − { x } ) ⊆ ( ( A ∪ C ) ∖ { x } ) ∖ ( A − { x } ) ⊆ C ∖ { x } A'\setminus(A-\{x\})\subseteq((A\cup C)\setminus\{x\})\setminus(A-\{x\})\subseteq C\setminus\{x\} A′∖(A−{ x})⊆((A∪C)∖{ x})∖(A−{ x})⊆C∖{ x}, therefore B + { x } − { y } B+\{x\}-\{y\} B+{ x}−{ y} hold B + { x } B+\{x\} B+{ x} The only ring in C C C Tear it down , therefore B − { y } + { x } B-\{y\}+\{x\} B−{ y}+{ x} It's also the foundation . ■ \blacksquare ■
2. Exchange diagram
about M = ( U , I ) \mathcal M=(\mathbb{U},\mathcal{I}) M=(U,I) and I ∈ I I\in\mathcal I I∈I, Definition Exchange diagram D M ( I ) D_{\mathcal M}(I) DM(I) by X = I , Y = U ∖ I {\frak X}=I,\;{\frak Y}=\Bbb U\setminus I X=I,Y=U∖I The bipartite graph of , among x ∈ X x\in\frak X x∈X and y ∈ Y y\in\frak Y y∈Y There are edges between them if and only if I − { x } + { y } ∈ I I-\{x\}+\{y\}\in\mathcal I I−{ x}+{ y}∈I establish .
Lemma 4. if I , J ∈ I I,J\in\mathcal I I,J∈I, And ∣ I ∣ = ∣ J ∣ |I|=|J| ∣I∣=∣J∣, be D M ( I ) D_{\mathcal M}(I) DM(I) in I ∖ J I\setminus J I∖J and J ∖ I J\setminus I J∖I A perfect match for .
Proof. Let the size of independent sets not exceed ∣ I ∣ |I| ∣I∣, be I , J I,J I,J There are two bases . according to Strong base exchange theorem
, ∃ x ∈ I ∖ J , y ∈ J ∖ I \exists x\in I\setminus J,\;y\in J\setminus I ∃x∈I∖J,y∈J∖I bring I − { x } + { y } I-\{x\}+\{y\} I−{ x}+{ y} It's the base . therefore * x , y * \langle x,y\rangle *x,y* Can match , Then a recursive J ′ = J − { y } + { x } J'=J-\{y\}+\{x\} J′=J−{ y}+{ x} that will do . ■ \blacksquare ■
Theorem 4. if I ∈ I , ∣ I ∣ = ∣ J ∣ I\in\mathcal I,\;|I|=|J| I∈I,∣I∣=∣J∣ And D M ( I ) D_{\mathcal M}(I) DM(I) There is only one in the world I ∖ J I\setminus J I∖J and J ∖ I J\setminus I J∖I A perfect match for , be J ∈ I J\in\mathcal I J∈I .
Proof. Make P P P Is the only match , take P P P The edge orientation in is U ∖ I \Bbb U\setminus I U∖I To I I I, The rest is the opposite . Matching uniquely indicates that there is no directed ring , Renumber with topological order ( Points with small numbers point to points with large numbers ). set up P = { * y i , x i * } P=\{\langle y_i,x_i\rangle\} P={ *yi,xi*}, among y i ∈ J ∖ I y_i\in J\setminus I yi∈J∖I . Rearrangement makes x i → y j ( i < j ) x_i\to y_j\;(i<j) xi→yj(i<j) There is no edge .
hypothesis J J J Not independent , Take ring C ⊆ J C\subseteq J C⊆J With the smallest i i i bring y i ∈ C y_i\in C yi∈C, In this way i i i There is obviously . here ∀ y ∈ C ∖ { y i } \forall y\in C\setminus\{y_i\} ∀y∈C∖{ yi}, because y y y Actual position ratio of y i y_i yi Bigger , therefore x i → y x_i\to y xi→y There is no edge , namely I − { x i } + y ∉ I I-\{x_i\}+y\notin\mathcal I I−{ xi}+y∈/I, namely C ∖ { y i } ⊆ clos ( I ∖ { x i } ) C\setminus\{y_i\}\subseteq\text{clos}(I\setminus\{x_i\}) C∖{ yi}⊆clos(I∖{ xi}) . At this time there is y i ∈ clos ( C ∖ { y i } ) ⊆ clos ( I ∖ { x i } ) y_i\in\text{clos}(C\setminus\{y_i\})\subseteq\text{clos}(I\setminus\{x_i\}) yi∈clos(C∖{ yi})⊆clos(I∖{ xi}), This is related to * x i , y i * \langle x_i,y_i\rangle *xi,yi* It is the edge contradiction in the exchange graph . ■ \blacksquare ■
3. Matroid intersection algorithm
Definition Exchange diagram D M 1 , M 2 ( I ) D_{\mathcal{M}_1,\mathcal{M}_2}(I) DM1,M2(I) by X = I , Y = U ∖ I {\frak X}=I,\;{\frak Y}=\Bbb U\setminus I X=I,Y=U∖I Directed bipartite graph of , among x ∈ X x\in\frak X x∈X and y ∈ Y y\in\frak Y y∈Y There are * x , y * \langle x,y\rangle *x,y* Side if and only if I − { x } + { y } ∈ I 1 I-\{x\}+\{y\}\in\mathcal I_1 I−{ x}+{ y}∈I1 establish , Yes * y , x * \langle y,x\rangle *y,x* Side if and only if I − { x } + { y } ∈ I 2 I-\{x\}+\{y\}\in\mathcal I_2 I−{ x}+{ y}∈I2 .
The initial order I = ∅ I=\varnothing I=∅ . Every order X i = { x ∉ I : I ∪ { x } ∈ I i } ( i = 1 , 2 ) X_i=\{x\notin I:I\cup\{x\}\in\mathcal I_i\}\;(i=1,2) Xi={ x∈/I:I∪{ x}∈Ii}(i=1,2), And then in D M 1 , M 2 ( I ) D_{\mathcal M_1,\mathcal M_2}(I) DM1,M2(I) Find X 1 X_1 X1 To X 2 X_2 X2 One of the most short circuit P P P, Then make I = I ⊕ P I=I\oplus P I=I⊕P, here ⊕ \oplus ⊕ Indicates the symmetry difference . Until the path cannot be found . At this point, we get the biggest ∣ I ∣ |I| ∣I∣, as well as Max min theorem
Medium S = { z : z can reach X 2 } S=\{z:z\text{ can reach }X_2\} S={ z:z can reach X2} .
3.1. independence
Make the shortest circuit P = { y 0 , x 1 , y 1 , x 2 , y 2 , … , x t , y t } P=\{y_0,x_1,y_1,x_2,y_2,\dots,x_t,y_t\} P={ y0,x1,y1,x2,y2,…,xt,yt}, Make J = { y 1 , y 2 , … , y t } ∪ ( I ∖ { x 1 , x 2 , … , x t } ) J=\{y_1,y_2,\dots,y_t\}\cup(I\setminus\{x_1,x_2,\dots,x_t\}) J={ y1,y2,…,yt}∪(I∖{ x1,x2,…,xt}) . You can get ∣ I ∣ = ∣ J ∣ |I|=|J| ∣I∣=∣J∣, And I ∖ J I\setminus J I∖J and J ∖ I J\setminus I J∖I stay D M 1 ( I ) D_{\mathcal M_1}(I) DM1(I) There is a perfect match in ( Keep only X → Y \frak X\to Y X→Y On the graph of side ; Because it's the shortest circuit ).
from theorem 4 \text{theorem 4} theorem 4 Immediate J ∈ I 1 J\in\mathcal I_1 J∈I1 . Again because P P P The shortest known y i ∉ X 1 ( 1 ⩽ i ⩽ t ) y_i\notin X_1\;(1\leqslant i\leqslant t) yi∈/X1(1⩽i⩽t) namely I ∪ { y i } ∉ I 1 I\cup\{y_i\}\notin\mathcal I_1 I∪{ yi}∈/I1 namely r 1 ( I ∪ J ) = r 1 ( I ) r_1(I\cup J)=r_1(I) r1(I∪J)=r1(I) . because I ∪ { y 0 } ∈ I 1 I\cup\{y_0\}\in\mathcal I_1 I∪{ y0}∈I1 so J ∪ { y 0 } ∈ I 1 J\cup\{y_0\}\in\mathcal I_1 J∪{ y0}∈I1, and J ∪ { y 0 } = I ⊕ P J\cup\{y_0\}=I\oplus P J∪{ y0}=I⊕P .
Empathy , Make J = I ⊕ P ⊕ { y t } J=I\oplus P\oplus\{y_t\} J=I⊕P⊕{ yt} be J ∈ I 2 J\in\mathcal I_2 J∈I2, from r 2 ( I ∪ J ) = r 2 ( I ) r_2(I\cup J)=r_2(I) r2(I∪J)=r2(I) have to J ∪ { y t } ∈ I 2 J\cup\{y_t\}\in\mathcal I_2 J∪{ yt}∈I2 . ■ \blacksquare ■
3.2. The biggest and the smallest
First prove that r 1 ( S ) ⩽ ∣ I ∩ S ∣ r_1(S)\leqslant|I\cap S| r1(S)⩽∣I∩S∣ . Reduction to absurdity . set up r 1 ( S ) > ∣ I ∩ S ∣ r_1(S)>|I\cap S| r1(S)>∣I∩S∣, By definition, that is ∃ x ∈ S ∖ I \exists x\in S\setminus I ∃x∈S∖I bring ( I ∩ S ) ∪ { x } ∈ I 1 (I\cap S)\cup\{x\}\in\mathcal I_1 (I∩S)∪{ x}∈I1 . because x ∈ S x\in S x∈S namely x x x It can reach X 2 X_2 X2, There must be x ∉ X 1 x\notin X_1 x∈/X1 namely I ∪ { x } ∉ I 1 I\cup\{x\}\notin\mathcal I_1 I∪{ x}∈/I1 .
from independence
know I ∪ { x } I\cup\{x\} I∪{ x} There is a unique ring C ⊇ { x } C\supseteq\{x\} C⊇{ x} . from ( I ∩ S ) ∪ { x } ∈ I 1 (I\cap S)\cup\{x\}\in\mathcal I_1 (I∩S)∪{ x}∈I1 know C ⊊ ( I ∩ S ) C\subsetneq(I\cap S) C⊊(I∩S) . therefore ∃ y ∈ C ∖ ( I ∩ S ) \exists y\in C\setminus(I\cap S) ∃y∈C∖(I∩S) bring I − { y } + { x } ∈ I 1 I-\{y\}+\{x\}\in\mathcal I_1 I−{ y}+{ x}∈I1 .
The above formula explains y → x y\to x y→x Edge existence , therefore y ∈ S y\in S y∈S, And y ∈ C ∖ ( I ∩ S ) y\in C\setminus(I\cap S) y∈C∖(I∩S) contradiction ( Be careful C ⊆ I C\subseteq I C⊆I Oh ). ■ \blacksquare ■
3.3. Complexity
The complexity of finding Zengguang road is O ( r 2 n ) \mathcal O(r^2n) O(r2n) among r = min { r 1 ( U ) , r 2 ( U ) } r=\min\{r_1(\Bbb U),r_2(\Bbb U)\} r=min{ r1(U),r2(U)} .
We have some better Without application value upper bound : The sum of the augmented path length is O ( ∣ I ∣ log ∣ I ∣ ) \mathcal O(|I|\log|I|) O(∣I∣log∣I∣) Of , among I I I Is the largest public independent set [3]; n n n spot m m m The matroid intersection of graph matroids of edges can be completed within the following complexity [4]:
- O ( n 1 / 2 m ) \mathcal O(n^{1/2}m) O(n1/2m) among m = Ω ( n 3 / 2 log n ) m=\Omega(n^{3/2}\log n) m=Ω(n3/2logn) .
- O ( n m 2 / 3 log 1 / 3 n ) \mathcal O(nm^{2/3}\log^{1/3}n) O(nm2/3log1/3n) among m = Ω ( n log n ) m=\Omega(n\log n) m=Ω(nlogn) And m = O ( n 3 / 2 log n ) m=\mathcal O(n^{3/2}\log n) m=O(n3/2logn) .
- O ( n 4 / 3 m 1 / 3 log 2 / 3 n ) \mathcal O(n^{4/3}m^{1/3}\log^{2/3}n) O(n4/3m1/3log2/3n) among m = O ( n log n ) m=\mathcal O(n\log n) m=O(nlogn) .
4. Weighted matroid intersection
This section O n e I n D a r k \sf OneInDark OneInDark Do not understand , If someone understands, can you talk about it 🥺
Be similar to Optimization problems
: Given ω : U ↦ R \omega:\Bbb U\mapsto\Reals ω:U↦R seek max { ∑ x ∈ I ω ( x ) : I ∈ I 1 ∩ I 2 } \max\{\sum_{x\in I}\omega(x):I\in\mathcal I_1\cap\mathcal I_2\} max{ ∑x∈Iω(x):I∈I1∩I2} . Press : be suspected to be R + \Reals^+ R+ .
Use authorized Max min theorem
max I ∈ I 1 ∩ I 2 ∑ x ∈ I ω ( x ) = min ω 1 , ω 2 { max { ω 1 ( I ) : I ∈ I 1 } + max { ω 2 ( I ) : I ∈ I 2 } } \max_{I\in\mathcal I_1\cap\mathcal I_2}\sum_{x\in I}\omega(x)=\min_{\omega_1,\omega_2}\big\{\max\{\omega_1(I):I\in\mathcal I_1\}+\max\{\omega_2(I):I\in\mathcal I_2\}\big\} I∈I1∩I2maxx∈I∑ω(x)=ω1,ω2min{ max{ ω1(I):I∈I1}+max{ ω2(I):I∈I2}}
among ω 1 , ω 2 \omega_1,\omega_2 ω1,ω2 Are the two U ↦ R \Bbb U\mapsto\Reals U↦R The function of satisfies ∀ x ∈ U , ω 1 ( x ) + ω 2 ( x ) = ω ( x ) \forall x\in\Bbb U,\;\omega_1(x)+\omega_2(x)=\omega(x) ∀x∈U,ω1(x)+ω2(x)=ω(x) .
In the implementation of the algorithm , We define point weights in exchange graphs
ν ( x ) = { ω ( x ) , x ∉ I − ω ( x ) , x ∈ I \nu(x)=\begin{cases}\omega(x),&x\notin I\\-\omega(x),&x\in I\end{cases} ν(x)={ ω(x),−ω(x),x∈/Ix∈I
Find the shortest path instead X 1 X_1 X1 To X 2 X_2 X2 In the path of , Under the premise of minimum point weight, the number of sides passing through is minimized .
“ It can be proved that there is no negative weight ring in commutative graphs , So this algorithm must have a solution .”
lu 、 Reference resources
[1] Yang Qianlan , On the expansion and application of matroids , I O I 2018 \rm IOI2018 IOI2018 Chinese national team candidate The paper .
[2] Good place bug, Matroids and Applications , You know special column .
[3] William H. Cunningham, Improved Bounds for Matroid Partition and Intersection Algorithms.[J]. SIAM J. Comput.,1986,15(4). 10.1137/0215066.
[4] H. N. Gabow and M. Stallman, Efficient algorithms for graphic matroid intersection and parity, extended abstract, in Automata, Languages and Programming, Lecture Notes in Computer Science, Springer, Berlin, 1985. 10.1007/BFb0015746.
[5] zghtyarecrenj, From matroid basis to Shannon Switch game ,luogu-blog.
The English name is deletion \text{deletion} deletion and contraction \text{contraction} contraction, The author of the paper did not find a standard translation . ︎
边栏推荐
- 信号处理之一阶RC低通滤波器宏指令实现(繁易触摸屏)
- Cann operator: using iterators to efficiently realize tensor data cutting and blocking processing
- Helix swarm Chinese package is released, and perforce further improves the user experience in China
- 夜天之书 #53 Apache 开源社群的“石头汤”
- Dialogue with ye Yanxiu, senior consultant of Longzhi and atlassian certification expert: where should Chinese users go when atlassian products enter the post server era?
- Optimization method of deep learning neural network
- IO flow: node flow and processing flow are summarized in detail.
- 重排数组
- 微博、虎牙挺进兴趣社区:同行不同路
- es6模块化
猜你喜欢
Ffmpeg Visual Studio development (IV): audio decoding
智能客服赛道:网易七鱼、微洱科技打法迥异
关于FPGA底层资源的细节问题
深度学习 神经网络的优化方法
LVGL 8.2 Draw label with gradient color
《opencv学习笔记》-- 线性滤波:方框滤波、均值滤波、高斯滤波
Who the final say whether the product is good or not? Sonar puts forward performance indicators for analysis to help you easily judge product performance and performance
How to match chords
如何搭建一支搞垮公司的技术团队?
Ranking list of databases in July: mongodb and Oracle scores fell the most
随机推荐
Go zero micro service practical series (IX. ultimate optimization of seckill performance)
如何搭建一支搞垮公司的技术团队?
How to build a technical team that will bring down the company?
Wt588f02b-8s (c006_03) single chip voice IC scheme enables smart doorbell design to reduce cost and increase efficiency
%s格式符
03-存储系统
Exploration and practice of eventbridge in the field of SaaS enterprise integration
5G电视难成竞争优势,视频资源成中国广电最后武器
C language achievement management system for middle school students
LVGL 8.2 Line wrap, recoloring and scrolling
炒股网上开户安全吗?会不会被骗。
Five minutes of machine learning every day: why do we need to normalize the characteristics of numerical types?
LVGL 8.2 Draw label with gradient color
No servers available for service: xxxx
Ffmpeg Visual Studio development (IV): audio decoding
03 storage system
从0到1建设智能灰度数据体系:以vivo游戏中心为例
Partial modification - progressive development
Is it safe to open an account online for stock speculation? Will you be cheated.
【学习笔记】拟阵