=== ===
Here, put the transmission door = = = =
The meaning of this question is to give a set of linearly unrelated a vectors and a set of B vectors, which require each vector within a to find a replacement from B, and then replace a vector of a with its replacement. The entire a vector group is still linearly independent. The same B-vector cannot be substituted as a vector of two vectors. Finally, the solution of the minimum dictionary order is also required.
First you can find that because the data range of this problem is small, then if you can know that each B vector can be used as a replacement for each a vector, and then do a binary map matching. The key is to find out if the vector Bi b_i can be substituted for the vector Aj A_j.
It can be found that because A and B are all n-dimensional vector groups, and there are N, and a is linearly independent, then a vector group actually forms a set of bases in this n-dimensional space, and any n-dimensional vector can be represented linearly by the vectors in a. So for a vector Bi b_i in B, set Bi=c1a1+c2a2+...+cnan b_i=c_1a_1+c_2a_2+...+c_na_n. Considering whether the BI b_i can replace AJ A_j, you can see that if CJ C_j is not 0, which means that the remaining vectors after AJ A_j are not linearly represented by bi b_i, then the bi b_i and the rest of the vectors are linearly unrelated, that is, bi b_i can replace AJ A_j. But if Cj=0 c_j=0, that is, the remaining vectors can be linearly represented Ai a_i, then Bi b_i cannot replace Aj A_j.
Then the question becomes how to find the coefficient. It can be found that both A and B are row vector groups, and the vectors in B can be linearly represented by the vectors in a. This shows that there is a reversible matrix