20162314 《Program Design & Data Structures》Learning Summary Of The Tenth Week

20162314 2017-2018-1 《Program Design & Data Structures》Learning Summary Of The Tenth Week

Summary of Key Concepts

  • An undirected graph is a graph where the pairings representing the edges are unordered.

  • Two vertices in a graph are adjacent if there is an edge connecting them.

  • An undirected graph is considered complete if it has the maximum number of edges connecting vertices.

  • A path is a sequence of edges that connects two vertices in a graph.

  • A cycle is a path in which the first and last vertices are the same and none of the edges are repeated.

  • In a directed graph, the edges are ordered pairs of vertices.

  • A path in a directed graph is a sequence of directed edges that connects two vertices in a graph.

  • A weighted graph is a graph with costs associated with each edge.

  • The main difference between a depth-first traversal of a graph and a breadth-first traversal is the use of a stack instead of a queue to manage the traversal.

  • A graph is connected if and only if the number of vertices in the breadth-first traversal is the same as the number of vertices in the graph regardless of the starting vertex.

  • A spanning tree is a tree that includes all of the vertices of a graph and some, but possibly not all, of the edges.

  • A minimum spanning tree is a spanning tree where the sum of the weights of the edges is less than or equal to the sum of the weights for any other spanning tree for the same graph.

Problem and solution in teaching materials.

What does it mean to say that a graph is complete?

1062769-20171111233025278-640995472.png
1062769-20171111233102028-1553718301.png

  • A graph is considered complete if it has the maximum number of edges connecting vertices.

What is the maximum number of edges for an undirected graph? A directed graph?

1062769-20171111233012278-1110220702.png

  • The maximum number of edges for an undirected graph is n(n–1)/2. For a directed graph, it is n(n–1).

What is the definition of a path? A cycle?

1062769-20171111232950153-584622499.png

  • A path is a sequence of edges that connects two vertices in a graph. A cycle is a path in which the first and last vertices are
  • the same and none of the edges are repeated.

What is the difference between a weighted graph and a graph?

1062769-20171111232935497-1393268631.png

  • A weighted graph is a graph, either directed or undirected, with weights or costs associated with each edge.

What is a spanning tree? A minimum spanning tree?

1062769-20171111232905372-1356954870.png

  • A spanning tree is a tree that includes all of the vertices of a graph and some, but possibly not all, of the edges. A minimum
  • spanning tree is a spanning tree where the sum of the weights of the edges is less than or equal to the sum of the weights for any
  • other spanning tree for the same graph.

Code hosting

1062769-20171022234121834-1415959686.png

What is the maximum number of edges for an undirected graph? A directed graph?

1062769-20171105230746029-915654533.png

  • The maximum element is removed from a heap (maxheap) by replacing the root with the last leaf of the tree, then moving that
  • element down the tree as appropriate to reassert the proper relationships among the elements.

Summary of error for last week.

Linear search is always more effective than binary search.The answer should be false, for the situation of "n = 2".

Evaluate for my partner

  • Advantage and problem in the blog:
    • Concise and comprehensie
    • Uncleary to the content
    • Mould is amazing
  • Advantage and problem in the code:
    • Serious writing.
    • Wonderful idea
    • Too less

Learning situation of partner

  • 20162310

  • Learning content of partner:
    • Algorithm
    • Recursion
    • HanoiTowers and maze

Anything else that want to say

  • It's not easy to persere on utizing English to write a blog.But I'm getting used to doing this because of the benefit.

Academic progress check

Code line number(increasing/accumulative)Blog number(inc/acc)studying time(inc/acc)progress
target5000lines30articles400hours
First week180/1801/120/20
Second week1049/12291/218/38
Third week1037/22663/722/60
Fourth week1120/33862/930/90

转载于:https://www.cnblogs.com/CS162314/p/7820381.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值