ZROI 19.07.29 linear algebraic entry / wq

Gaussian elimination

Still active in die sense of PCA inversion can be.

Can be molded together even number, the need for two division equation removed, the complexity of the \ (O (n-^. 3 \ log P) \) .

Euclidean division with remainder can be defined as long as it is effective.


  • Inverse matrix: for the matrix \ (A \) , the definition of the inverse matrix \ (A ^ {- 1} \) to satisfy \ (A \ cdot A ^ { - 1} = A ^ {- 1} \ cdot A = e \ ) matrix.

Inverse matrix may Gaussian elimination. With \ (A \ cdot A ^ { - 1} = e \) in the form of the \ (A \) during elimination of a unit matrix, the right side of the equation for the same operation.

Application: with Equation \ (A \ B = CDOT X \) (matrix uppercase, lowercase vector), for different \ (B \) repeatedly solved, can be converted to \ (x = A ^ {- 1} \ cdot a \ cdot x = a ^ {- 1} \ cdot b \) form, avoiding every Gaussian elimination.

  • example

Meaning of the questions: \ (the n-\) points map, there \ (k \) key points for each critical point \ ((i, J) \) , obtained from \ (i \) starting random walk the first key point is encountered \ (j \) probability.

Sol:

Enumeration end \ (k \) , set \ (f_i \) represents from \ (i \) starting the first key point is to come (k \) \ probabilities.

Provided for each keypoint into not only a virtual point \ (I '\) , only the current enumeration endpoint \ (F_ {K'. 1} = \) , the remainder being \ (0 \) .

Then find different points for each Gaussian elimination only a constant term, then the constant term as a vector, the end point of each dimension representing \ (K \) corresponding to the row when the coefficient. Such elimination directly on the line.


  • Determinant

Conclusion: the matrix is provided with two \ (A, B \) , then \ (DET (A \ B CDOT) DET = (A) DET (B) \) .

Operators commonly used area of ​​the triangle cross product, it is essentially a determinant.

Can be extended to \ (D \) dimensional space, volume was calculated by determinant.

Another conclusion: with \ (D \) variables, satisfy the \ (x_i \ Leq 0 \) , and \ (\ SUM x_i \ Leq S \) , point \ ((x_1, x_2, ... , x_d) \ ) a volume set constituted \ (= \ S FRAC {D} {D ^!} \) . (Corresponding to the \ (D \) th dimension is only one \ (S \) product of the determinant of the vector)

  • example

The meaning of problems: for \ (n-1 \) under dimensional space \ (n + 1 \) points to ensure that each dimensional coordinates of each point \ (\ in \ {0,1 \} \) , seeking convex hull volume.

Sol:

First question is intended to ensure that the interior of each point will not be in the convex hull.

If only \ (n-\) points can be solved directly determinant to calculate the volume.

Now transformed into \ (n + 1 \) points to discover the size of each \ (n-\) after the volume of the convex hull of the summing point set, each dot is twice forget.

prove? Gugu Gu.

Note that since the cross product directional, and finally to take the absolute value, when computed modulo not required to obtain accurate values.


  • Matrix Tree Theorem

Construction: main diagonal degree of each point, the remaining positions have compared side \ (--1 \) , otherwise \ (0 \) . RemoveHead can eatAfter a required number of row is the determinant of the spanning tree.

prove? Gugu Gu.

There rooted tree count of the FIG: Order \ (g_ {i, i} \) of \ (I \) of penetration, \ (G_ {I, J} \) of \ (I \) to \ (J \) opposite edge count, places \ (I \) is the number of the root is the removed section of FIG \ (I \) row \ (I \) determinant column.

Corollary (BEST Theorem): \ (n-\) points directed graph, the number of which is the Euler number of the tree in FIG rooted any point \ (\ times \ sum (dgr_i -1) \!) .

prove? Gugu Gu.

  • example:

The meaning of problems: \ (n-\) points, \ (\ {n--. 1, n-\} \) sides of FIG., Each side repeated \ (t_i \) pieces, and the Euler number. \ (the n-, t_i \ Leq 1000 \) .

Sol:

After each side find orientation Euler number can be calculated by Theorem BEST.

Consider \ (n-1 \) edges FIG apparent both directions, each edge \ (\ frac {t_i} { 2} \) times, then with BEST Theorem can easily oriented.

Extend \ (n-\) after the edges, for the same part of the forest solution, the main problem is that the edge ring
uncertain direction. Enumeration but we found the number of edges between any two points in each direction, to \ (O (n) \) Release Number of edges between other points on the ring.

Tree can count the number of hands, since the ring must be cut on a location, to maintain product prefix two directions, the complexity of the \ (O (NT) \) .


  • Band matrix

Definitions: All non \ (0 \) elements does not exceed around the main diagonal \ (D \) within a distance.

Gaussian elimination, the only use each time length \ (D \) vector elimination \ (D \) line, complexity \ (O (Nd ^ 2) \) .

