Directed infinity: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Michael Hardy
No edit summary
 
en>NOrbeck
m Capitalization
Line 1: Line 1:
Greetings! I am Marvella and I really feel comfortable when individuals use the full title. The thing she adores most is body developing and now she is trying to make money with it. Bookkeeping is her working day job now. South Dakota is where me and my spouse live.<br><br>Here is my web page :: [http://bogangsa.com/board_avHE75/389128 home std test kit]
 
 
In [[combinatorics]], a branch of [[mathematics]], a '''weighted matroid''' is a [[matroid]] endowed with function with respect to which one can perform a [[greedy algorithm]].
 
A ''weight function'' ''w'' : ''E'' &rarr; '''R'''<sup>+</sup> for a matroid ''M''=(''E'', ''I'') assigns a strictly positive weight to each element of ''E''. We extend the function to subsets of ''E'' by summation; ''w''(''A'') is the sum of ''w''(''x'') over ''x'' in ''A''. A matroid with an associated weight function is called a weighted matroid.
 
==Spanning forest algorithms==
As a simple example, say we wish to find the [[spanning tree (mathematics)|maximum spanning forest]] of a graph. That is, given a graph and a weight for each edge, find a forest containing every vertex and maximizing the total weight of the edges in the tree. This problem arises in some clustering applications. If we look at the definition of the forest matroid above, we see that the maximum spanning forest is simply the independent set with largest total weight &mdash; such a set must span the graph, for otherwise we can add edges without creating cycles. But how do we find it?
 
===Finding a basis===
There is a simple algorithm for finding a basis:
 
* Initially let A be the empty set.
* For each ''x'' in ''E''
** if A U {x} is independent, then set A to A U {x}.
 
The result is clearly an independent set. It is a maximal independent set because if B U {x} is not independent for some subset B of A, then A U {x} is not independent either (the contrapositive follows from the [[hereditary property (matroid)|hereditary property]]). Thus if we pass up an element, we'll never have an opportunity to use it later. We will generalize this algorithm to solve a harder problem.
 
===Extension to optimal===
An independent set of largest total weight is called an ''optimal'' set. Optimal sets are always bases, because if an edge can be added, it should be; this only increases the total weight. As it turns out, there is a trivial [[greedy algorithm]] for computing an optimal set of a weighted matroid. It works as follows:
 
* Initially let A be the empty set.
* For each ''x'' in ''E'', taken in (monotonically) decreasing order by weight
** if A U {x} is independent, then set A to A U {x}.
 
This algorithm finds a basis, since it is a special case of the above algorithm. It always chooses the element of largest weight that it can while preserving independence (thus the term "greedy"). This always produces an optimal set: suppose that it produces <math>A=\{e_1,e_2,\ldots,e_r\}</math> and that <math>B=\{f_1,f_2,\ldots,f_r\}</math>. Now for any <math>k</math> with <math>1\le k\le r</math>, consider open sets <math>O_1=\{e_1,\ldots,e_{k-1}\}</math> and <math>O_2=\{f_1,\ldots,f_k\}</math>. Since <math>O_1</math> is smaller than <math>O_2</math>, there is some element of <math>O_2</math> which can be put into <math>O_1</math> with the result still being independent. However <math>e_k</math> is an element of maximal weight that can be added to <math>O_1</math> to maintain independence. Thus <math>e_k</math> is of no smaller weight than some element of <math>O_2</math>, and hence <math>e_k</math> is of at least a large a weight as <math>f_k</math>. As this is true for all <math>k</math>, <math>A</math> is weightier than <math>B</math>.
 
===Complexity analysis===
The easiest way to traverse the members of ''E'' in the desired order is to sort them. This requires O(|E|log|E|) time using a comparison [[sorting algorithm]]. We also need to test for each ''x'' whether A U {x} is independent; assuming independence tests require O(f(|E|)) time, the total time for the algorithm is O(|E|log|E| + |E|f(|E|)).
 
If we want to find a minimum spanning tree instead, we simply "invert" the weight function by subtracting it from a large constant. More specifically, let ''w''<sub>min</sub>(''x'') = ''W'' - ''w''(''x''), where ''W'' exceeds the total weight over all graph edges. Many more optimization problems about all sorts of matroids and weight functions can be solved in this trivial way, although in many cases more efficient algorithms can be found that exploit more specialized properties.
 
===Matroid requirement===
Note also that if we take a set <math>I</math> of "independent" sets which is a down-set but not a matroid, then the greedy algorithm will not always work. For then there are independent sets <math>I_1</math> and <math>I_2</math> with <math>|I_1|<|I_2|</math>, but such that for no <math>e\in I_2\setminus I_1</math> is <math>I_1\cup e</math> independent.
 
Pick an <math>\epsilon>0</math> and <math>\tau>0</math> such that <math>(1+2\epsilon)|I_1|+\tau|E|<|I_2|</math>. Weight the elements of <math>I_1\cup I_2</math> in the range <math>2</math> to <math>2+2\epsilon</math>, the elements of <math>I_1\setminus I_2</math> in the range <math>1+\epsilon</math> to <math>1+2\epsilon</math>, the elements of <math>I_2\setminus I_1</math> in the range <math>1</math> to <math>1+\epsilon</math>, and the rest in the range <math>0</math> to <math>\tau</math>. The greedy algorithm will select the elements of <math>I_1</math>, and then cannot pick any elements of <math>I_2\setminus I_1</math>. Therefore the independent set it constructs will be of weight at most <math>(1+2\epsilon)|I_1|+\tau|E|+|I_1\cup I_2|</math>, which is smaller than the weight of <math>I_2</math>.
 
==History==
 
It was not until 1971 that [[Jack Edmonds]] connected weighted matroids to greedy algorithms in his paper      "Matroids and the greedy algorithm". Korte and Lovász would generalize these ideas to objects called ''[[greedoid]]s'', which allow even larger classes of problems to be solved by greedy algorithms.
 
==References==
* Jack Edmonds. Matroids and the Greedy Algorithm. Mathematical Programming, volume 1, p.125&ndash;136. 1971.
[[Category:Matroid theory]]

Revision as of 04:04, 9 June 2013


In combinatorics, a branch of mathematics, a weighted matroid is a matroid endowed with function with respect to which one can perform a greedy algorithm.

A weight function w : ER+ for a matroid M=(E, I) assigns a strictly positive weight to each element of E. We extend the function to subsets of E by summation; w(A) is the sum of w(x) over x in A. A matroid with an associated weight function is called a weighted matroid.

Spanning forest algorithms

As a simple example, say we wish to find the maximum spanning forest of a graph. That is, given a graph and a weight for each edge, find a forest containing every vertex and maximizing the total weight of the edges in the tree. This problem arises in some clustering applications. If we look at the definition of the forest matroid above, we see that the maximum spanning forest is simply the independent set with largest total weight — such a set must span the graph, for otherwise we can add edges without creating cycles. But how do we find it?

Finding a basis

There is a simple algorithm for finding a basis:

  • Initially let A be the empty set.
  • For each x in E
    • if A U {x} is independent, then set A to A U {x}.

The result is clearly an independent set. It is a maximal independent set because if B U {x} is not independent for some subset B of A, then A U {x} is not independent either (the contrapositive follows from the hereditary property). Thus if we pass up an element, we'll never have an opportunity to use it later. We will generalize this algorithm to solve a harder problem.

Extension to optimal

An independent set of largest total weight is called an optimal set. Optimal sets are always bases, because if an edge can be added, it should be; this only increases the total weight. As it turns out, there is a trivial greedy algorithm for computing an optimal set of a weighted matroid. It works as follows:

  • Initially let A be the empty set.
  • For each x in E, taken in (monotonically) decreasing order by weight
    • if A U {x} is independent, then set A to A U {x}.

This algorithm finds a basis, since it is a special case of the above algorithm. It always chooses the element of largest weight that it can while preserving independence (thus the term "greedy"). This always produces an optimal set: suppose that it produces A={e1,e2,,er} and that B={f1,f2,,fr}. Now for any k with 1kr, consider open sets O1={e1,,ek1} and O2={f1,,fk}. Since O1 is smaller than O2, there is some element of O2 which can be put into O1 with the result still being independent. However ek is an element of maximal weight that can be added to O1 to maintain independence. Thus ek is of no smaller weight than some element of O2, and hence ek is of at least a large a weight as fk. As this is true for all k, A is weightier than B.

Complexity analysis

The easiest way to traverse the members of E in the desired order is to sort them. This requires O(|E|log|E|) time using a comparison sorting algorithm. We also need to test for each x whether A U {x} is independent; assuming independence tests require O(f(|E|)) time, the total time for the algorithm is O(|E|log|E| + |E|f(|E|)).

If we want to find a minimum spanning tree instead, we simply "invert" the weight function by subtracting it from a large constant. More specifically, let wmin(x) = W - w(x), where W exceeds the total weight over all graph edges. Many more optimization problems about all sorts of matroids and weight functions can be solved in this trivial way, although in many cases more efficient algorithms can be found that exploit more specialized properties.

Matroid requirement

Note also that if we take a set I of "independent" sets which is a down-set but not a matroid, then the greedy algorithm will not always work. For then there are independent sets I1 and I2 with |I1|<|I2|, but such that for no eI2I1 is I1e independent.

Pick an ϵ>0 and τ>0 such that (1+2ϵ)|I1|+τ|E|<|I2|. Weight the elements of I1I2 in the range 2 to 2+2ϵ, the elements of I1I2 in the range 1+ϵ to 1+2ϵ, the elements of I2I1 in the range 1 to 1+ϵ, and the rest in the range 0 to τ. The greedy algorithm will select the elements of I1, and then cannot pick any elements of I2I1. Therefore the independent set it constructs will be of weight at most (1+2ϵ)|I1|+τ|E|+|I1I2|, which is smaller than the weight of I2.

History

It was not until 1971 that Jack Edmonds connected weighted matroids to greedy algorithms in his paper "Matroids and the greedy algorithm". Korte and Lovász would generalize these ideas to objects called greedoids, which allow even larger classes of problems to be solved by greedy algorithms.

References

  • Jack Edmonds. Matroids and the Greedy Algorithm. Mathematical Programming, volume 1, p.125–136. 1971.