[BZOJ3168] [Heoi2013] Calcium iron zinc selenium vitamins (matrix inversion + binary map matching) __bzoj

Source: Internet
Author: User
=== ===

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.