## Travelling Sales Person ProblemThe traveling salesman problems abide by a salesman and a set of cities. The salesman has to visit every one of the cities starting from a certain one (e.g., the hometown) and to return to the same city. The challenge of the problem is that the traveling salesman needs to minimize the total length of the trip. Suppose the cities are x
The area assigned to the agent where he has to drop the newspaper is shown in fig: Solution: The cost- adjacency matrix of graph G is as follows: cost The tour starts from area H Mark area H Mark area H Mark area H Mark area H Mark area H Mark area H Mark area H 4 3 2 4 3 2 1 6 H Thus the minimum travel cost = 4 + 3 + 2 + 4 + 3 + 2 + 1 + 6 = 25 ## Matroids:A matroid is an ordered pair M(S, I) satisfying the following conditions: - S is a finite set.
- I is a nonempty family of subsets of S, called the independent subsets of S, such that if B ∈ I and A ∈ I. We say that I is hereditary if it satisfies this property. Note that the empty set ∅ is necessarily a member of I.
- If A ∈ I, B ∈ I and |A| <|B|, then there is some element x ∈ B ? A such that A∪{x}∈I. We say that M satisfies the exchange property.
We say that a matroid M (S, I) is weighted if there is an associated weight function w that assigns a strictly positive weight w (x) to each element x ∈ S. The weight function w extends to a subset of S by summation: w (A) = ∑ for any A ∈ S. Next TopicDynamic Programming vs Greedy Method |