I studied the semester elective network management, because is limited to choose the class so I did not seriously class, today because the fast knot exam, I went, and then I found a big secret ...
The original teacher from the third class has begun to talk about algorithmic introduction of knowledge, I am not missing what ...
Don't say much nonsense, introduction greedy algorithm first popularize a basic prior knowledge of a theory
The diagram (Graphs) includes a forward graph and a non-direction graph.
Expressed as:
G= (v,e);
V is the vertex set, and E is the edge set.
The map (i,j) belongs to e,i-->j;
The non-direction diagram (I,J) belongs to E,i-–j;
| e| = O (| v|*| v|);
Representation of graphs 1. adjacency matrix
For g= (v,e); V = {12 ... N};
The matrix of N*n represents a for G, where a "i,j" = 1,if (i,j) belongs to E
0,if (I,J) does not belong to E
Above is an example
adjacency table
The adjacency Table of g= (v,e) consists of an array of adj, adj "V", V belonging to V, which contains all the points in the diagram that are adjacent to V.
For example:
Adj "i" ={2,3} indicates the point to be set from I
Minimum spanning tree problem
Using dynamic programming algorithms to solve
Dynamic programming algorithms need to meet the conditions # #
1. Optimal sub-structure
2. Overlapping sub-issues
Introduction to Prime Algorithms
Because of the mathematical symbols, I will not be handwritten.
Simple description
1. First select 5, and then the surrounding direct access points are marked on the right value, select the minimum weight of 6, and then 6 as the center, identify the direct link, if the weight than before the value of the update, 6 selected 2. Then 2 is the center, 2 is selected 1. Then look at the weight of the identity, in order from small to large
Greedy algorithm (greedy algorithm)-Algorithm learning Journey (i)