maths.free › Combinatorics & Graph Theory › The Many Faces of Combinatorics › On-line algorithms

On-line algorithms

Many applications of combinatorics occur in a dynamic, on-line manner. It is rare that one has all the information about the challenges a problem presents before circumstances compel that decisions be made.

On-line algorithms

Many applications of combinatorics occur in a dynamic, on-line manner. It is rare that one has all the information about the challenges a problem presents before circumstances compel that decisions be made. As examples, a decision to proceed with a major construction project must be made several years before ground is broken; investment decisions are made on the basis of today's information and may look particularly unwise when tomorrow's news is available; and deciding to exit a plane with a parachute is rarely reversible.

In this section, we present two examples intended to illustrate on-line problems in a combinatorial setting. Our first example involves graph coloring. As is customary in discussions of on-line algorithms, we consider a two-person game with the players called Assigner and Builder. The two players agree in advance on a class \(\cgC\) of graphs, and the game is played in a series of rounds. At round\(1\) Builder presents a single vertex, and Assigner assigns it a color. At each subsequent rounds, Builder presents a new vertex, and provides complete information as to which of the preceding vertices are adjacent to it. In turn, Assigner must give the new vertex a color distinct from colors she has assigned previously to its neighbors.

Example

Even if Builder is constrained to build a path on \(4\) vertices, then Assigner can be forced to use three colors. At Round1, Builder presents a vertex \(x\) and Assigner colors it. At Round2, Builder presents a vertex \(y\) and declares that \(x\) and \(y\) are not adjacent.

Now Assigner has a choice. She may either give \(x\) and \(y\) the same color, or she may elect to assign a new color to \(y\). If Assigner gives \(x\) and \(y\) different colors, then in Round3, Builder presents a vertex \(z\) and declares that \(z\) is adjacent to both \(x\) and \(y\). Now Assigner will be forced to use a third color on \(z\). In Round\(4\), Builder will add a vertex \(w\) adjacent to \(y\) but to neither \(x\) nor \(z\), but the damage has already been done.

On the other hand, if Assigner \(x\) and \(y\) the same color, then in Round3, Builder presents a vertex \(z\), with \(z\) adjacent to \(x\) but not to \(y\). Assigner must use a second color on \(z\), distinct from the one she gave to \(x\) and \(y\). In Round4, Builder presents a vertex \(w\) adjacent to \(z\) and \(y\) but not to \(x\). Assigner must use a third color on \(w\).

Note that a path is a tree and trees are forests. The next result shows that while forests are trivial to color off-line, there is a genuine challenge ahead when you have to work on-line. To assist us in keeping track of the colors used by Assigner, we will use the notation from and write \(\phi(x)\) for the color given by Assigner to vertex \(x\).

Doing Relatively Well in an On-Line Setting

should be viewed as a negative result. It is hard to imagine a family of graphs easier to color than forests, yet in an on-line setting, graphs in this family are difficult to color. On the other hand, in certain settings, one can do reasonably well in an on-line setting, perhaps not as well as the true optimal off-line result but good enough to be useful. Here we present a particularly elegant example involving partially ordered sets.

Recall that a poset \(P\) of height \(h\) can be partitioned into \(h\) antichainsby recursively removing the set of minimal elements. But how many antichains are required in an on-line setting? Now Builder constructs a poset \(P\) one point at a time, while Assigner constructs a partition of \(P\) into antichains. At each round, Builder will present a new point \(x\), and list those points presented earlier that are, respectively, less than \(x\), greater than \(x\) and incomparable with \(x\). Subsequently, Assigner will assign \(x\) to an antichain. This will be done either by adding \(x\) to an antichain already containing one or more of the points presented previously, or by assigning \(x\) to a new antichain.

The strategy for Assigner is so simple and natural, it might be the case that a more complex strategy would yield a more efficient partitioning. Not so.

Condensed: the full section is in Keller & Trotter, Applied Combinatorics.

이제 너 계산기는 이것을 해결하지 않지만, 그 조각은 계산 가능합니다. 아래의 하나를 시도하거나 자신의 것을 입력하십시오.

자신의 작업을 유지

무료 계정은 모든 수업에 노트를 추가, 당신이 완료 한 기록, 당신이 해결 한 문제를 한 곳에, 그리고 당신이이 페이지에 대해 물어 수업 지도자. 수학 자체는 모두에게 열려 있습니다, 로그인 여부.

가입하기 로그인

여기서 사용된 기호

기호를 탭하면 전체 정의, 이미지 및 각 문자의 의미를 확인할 수 있습니다.

사람들이 묻는 질문

Permutation or combination?

Ask whether order matters. A lock code is a permutation (order matters); a hand of cards is a combination (it does not).

What is a graph in this sense?

Dots (vertices) joined by lines (edges), not a plot. Road maps, social networks and molecules are graphs; questions like "is there a route" and "how few colours" are graph theory.

이 페이지의 일부는 다음에서 변경되었습니다. Keller & Trotter, Applied Combinatorics (CC BY-SA 4.0). 여기서 압축하고 다시 설명; 오류는 우리의.

에 더 Combinatorics & Graph Theory