TAILIEUCHUNG - Lecture Discrete structures: Chapter 32 - Amer Rasheed

In this chapter, the following content will be discussed: This chapter augments your database application development skills with stored procedures and triggers. Stored procedures provide reuse of common code, while triggers provide rule processing for common tasks. | (CSC 102) Lecture 32 Discrete Structures Trees Previous Lecture Matrices and Graphs Matrices and Directed Graphs Matrices and undirected Graphs Matrices and Connected Components Trees Characterizing Trees Rooted Trees Today’s Lecture Rooted Trees Binary Trees Spanning Trees and Shortest Paths Minimum Spanning Trees Kruskal’s Algorithm Prim’s Algorithm Finding Minimum Spanning Trees Rooted Trees Rooted Trees These terms are illustrated in the following Figure of Rooted Tree Rooted Trees Example Binary Trees Representation of Algebraic Expressions a/b a/(c+d) ((a − b)·c) + (d/e) Spanning Trees and Shortest Paths An East Coast airline company wants to expand service to the Midwest and has received permission from the Federal Aviation Authority to fly any of the routes shown in Figure Spanning Trees and Shortest Paths The fact is that the graph of any system of routes that satisfies the company’s wishes is a tree, because if the graph were to contain a circuit, then one of the routes in the circuit could be removed without disconnecting the graph, and that would give a smaller total number of routes. But any tree with eight vertices has seven edges. Therefore, any system of routes that connects all eight vertices and yet minimizes the total number of routes consists of seven routes. Spanning Trees and Shortest Paths Definition A spanning tree for a graph G is a subgraph of G that contains every vertex of G and is a tree. Theorem 1. Every connected graph has a spanning tree. 2. Any two spanning trees for a graph have the same number of edges. Spanning Trees Example Find all spanning trees for the graph G pictured below. Solution The graph G has one circuit v2v1v4v2, and removal of any edge of the circuit gives a tree. Thus, as shown below, there are three spanning trees for G. Minimum Spanning Trees Now suppose the airline company wants to serve all the cities shown, but with a route system that minimizes the total mileage. More generally, a graph whose edges are .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.