跳到正文

算法·理论

Yet another 没用的线性基求交

Yansuan_HCl约 1 分钟
原文
文章信息与版本

文章信息

发布
2024年7月13日
收录
2025年12月12日
更新
2026年10月28日
篇幅
约 1 分钟
获赞
1

版本

  1. v1当前

对于两组基 A={xi}A=\{\mathbf{x}_i\},B={yj}B=\{\mathbf{y}_j\},两线性空间的交是 {z∣∃ai,bj,z=∑aixi=∑bjyj}\{\mathbf{z}\mid \exists a_i,b_j,\mathbf{z}=\sum a_i\mathbf{x}_i=\sum b_j\mathbf{y}_j\},即 (∑aixi)−(∑bjyj)=0(\sum a_i\mathbf{x}_i)-(\sum b_j\mathbf{y}_j)=0。

解方程 (∑aixi)−(∑bjyj)=0(\sum a_i\mathbf{x}_i)-(\sum b_j\mathbf{y}_j)=0,将每个基础解系求出向量 ∑aixi\sum a_i\mathbf{x}_i,这些向量就是交空间的一组基。时间复杂度 O(d2)O(d^2),常数特别大,板子题要快读快写。

原文