1.For the graph given in the following figure, if we start from deleting the black vertex, then local search can always find the minimum vertex cover.

要求是:一个点可以删除的条件是:这条边的另一个点没有被删除。如果可以删除,则任意删除一个。如果不能删除,则算法结束。剩下的点越少越好。

如果删除黑点,那么不能删除右边的点,也不能删除下面的点,只能删除最下面两个。因此确实达到了最优解。
T

2.We are given a set of sites S={s1, s​2,⋯,s​n​​} in the plane, and we want to choose a set of k centers C={c1, c​2,⋯,c​k} so that the maximum distance from a site to the nearest center is minimized. Here ci can be an arbitrary point in the plane.

A local search algorithm arbitrarily choose k points in the plane to be the centers, then

(1) divide S into k sets, where Si is the set of all sites for which ci is the nearest center; and
(2) for each Si, compute the central position as a new center for all the sites in Si.

If steps (1) and (2) cause the covering radius to strictly decrease, we perform another iteration, otherwise the algorithm stops.

When the above local search algorithm terminates, the covering radius of its solution is at most 2 times the optimal covering radius.

F, 原因在于K center近似比不能低于2.否则P=NP,K center可以规约为r=1的Vertex Cover问题。

3.In local search, if the optimization function has a constant value in a neighborhood, there will be a problem.
T

说明到了一个低谷或者山峰。或者平衡状态。需要随机选择一个转移。

4.Greedy method is a special case of local search.

F

Greedy是不断前进,最后达到解。而local search是不断修改值,选择一个最佳的解。求出的每一个解都是最终的解。

5.Random restarts can help a local search algorithm to better find global maxima that are surrounded by local maxima.

T

算法如果到达local maxiam就停止了,但是如果随机开始,那么可能会到达local maxiam和global maxium之间,然后找到全局最优。

6.In Metropolis Algorithm, the probability of jumping up depends on T, the temperature. When the temperature is high, it’ll be close to the original gradiant descent method.

F,温度高的时候会跳跃,温度低的时候接近下降算法。

7.Local search algorithm can be used to solve lots of classic problems, such as SAT and N-Queen problems. Define the configuration of SAT to be X = vector of assignments of N boolean variables, and that of N-Queen to be Y = positions of the N queens in each column. The sizes of the search spaces of SAT and N-Queen are O(2^N) and O(N^N),respectively.

T, 搜索空间指的是所有可能。虽然八皇后准确来说应该是N!

[题解]ADS12LocalSearch相关推荐

  1. [JS][dfs]题解 | #迷宫问题#

    题解 | #迷宫问题# 题目链接 迷宫问题 题目描述 定义一个二维数组 N*M ,如 5 × 5 数组下所示: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 1, 1 ...

  2. [JS][dp]题解 | #打家劫舍(一)#

    题解 | #打家劫舍(一)# 题目链接 打家劫舍(一) 题目描述 描述 你是一个经验丰富的小偷,准备偷沿街的一排房间,每个房间都存有一定的现金,为了防止被发现,你不能偷相邻的两家,即,如果偷了第一家, ...

  3. [JS]题解 | #魔法数字#

    题解 | #魔法数字# 题目链接 魔法数字 题目描述 牛妹给牛牛写了一个数字n,然后又给自己写了一个数字m,她希望牛牛能执行最少的操作将他的数字转化成自己的. 操作共有三种,如下: 在当前数字的基础上 ...

  4. [JS]题解 | #岛屿数量#

    题解 | #岛屿数量# 题目链接 岛屿数量 题目描述 时间限制:1秒 空间限制:256M 描述 给一个01矩阵,1代表是陆地,0代表海洋, 如果两个1相邻,那么这两个1属于同一个岛.我们只考虑上下左右 ...

  5. [JS] 题解:提取不重复的整数

    题解:提取不重复的整数 https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1 时间限制:1秒 空间限制:32M 描述 输 ...

  6. 洛谷-题解 P2672 【推销员】

    独门思路!链表加优先队列! 这题一望,贪心是跑不掉了,但是我贪心并不好,所以想到了一个复杂一些但思路更保稳的做法 思路: 1 因为是离线操作,所以我们可以倒着求,先求x=n的情况,因为那样直接就知道了 ...

  7. [洛谷1383]高级打字机 题解

    题解 这道题一看就珂以用主席树啊 这是一道神奇的题目,那么我们先敲一个主席树,然后维护一个数组len,表示下一次应该在len + 1插入, 之后对于T操作,在上一个版本的len + 1上直接执行插入 ...

  8. luogu P1549 棋盘问题(2) 题解

    luogu P1549 棋盘问题(2) 题解 题目描述 在\(N * N\)的棋盘上\((1≤N≤10)\),填入\(1,2,-,N^2\)共\(N^2\)个数,使得任意两个相邻的数之和为素数. 例如 ...

  9. 【题解搬运】PAT_L1-009 N个数求和

    从我原来的博客上搬运.原先blog作废. (伪)水题+1,旨在继续摸清这个blog(囧 题目 就是求N个数字的和.麻烦的是,这些数字是以有理数"分子/分母"的形式给出的,你输出的和 ...

最新文章

  1. 电信运营商的云机遇-【软件和信息服务】2015.01
  2. nefu 1029 字符串
  3. 29 Python 多线程简介
  4. mysql的编译_Mysql编译安装
  5. l洛谷P4779 【模板】单源最短路径(标准版)(dijkstra)
  6. java编写统计玩家总数的程序_JAVA程序:输出一组数后如何统计特定数的总数
  7. IT管理人才必备的十大能力(转)
  8. 1.2 Coin 项目
  9. 高德,百度,Google地图定位偏移以及坐标系转换
  10. java 中文乱码过滤器_JAVA中文乱码过滤器(用java过滤器解决中文乱码)V0422 整理版...
  11. 入门SVN基础使用教程
  12. ap音频测试仪软件,AP APX-525音频分析仪
  13. SQL Server2012备份到网络驱动器
  14. 信号反射问题与相关电路设计技巧
  15. 腾讯qq群推广“一键加群”的一个细节
  16. moveit缺少libfcl.so.0.6文件
  17. T2691 桶哥的问题——送桶
  18. canvas实现pc端画板
  19. MySQL数据库设计作业 ——《网上书店系统》数据库设计实验报告
  20. mysql-快速入门

热门文章

  1. 擎创科技加入龙蜥社区,共建智能运维平台新生态
  2. Native APP学习
  3. 详解WebApp与Native App的区别
  4. 微博如何发订阅消息_微博订阅消息是群发吗【相关词_新浪微博怎么同时给粉丝发消息】...
  5. 对比,SPSS/SPSS modeler/python 实现FRM,聚类模型的用户感受
  6. 软件测试用例的设计以及分类
  7. 浏览器打开jsp显示源码
  8. 流媒体巨头Netflix:用AI创作电影预告片省钱又好看
  9. 12个球,其中有一个质量不一样的小球,一个天平,称三次,找到这个质量不一样的小球。
  10. OpenCV-Python] OpenCV 中摄像机标定和 3D 重构 部分 VII