Mathematical modeling Course Notes (Part 3) To be Continued
Written with StackEdit.
Optimization of Discrete Models
本章內容詳見:
Modeling Using Graph Theory
Euler's Problem
Given a graph, under what conditions is it possible to find a closed walk that traverses every edge exactly once?
Notes:
- For a graph to be Eulerian, it is necessary that it both be connected and have even degree. But it is also true that for a graph to be Eulerian, it is sufficient that it be connected with even degree.
- Once we establish that being connected with even degree is necessary and sufficient for a graph to be Eulerian, we need only model a situation with a graph, and then check to see whether the graph is connected and each vertex of the graph has even degree. Almost any textbook on graph theory will contain a proof of Euler's result.
Four-Color Problem
Using only four colors, can you color the vertices of a graph drawn without edges crossing so that no vertex gets the same color as an adjacent vertex?
Describing Graphs
Graph
A graph is a mathematical way of describing relationships between things. A graph G consists of two sets:
- a vertex set \(V(G)\)
- an edge set \(E(G)\)
Each element of\(E(G)\) is a pair of elements of \(V(G)\) .
The degree of a vertex \(j\), \(deg(j)\), is the number of incidences between \(j\) and an edge. A vertex \(v\) is said to have even degree if \(deg(v)\) is an even number. Similarly, a graph is said to have even degree if every vertex in the graph has even degree.
When an edge \(ij\) has a vertex \(j\) as one of its endpoints, we say edge \(ij\) is incident (關聯的) with
vertex \(j\).
When there is an edge \(ij\) between two vertices, we say vertices \(i\) and \(j\) are adjacent (相鄰的).
Planar graph/plane graph:
In graph theory, a planar graph is a graph that can be embedded in the plane, which means that it can be drawn on the plane in such a way that its edges intersect only at their endpoints. In other words, it can be drawn in such a way that no edges cross each other.
Euler 's formula:
If a finite, connected, planar graph is drawn in the plane without any edge intersections, and \(V\) is the number of vertices, \(E\) is the number of edges and \(F\) is the number of faces (regions bounded by edges, including the outer, infinitely large region), then $$V-E+F = 2$$
Connected planar graphs with more than one edge obey the inequality $$2E>3F$$
Because each face has at least three face-edge incidences and each edge contributes exactly two incidences.
By Euler's formula and the above inequality, we can get $$\frac{2E}{V}<6 $$ or $$\frac{2E}{V} \leq5$$ which means that the average degree of simple planar graph is less than or equal to 5.
Graph Models
Bacon number graph
The Bacon number graph is just one of a broader class of models called social networks. A social network consists of a set of individuals, groups, or organizations and certain social relationships between them. These networks can be modeled with a graph. For example, a friendship network is a graph where the vertices are people and there is an edge between two people if they are friends.
Fitting a Piecewise Linear Function to Data
The Softball Example Revisited
The 0-1 Matrix Problem
Vertex Cover Problem
Using Graph Models to Solve Problems
Solving Shortest-Path Problems
Dijkstra’s Shortest-Path Algorithm
- Input: A graph \(G = \left(V(G),E(G)\right)\) with a source vertex \(s\) and s sink vertex \(t\) and non-negative edge lengths \(c_{ij}\) for each edge \(ij \in E(G)\).
- Output: The length of a shortest path from \(s\) to \(t\) in \(G\).
- Step 0: Start with temporary (臨時的) labels \(L\) on each vertex as follows: \(L(s) = 0\) and \(L(i) = \infty\) for all vertices except \(s\).
- Step 1: Find the vertex with the smallest temporary label (if there's a tie, pick one at random). Make that label permanent (固定的) meaning it will never change.
- Step 2: For every vertex \(j\) without a permanent label that is adjacent to a vertex with a permanent label, compute a new temporary label, compute a new temporary label as follows: \(L_{j} = \min \left\{L_{i} + c_{ij}\right\}\), where we minimize over all vertices \(i\) with a permanent label. Repeat Steps 1 & 2 until all vertices have permanent labels.
Here is a good explanation of Dijkstra's algorithm
Solving Maximum-Flow Problems
(補充內容:) 迴圈比賽的名次
迴圈比賽的結果——競賽圖 (Tournament)
Click here to learn more about tournament
競賽圖的性質:
- 必存在完全路徑;
- 若存在唯一的完全路徑, 則由它確定的頂點順序與按得分排列的順序一致.
Modeling with Decision Theory
Decision Trees
A decision tree (決策樹) is often used to display and analyze the options available to the decision maker. Decision trees are especially informative when a sequence of decisions must be made.
A decision node (決策節點) with a decision branch (決策分支) for each alternative course of action (strategy).
An uncertainty node (不確定節點) reflecting chance (the state of nature) with an outcome branch (結果分支) for each possible outcome at that uncertainty node.
A terminal node (終節點) with a consequence branch showing the payoff for that outcome.
We compute the expected value of each uncertainty node and then make the decision based on the higher expected value. (由後向前推導計算)