发现(近)最小覆盖集的光盘上的2-D平面 [英] find (near-)minimal covering set of discs on a 2-D plane

查看:120
本文介绍了发现(近)最小覆盖集的光盘上的2-D平面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好了,说我有一堆光盘中已知的固定位置上坐的飞机。每盘1个单位的半径。平面被完全覆盖的一组片中的,事实上,它是广泛过度覆盖的一组片中的,数量级或两个的一些地区的订单。我想找到仍然完全覆盖面盘的一个子集。最佳的是好的,但不是必需的。

OK, say I've got a bunch of discs sitting on a plane in fixed known locations. Each disc is 1 unit in radius. The plane is fully covered by the set of discs, in fact, it is extensively over-covered by the set of discs, by an order of magnitude or two in some areas. I'd like to find a subset of the discs that still fully cover the plane. Optimal is nice, but not necessary.

下面是前图所示:

和这里的说明后:

在我看来,这有不得不做Delauney三角双重问题,但我不能肯定,可以帮助我。我也知道,这是类似的,但不一样的,在计算几何光盘覆盖问题。这是一个标准的问题,他的名字我不知道吗?

It seems to me that there's a dual problem having to do with Delauney triangulation, but I'm not quite sure that helps me. I also know that this is similar, but not the same as, the disc covering problem in computational geometry. Is this a standard problem whose name I don't know?

可能的方法在我看来,包括不断增长的使用本地贪婪搜索一个覆盖集,并反复使用的最近对查询取出光盘一次。我不知道如果任是保证正常工作,我也没有通过细节工作。

Possible approaches seem to me to include growing a covering set using a local greedy search, and iteratively using a nearest-pair query to remove discs one at a time. I'm not sure if either is guaranteed to work well, and I haven't worked through the details.

呵呵,且应用程序,如果你没有猜对了,找了ZIP code形心的子样本进行查询时,包括地图,所以的 N 的是约50,000。

Oh, and the application is, if you haven't guessed it, finding a subsample of ZIP code centroids to cover a map when making queries, so n is about 50,000.

推荐答案

下面基本上是你的问题的一个更precise重述,但它可能会帮助:

Game Plan

The following is basically just a more precise restatement of your problem, but it might help:

  1. 枚举所有的连接区域,导致当所有磁盘的边界绘制的平面。由假设,每个区域被水覆盖着1个或多个磁盘。
  2. 在每个地区是一个东西被覆盖,并且每个磁盘是一个涵盖的东西。找到最小集合覆盖这一组区域。这是一个NP难不幸。
  1. Enumerate every connected region in the plane that results when the boundaries of all disks are drawn. By assumption, each of these regions is covered by 1 or more disks.
  2. Each region is a "thing to be covered", and each disk is a "covering thing". Find the minimum set cover on this set of regions. This is NP-hard unfortunately.

这可能无法利用所有可用的结构问题,但它肯定会给你一个最佳答案。

This might not be exploiting all the structure available in the problem, but it will definitely give you an optimal answer.

枚举的区域和记录的磁盘覆盖每个步骤1中是棘手的部分。区域不是一般凸这使得相交测试棘手,并且每圈添加可能会加倍区域的数量。下面是我会接近了:

Enumerating the regions and recording which disks cover each in step 1 is the tricky part. Regions are not in general convex which makes intersection tests tricky, and every circle you add potentially doubles the number of regions. Here is how I would approach that:

忘掉每个区域的实际位置,并且仅在其中术语磁盘它是里面并且它是外侧限定的区域。即一个区域是由0/1值的长度 - 正向量定义,每一个指示内部或外部磁盘的区域是否是被包括在交叉 - 有问题的区域是由相交的所有这些n个区域形成。所以,原则上你可以有多达2 ^ n个区域,但在实践中的一些(大部分)载体产生空地区,因为他们带来相交的两个磁盘有没有交集 - 这个很容易测试,谢天谢地。它应该是简单的递归生成所有非空的区域,不同的是...

Forget about the actual location of each region, and define a region only in terms of which disks it is inside and which it is outside. I.e. a region is defined by a length-n vector of 0/1 values, each indicating whether the region inside or outside that disk is to be included in the intersection -- the region in question is formed by intersecting all these n regions. So in principle you could have up to 2^n regions, but in practice some (most) vectors produce empty regions because they entail intersecting two disks that have no intersection -- this is easy to test for, thankfully. It should be straightforward to recursively generate all non-empty regions, except that...

不幸的是我现在看到它的的需要进行全面相交测试,因为它并不总是能够知道什么时候一个区域将是空的。关键的反例是,由于两个磁盘A和B有一个小条子重叠,另外C盘取决于所有3个磁盘的位置重叠每个A和B,以及所有3的交集可以有或者没有为非空。 (看到这一点,得出3盘以不同的颜色与在绘图程序中50%不透明度,并移动它们。)

Unfortunately I now see that it is necessary to perform full intersection testing, because it's not always possible to tell when a region will be empty. The critical counterexample is that, given two disks A and B that have a small sliver of overlap and another disk C that overlaps each of A and B, depending on the positions of all 3 disks, the intersection of all 3 either may or may not be non-empty. (To see this, draw 3 disks in different colours with 50% opacity in a drawing program, and move them around.)

由于生成非空区的确切名单看起来这将是一个大量的工作,需要很长的时间,由于相交测试,并且你声称你不需要最优的解决方案,您可以使用网格尽量只样本点为一组的事物被覆盖,而不是非空区域的确切列表。这是简单的,以确定哪些磁盘覆盖给定样品点。那么解决的最大集合覆盖和以前一样。

Since generating the exact list of non-empty regions looks like it will be a lot of work and take a long time due to intersection testing, and you claim you don't need optimal solutions, you could try just using a grid of sample points as the set of "things to be covered" instead of the exact list of non-empty regions. It's straightforward to determine which disks cover a given sample point. Then solve maximum set cover as before.

要获得信任,有没有间隙,重新运行几次,每次随机引起的颤动样本点的坐标。增加的采样点的密度,直到有在最终结果未发生变化。

To get confidence that there are no gaps, rerun several times, randomly jittering the sample points' co-ordinates each time. Increase the density of sample points until there is no change in the final result.

这篇关于发现(近)最小覆盖集的光盘上的2-D平面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