In other words, when PCA can not change one line down, otherwise it will destroy nature.

You can find the right one transducer (corresponding to the two variables switching sequence).

Usage: random walk trellis diagram and the like.

  • example:

In the beginning \ ((0,0) \) , each time a random direction to go (four directions probabilities may be different), asked the Euclidean distance from the origin of more than \ (R \) the expected number of steps. \ (R & lt \ Leq 50 \) .

Sol:

Very board. Dragged out to the desired point, it is the band matrix, direct solution after shoot flat complexity \ (O (R & lt ^. 4) \) .


  • Omomoto method

For many grid problem, if it is determined we found a line (or one), then the status of the entire grid can be recursive out.

So the state of the first row is set to unknown, may be \ (O (n ^ 2m) \) during the time the state of each bin is represented as a linear combination of the first row state. In the last line often listed equation, can Gaussian elimination.

For the above example, each row may leftmost point status to the unknowns, equations are listed in the right-most (as is further to the right \ (0 \) ), can be done \ (O (R ^ 3) \ ) .

Dls she spoke suddenly found a Gaussian elimination half-hour

2. Linear space

Linear space defined over a number field, meet several multiplication addition and subtraction is closed. (Although not what)

Defines the base of the set with nothing different on mathematics,Please refer to the compulsory four

Mold \ (p \) in the sense, if the dimension is \ (d \) , then the total of \ (p ^ d \) elements (probably can be understood as a \ (d \) dimensional vector).

  • Example (1)

Meaning of the questions: a sequence that supports the end of the addend, asked a number of interval number xor maximum. \ (n-, Q \ Leq 5E5, a_i \ Leq 2 ^ {30} -1 \) .

Sol:

Consider off, maintaining a linear scan line group. Each element is added to maintain a linear time-based (as is the scan lines, so in fact the location), each time adding a new element of time, if a location has an element, leave position than the right one, another recursion .

Always ask when only need to find the time to join larger than the left end point of the element can be. (With a certain set of Shandong Province questions like)

  • Example (2)

A \ (n \ times m \) a matrix selected from a plurality of required number, so that each row of each column has an odd number, and a product is a perfect square, find the number of programs. \ (n-, m \ Leq 20 is, A_ {I, J} \ Leq. 9 ^ 10 \) .

For each row, each column and each column exclusive quality factor or set of equations can be solved for the number of free entries.


  • Adjoint matrix

Definition: matrixes \ (ADJ (A) \) , so \ (ADJ (A) _ {I, J} = C_ {J, I} \) , i.e. the matrix \ (A \) remove the section \ (J \) line \ (i \) cofactor column.

性质:\(A\cdot adj(A)=adj(A)\cdot A=det(A)\cdot I\)

Proof: dropped, Gugu Gu.

The role of the nature of the above? Probably be accompanied by matrix inversion matrix calculation ......

Irreversible supposed to? I can do, but I dropped the ......


  • all Matrix

Black science and technology, relying on (hao) spectrum than with trees and flowers (xie) more.

To any undirected graph \ (G \) of each edge weight assigned a unique \ (X_ {U, V} \) , was not present \ (0 \) , define the matrix \ (A \) of Tutte matrix matrix \ (B \) , then \ (B_ {I, J} = X_ {I, J} \ CDOT (-1) ^ {[I> J]} \) .

\ (G \) there is a perfect match, if and only if \ (DET (B) \ 0 = Not \) .

why? do not know.

\ (B ^ {- 1} ~ _ {i, j} \ not = 0 \) if and only if \ (G- (i, j) \) there is a perfect match.

why? do not know.

Can you do? You can deal with some issues related to the count, probably.

\ (G \) maximum matching \ (= \ {Rank FRAC (B)} {2} \) .

why? do not know.


Girls dropped in ......


3. The characteristic polynomial

The definition is not copied everywhere

  • Matrix diagonalization:

Set \ (A \) feature vectors \ (\ {x_1, x_2, ... x_n \} \) , the corresponding eigenvalues \ (\ {\ lambda_1, \ lambda_2, ..., \ lambda_n \} \) , matrix \ (P = [x_1, x_2, ..., x_n] \) , the diagonal matrix \ (D = \ {\ lambda_1, \ lambda_2, ..., \ lambda_n \} \) , then \ (A \ cdot P = P \ D cdot \) .

Use: \ (A = P \ CDOT D \ CDOT P ^ {-. 1} \) , then \ (A ^ K = P \ CDOT D ^ K \ CDOT P ^ {-. 1} \) , then the diagonal matrix \ (k \) times good count ......

However, significant limitations, only the basic push.

dls pushed a problem, I dropped the.


  • Hamilton - Cayley theorem:

The generation of a matrix into its characteristic polynomial equations in the holds.

And then cutting out.

Anyway, this thing only role is to \ (O (k \ log k \ log n) \) resolved within \ (k \) order linear recurrence, or turn left Los template Valley area bar (

Guess you like

Origin www.cnblogs.com/suwakow/p/11375063.html