我有这个问题。 我有一张 n子,我想分成两个小子,即X节点和N-x节点,但必须限制剩余的对口数目最大化(或尽量减少被切割的对口数目)。
不清楚这是否有意义。 不是理论人,而是我的问题的抽象版本。 我应研究哪些算法可能有助于我?
这是一个家庭工作问题。 我认为,令人感兴趣的问题!
我计划在C执行。
我有这个问题。 我有一张 n子,我想分成两个小子,即X节点和N-x节点,但必须限制剩余的对口数目最大化(或尽量减少被切割的对口数目)。
不清楚这是否有意义。 不是理论人,而是我的问题的抽象版本。 我应研究哪些算法可能有助于我?
这是一个家庭工作问题。 我认为,令人感兴趣的问题!
我计划在C执行。
X = n-x的特殊情况称为最低分辨率问题,是NP-hard。 这使你的问题也变得难以解决。 Wikipedia的文章“描述了几种血清学,包括当地搜索(例如,从随机切割开始,并多次蒸).,从而缩小了切割规模)和光谱方法(例如,计算和接近第二胎面)。 如果是微小的,那么编造愤怒方案也是可能的。
也许先深入搜查点。 我们当时指定一个点,并计算迄今削减的数量。 如果这一数目超过了最佳解决办法的数目,那么我们就放弃了这一数目,背后了轨道。
我先把这一算法作为道歉式算法,但用C.1n的算法做得太困难。 绕过正义意味着不转让最后分配的 no。
基本上,你正在研究经修改的刑事诉讼问题。
One way would be to modify karger s algorythm In Karger s algo you contract vertices along random edges until you end up with only two vertices, the remaining edges represent the cut. Since it s random you just do this many times and keep the solution with the least edges in the cut.
在经过修改的版本中,一旦vert倒,你可以停止 coll跃和 count边(如果是你的话,那就算不了),就会有适当的时间,而且你可以找到解决办法。 欺骗性部分是多少次重复计算,以增加信心,达到令人满意的限制。
If I have an algorithm which is comprised of (let s say) three sub-algorithms, all with different O() characteristics, e.g.: algorithm A: O(n) algorithm B: O(log(n)) algorithm C: O(n log(n)) How do ...
I m using Electro in Lua for some 3D simulations, and I m running in to something of a mathematical/algorithmic/physics snag. I m trying to figure out how I would find the "spin" of a sphere of a ...
There s a (relatively) new sort on the block called Timsort. It s been used as Python s list.sort, and is now going to be the new Array.sort in Java 7. There s some documentation and a tiny Wikipedia ...
As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...
Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...
I have a directed graph and my problem is to enumerate all the minimal (cycles that cannot be constructed as the union of other cycles) directed cycles of this graph. This is different from what the ...
Given an array of integers arr = [5, 6, 1]. When we construct a BST with this input in the same order, we will have "5" as root, "6" as the right child and "1" as left child. Now if our input is ...
I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...