1. makefile: 定义了一系列规则指定了文件的编译顺序,以及哪些文件需要重新编译。在make指令下,整个工程将自动开始编译。如果这个工程没有编译过,那么我们的所有C文件都要编译并被链接;若只是工程中的几个文件被修改,则重新编译这几个文件并链接即可
target...:prerequisties...
command
target为目标文件,可以为object file或者执行文件;prerequisities为生成target所需要的文件,command为make需要执行的命令。prerequisites如果有一个以上文件比target时间要新的话,command所定义的命令就会被执行
2. graphs
3. a graph with V vertices has at most V(V-1)/2 edges
原因: (v, w) 与(w, v) 代表相同的edge (in an undirected graph)
本身不予考虑,如(v, v)
if E is closer to V^2, the graph is dense; if E is closer to V, the graph is sparse
4. for an edge e that connects vertices v and w:
v and w are adjacent (neighbours), e is incident on both v and w
degree of a vertex v = number of edges incident on v
vertex = node, edge = arc = link
5. path: 一系列顶点的排序(可理解为连续的edge,从一个edge指向另一个)
sample path: 所有vertices和edges都不同的path
cycle:同simple一样但是第一个vertex等于最后一个vertex
length of path or cycle: #edges
6. connected graph: vertex与其他所有vertex之间都有path连接(若一个graph不是connected的,它有大于两个connected components)
complete graph Kv: vertex与其他所有vertex之间都有edge(直接相连而不是通过其他点,在一个complete graph, E=V(V-1)/2)
7. tree: 不形成cycles的connected graph
spanning tree:包含所有vertices的tree
clique:complete subgraph
8.
9. graph representation
(a) Array of edges
(b) Adjacency Matrix Representation
对于undirected graph可以只存储一半的数据(如(0, 1), (1, 0)的值一样)
(c) Adjacency List Representation
A[0]=<1, 3>指(0, 1), (0, 3)的值为1
!!!