自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(28)
  • 资源 (4)
  • 收藏
  • 关注

原创 win11下c++/msvc使用动态运行时库编译机器学习库xgboost

下载dmlc-core,解压后全部复制到 G:\software\xgboost310\dmlc-core 下面。迭代 0: [0] train-logloss:0.69314718246459961。迭代 1: [1] train-logloss:0.69314718246459961。迭代 2: [2] train-logloss:0.69314718246459961。迭代 3: [3] train-logloss:0.69314718246459961。

2025-11-17 13:47:40 616

原创 win11下c++/msvc使用动态运行时库编译机器学习库LightGBM

fast_double_parser: 从https://github.com/lemire/fast_double_parser 下载,将include中的头文件放到external_libs/fast_double_parser/include下。fmt: 从https://github.com/fmtlib/fmt 下载,将include中的头文件放到external_libs/fmt/include下。win11下c++/msvc使用动态运行时库编译的操作见我写的文章。然后依次操作下面命令。

2025-11-17 12:34:04 378

原创 win11系统下配置clion c++机器学习库dlib

win11系统下配置clion c++机器学习库dlib

2025-10-25 22:01:28 423

原创 win11系统下配置c++机器学习库mlpack

测试代码:MLPACK 模块可用性测试。配置条件: win11,clion c++,msvc 工具链, mlpack。测试代码2:中级测试 - 包含数据加载和简单算法。测试代码1:基础测试 - 验证头文件和基础功能。测试代码4:SVM 支持向量机测试代码。cmakelists.txt设置如下。测试代码3:协同过滤测试代码。mlpack下载地址。mlpack的依赖库。

2025-10-25 19:56:54 255

原创 c++配置深度学习libtorch GPU环境

c++配置深度学习libtorch GPU环境

2025-10-24 07:37:36 253

原创 c++配置深度学习libtorch CPU环境

配置条件:win11,clion c++,msvc 工具链,libtorch(pytorch 的c++接口),Release模式。cmakelists.txt设置。

2025-10-23 12:03:52 148

原创 c++调用matlab进行科学计算

Matlab有很多封装好的函数,可以直接使用,但是如果不使用并行计算方式的话其运行速度还是比较慢的。而c++作为一种静态编程语言,其运行速度非常快,但缺点是没有丰富的第三方库,而且有些C++第三方库配置起来也非常的麻烦。所以我们可以想到把C++和matlab进行混合编程。

2025-10-20 23:56:12 224

原创 C++查找bug之利器AddressSanitizer的配置

AddressSanitizer (ASan) 是查找c++程序错误的神器。从 Visual Studio 2019 版本 16.9 开始,Microsoft C/C++ 编译器 (MSVC) 和 IDE 支持AddressSanitizer清理器。关于AddressSanitizer的详细介绍请查看微软官方对它的介绍配置条件:win11系统, clion c++语言,msvc工具链,debug模式测试代码从这个报告可以看出是什么错误引起的:- 堆缓冲区溢出,即访问了堆上分配的缓冲区的边界之外的内存。

2025-10-19 12:09:49 834

原创 win11下c++/msvc使用动态运行时库编译CoinUtils

注意:静态库(lib)和动态库(dll)是不同的,静态运行时库和动态运行时库也是不同的。使用动态运行时库可以编译出静态库(lib)和动态库(dll)文件。当同时使用几个c++库时要求这几个库的编译方式一样,即要么都是使用静态运行时库编译,要么都是使用动态运行时库编译,否则报错。cplex就是采用动态运行时库编译的。它最初是COIN-OR项目的一部分,提供了许多用于优化计算的基础工具,包括线性代数、矩阵操作、输入输出等。编译安装完后看到目录下面有一个install,它就是采用上面的动态运行时库来编译出来的。

2025-10-18 11:11:34 646

原创 win11系统clion/c++(工具链msvc)配置CoinUtils、Clp

CoinUtils是一个开源的数学优化工具包,它提供了一系列用于线性规划(LP)、混合整数线性规划(MILP)等优化问题的实用工具。它是COIN-OR(Computational Infrastructure for Operations Research)项目的一部分,COIN-OR是一个旨在为运筹学社区提供开源软件的项目。我下载的是第3个CoinUtils-releases.2.11.12-w64-msvc17-md.zip。读取和写入多种格式的优化问题数据(如MPS、LP格式)

2025-10-17 15:18:41 318

原创 win11系统clion/c++ 配置zlib

zlib是一个广泛使用的、开源的的数据压缩库,它采用DEFLATE压缩算法,因其高效和便携的特性,在软件开发中应用非常普遍。source code, version 1.3.1, zipfile format那个。然后解压到硬盘 G:\software\zlib131 下面。reload cmake后目录自动变成如下样子。cmakelists.txt设置如下。main中测试程序代码如下。下源程序,我下载的是。

2025-10-17 10:50:21 164

原创 win11系统clion/c++(工具链msvc)配置bzip2

然后在项目BZip2test下面建立头文件BZip2Wrapper.h,内容如下。在clion中建立项目BZip2test,cmakelists.txt设置如下。bzip2是一种高效的文件压缩工具,支持 .bz2 格式文件的压缩和解压。下面在win11系统clion/c++(工具链msvc)下配置bzip2。然后我解压放在硬盘 I:\software下面。clion目录结构如下。

2025-10-17 09:31:59 380

原创 win11操作系统clion/c++(msvc工具链 Release x64)下 配置LAPACK

再在Mingw的安装目录 MingW_W64\bin 下面找到 libgcc_s_seh-1.dll 和 libgfortran-5.dll 文件(可能以libgfortran-3.dll命名,就是你应该能识别到他们)。把libgcc_s_seh-1.dll 命令成libgcc_s_seh_64-1.dll、libgfortran-5.dll 命令成 libgfortran_64-3.dll (这两个文件复制到其他地方再改名称)后把这两个文件复制到 C:\Windows\System32 下面;

2025-10-16 16:33:28 296

原创 win11系统 c++下配置OpenBLAS

再把bin下面的文件libopenblas.dll 复制到cmake-build-release里面,更新一下cmake-build-release。,我下载的是OpenBLAS-0.3.30-x64-64.zip,解压后可以看到如下include、lib、bin文件。平台:win11下 clion/c++, 工具链:msvc 2022。

2025-10-16 10:26:33 261

原创 [c++论文复现] 拉格朗日松弛算法求解车辆路径问题VRP

另外,In other words, the solution to [PL] gets closer to a feasible solution to [P].上面这个数学模型是运筹学里的一个经典指派问题,有成熟的求解算法,如匈牙利算法。上面这个指派问题提供了原始问题[P]的一个下界。这样得到原问题[P]的可行解,也就得到一个上界。接下来就是上界和下界通过迭代来拉紧,最后得到一个满足条件的最优解。下面使用c++直接调用求解器gurobi来求解原始的数学模型[P],案例输入数据同上。

2025-07-30 22:39:51 477

原创 clion c++配置libtorch +GPU 报错的处理

这时报错说找不到文件 torch_cpu.dll torch_cuda.dll c10.dll, 但是这些文件均在 G:\libtorch260_cu124Release\lib 下面。(注:这个是 GPU Release 版本的libtorch )。平台 clion, win11,cuda 12.4 ,cudnn 8.9.5 ,libtorch 2.6.0, vs2022。注意:libtorch、cuda、cudnn的版本号务必要匹配,vs2022也是要跟前面的匹配。

2025-06-23 20:05:57 412

原创 c++实现深度学习的环境配置(libtorch + GPU)

工具: cuda12.4, cudnn8.9.5, libtorch2.7.1(pytorch c++接口)。注意cuda与cudnn的版本一定要匹配。测试代码2:支持向量机 (deepseek给的案例,尚未检查代码逻辑,这里仅用于测试)测试代码3:循环神经网络(deepseek给的案例,尚未检查代码逻辑,这里仅用于测试)安装cuda与cudnn的方法请参考。安装libtorch的方法请参考。可见已实现使用GPU来计算。操作系统: win11。

2025-06-22 09:27:47 468

原创 c++调用cplex求解p-中位选址问题(p-median Problem)

p-中位问题的数学模型见。数据data.dat如下。

2025-05-12 10:57:57 333

原创 C++在clion平台下调用gurobi求解问题(debug & release)

set(gurobi_include H:/Gurobi11.0.2/win64/include ) #头文件。set(gurobi_include H:/Gurobi11.0.2/win64/include ) #头文件。set(gurobi_lib H:/Gurobi11.0.2/win64/lib ) #库文件。set(gurobi_lib H:/Gurobi11.0.2/win64/lib ) #库文件。从上面两个CMakelists.txt可以看出,只是最后一行的设置不一样而已。

2025-05-06 22:27:16 270

原创 C++ 在Visual Studio平台上配置 CPLEX

注:输入这里直接填写 concert.lib cplex2211.lib ilocplex.lib 即可。不需要把那么长的绝对路径填写进去。C++ 在Visual Studio平台上配置 CPLEX 的方法见。然后点击确认,大功告成。

2025-05-05 21:09:58 1713

原创 C++在clion、VS平台下debug 、release模式的运算速度比较

cout << " \n C++计算f("<< num << ")运行时间:" << tt / 1000.0 << "秒\n";eclipse平台下debug 模式时。clion平台下debug 模式时。clion平台下release模式。VS平台下debug 模式时。VS平台下release模式。

2025-05-05 18:51:15 270

原创 c++(clion)调用matplot++ & gnuplot 来画图

CMakelists.txt设置如下。

2025-05-04 22:59:20 352

原创 C++书籍推荐

1.艾弗·霍尔顿,彼得·范·维尔特 著,周百顺 译. C++20实践入门(第6版).清华大学出版社。2.[英] J. Guy Davidson 等 著,王江平 译. C++之美:代码简洁、安全又跑得快的30个要诀.电子工业出版社。2.[罗马尼亚] 马里乌斯·班西拉(Marius Bancila) 著. 现代C++编程实战 原书第2版.机械工业出版社。译. C++20高级编程(第5版).清华大学出版社。C++性能优化指南 C++性能优化指南.人民邮电出版社。译. 21天学通C++(第9版).

2025-05-03 10:42:12 379

原创 C++计算库eigen和armadillo 及 C++画图库gnuplot

set(Armadillo_DIRmm H:/software/armadillo14_4_2/include) #Armadillo头文件,注意以include结尾。下载eigen,解压后将里面的Eigen文件夹复制到H:\Visual_Studio_2022\VC\Tools\MSVC\14.43.34808\include。set(Armadillo_DIRc H:/software/armadillo14_4_2/examples/lib_win64) #设置链接库路径 库文件。

2025-04-30 19:48:54 456

原创 clion(c++)调用matlab引擎来计算

set(LINK_DIRmm I:/matlab2024b/extern/lib/win64/microsoft) #设置链接库路径 库文件。set(INC_DIRmm I:/matlab2024b/extern/include) #matlab头文件。然后在cpp文件里输入c++代码,用的是matlab文档里的代码(调用带单一返回参量的函数)include_directories(${INC_DIRmm}) #引入头文件。link_directories(${LINK_DIRmm}) #引入库文件。

2025-04-13 12:06:45 538

原创 clion/C++中文乱码解决方法

注意到下面的任务栏中显示的是UTF-8,在Pycharm中这个是没有问题。但在clion运行c++代码时就会出现问题。这时把UTF-8转换为GBK即可。Clion运行 c++代码会出现中文乱码,如下。点击中间那个convert转换即可。选择GBK,然后转换。最后再运行c++代码。

2025-04-08 20:38:36 399 1

原创 clion(C++配置msvc)调用cplex求解问题

测试代码用clpex里的例子facility.cpp,请自己到clplex安装目录下寻找,注意修改一下地址,即改成相对路径 const char* filename = "facility.dat";花了很多时间,一个一个地试,终于搞定了clion(配置msvc)调用cplex求解问题。本文主要讲clion(C++配置msvc)调用cplex求解问题。关于clion调用gurobi 请查看链接里的文章。CMakelist.txt文件里写。

2024-10-17 01:04:06 829

原创 clion与msvc2022:ninja: error: build.ninja:35: loading ‘CMakeFiles/rules.ninja‘: 系统找不到指定的文件 ,已解决

clion:ninja: error: build.ninja:35: loading 'CMakeFiles/rules.ninja': 系统找不到指定的文件 ,怎么解决?

2024-10-05 18:34:57 1574

如果你用python3.9版本安装pygraphviz,需要安装如下的轮子 pygraphviz-1.11-cp39-cp39

如果你用python3.9版本安装pygraphviz,需要安装如下的轮子 pygraphviz-1.11-cp39-cp39-win_amd64.whl 用python3.8以下版本安装pygraphviz,看文章 https://blog.youkuaiyun.com/frostime/article/details/104620220

2024-11-05

如果你用python3.12版本安装pygraphviz,需要安装如下的轮子 pygraphviz-1.12-cp312-cp3

如果你用python3.10版本安装pygraphviz,需要安装如下的轮子,windows pygraphviz-1.12-cp310-cp310-win_amd64.whl python3.8版本安装pygraphviz的安装过程,看文章https://blog.youkuaiyun.com/frostime/article/details/104620220

2024-11-05

如果你用python3.11版本安装pygraphviz,需要安装如下的轮子 pygraphviz-1.12-cp311

如果你用python3.11版本安装pygraphviz,需要安装如下的轮子 pygraphviz-1.12-cp311-cp311-win_amd64.whl 用python3.8以下版本安装pygraphviz,看文章 https://blog.youkuaiyun.com/frostime/article/details/104620220

2024-11-05

pygraphviz-1.12-cp312-cp312-win-amd64.whl,这个windows操作系统的

如果你用python3.12版本安装pygraphviz,需要安装如下的轮子 pygraphviz-1.12-cp312-cp312-win_amd64.whl python3.8版本安装pygraphviz,需要安装,看文章https://blog.youkuaiyun.com/frostime/article/details/104620220

2024-11-05

Combinatorial Optimization Theory and Algorithms Third Edition

1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 Enumeration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Running Time of Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.3 Linear Optimization Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.4 Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2. Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.1 Basic Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2 Trees, Circuits, and Cuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.3 Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.4 Eulerian and Bipartite Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.5 Planarity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.6 Planar Duality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 3. Linear Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 3.1 Polyhedra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 3.2 The Simplex Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 3.3 Duality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 3.4 Convex Hulls and Polytopes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 4. Linear Programming Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 4.1 Size of Vertices and Faces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 4.2 Continued Fractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 4.3 Gaussian Elimination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 4.4 The Ellipsoid Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 4.5 Khachiyan’s Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 4.6 Separation and Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 XII Table of Contents 5. Integer Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 5.1 The Integer Hull of a Polyhedron . . . . . . . . . . . . . . . . . . . . . . . . . . 92 5.2 Unimodular Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 5.3 Total Dual Integrality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 5.4 Totally Unimodular Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 5.5 Cutting Planes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 5.6 Lagrangean Relaxation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 6. Spanning Trees and Arborescences . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 6.1 Minimum Spanning Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 6.2 Minimum Weight Arborescences . . . . . . . . . . . . . . . . . . . . . . . . . . 125 6.3 Polyhedral Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 6.4 Packing Spanning Trees and Arborescences . . . . . . . . . . . . . . . . . 132 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 7. Shortest Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 7.1 Shortest Paths From One Source . . . . . . . . . . . . . . . . . . . . . . . . . . 144 7.2 Shortest Paths Between All Pairs of Vertices . . . . . . . . . . . . . . . . . 148 7.3 Minimum Mean Cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 8. Network Flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 8.1 Max-Flow-Min-Cut Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 8.2 Menger’s Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 8.3 The Edmonds-Karp Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 8.4 Blocking Flows and Fujishige’s Algorithm . . . . . . . . . . . . . . . . . . 166 8.5 The Goldberg-Tarjan Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 8.6 Gomory-Hu Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 8.7 The Minimum Cut in an Undirected Graph . . . . . . . . . . . . . . . . . . 179 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 9. Minimum Cost Flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 9.1 Problem Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 9.2 An Optimality Criterion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 9.3 Minimum Mean Cycle-Cancelling Algorithm . . . . . . . . . . . . . . . . 195 9.4 Successive Shortest Path Algorithm . . . . . . . . . . . . . . . . . . . . . . . . 199 9.5 Orlin’s Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 9.6 Flows Over Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 Table of Contents XIII 10. Maximum Matchings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 10.1 Bipartite Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 10.2 The Tutte Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 10.3 Tutte’s Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 10.4 Ear-Decompositions of Factor-Critical Graphs . . . . . . . . . . . . . . . 223 10.5 Edmonds’ Matching Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242 11. Weighted Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 11.1 The Assignment Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 11.2 Outline of the Weighted Matching Algorithm . . . . . . . . . . . . . . . . 247 11.3 Implementation of the Weighted Matching Algorithm . . . . . . . . . 250 11.4 Postoptimality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 11.5 The Matching Polytope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 12. b-Matchings and T -Joins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 12.1 b-Matchings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 12.2 Minimum Weight T -Joins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 12.3 T -Joins and T -Cuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 12.4 The Padberg-Rao Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 13. Matroids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 13.1 Independence Systems and Matroids . . . . . . . . . . . . . . . . . . . . . . . 291 13.2 Other Matroid Axioms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 13.3 Duality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 13.4 The Greedy Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 13.5 Matroid Intersection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308 13.6 Matroid Partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 13.7 Weighted Matroid Intersection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 14. Generalizations of Matroids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 14.1 Greedoids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 14.2 Polymatroids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 14.3 Minimizing Submodular Functions . . . . . . . . . . . . . . . . . . . . . . . . . 331 14.4 Schrijver’s Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 14.5 Symmetric Submodular Functions . . . . . . . . . . . . . . . . . . . . . . . . . 337 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 XIV Table of Contents 15. NP-Completeness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 15.1 Turing Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 15.2 Church’s Thesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 15.3 P and NP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350 15.4 Cook’s Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 15.5 Some Basic NP-Complete Problems . . . . . . . . . . . . . . . . . . . . . . . . 358 15.6 The Class coNP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 15.7 NP-Hard Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 16. Approximation Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377 16.1 Set Covering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378 16.2 Colouring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 16.3 Approximation Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 16.4 Maximum Satisfiability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 16.5 The PCP Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 16.6 L-Reductions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410 17. The Knapsack Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 17.1 Fractional Knapsack and Weighted Median Problem . . . . . . . . . . 415 17.2 A Pseudopolynomial Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 17.3 A Fully Polynomial Approximation Scheme . . . . . . . . . . . . . . . . . 420 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423 18. Bin-Packing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 18.1 Greedy Heuristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 18.2 An Asymptotic Approximation Scheme . . . . . . . . . . . . . . . . . . . . . 431 18.3 The Karmarkar-Karp Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 19. Multicommodity Flows and Edge-Disjoint Paths . . . . . . . . . . . . . . . . 443 19.1 Multicommodity Flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444 19.2 Algorithms for Multicommodity Flows . . . . . . . . . . . . . . . . . . . . . 447 19.3 Directed Edge-Disjoint Paths Problem . . . . . . . . . . . . . . . . . . . . . . 451 19.4 Undirected Edge-Disjoint Paths Problem . . . . . . . . . . . . . . . . . . . . 455 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 Table of Contents XV 20. Network Design Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467 20.1 Steiner Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468 20.2 The Robins-Zelikovsky Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 473 20.3 Survivable Network Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 20.4 A Primal-Dual Approximation Algorithm . . . . . . . . . . . . . . . . . . . 481 20.5 Jain’s Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498 21. The Traveling Salesman Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501 21.1 Approximation Algorithms for the TSP . . . . . . . . . . . . . . . . . . . . . 501 21.2 Euclidean TSPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 21.3 Local Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 21.4 The Traveling Salesman Polytope . . . . . . . . . . . . . . . . . . . . . . . . . . 519 21.5 Lower Bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525 21.6 Branch-and-Bound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532 22. Facility Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537 22.1 The Uncapacitated Facility Location Problem . . . . . . . . . . . . . . . . 537 22.2 Rounding Linear Programming Solutions . . . . . . . . . . . . . . . . . . . 539 22.3 Primal-Dual Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 22.4 Scaling and Greedy Augmentation . . . . . . . . . . . . . . . . . . . . . . . . . . 547 22.5 Bounding the Number of Facilities . . . . . . . . . . . . . . . . . . . . . . . . . 550 22.6 Local Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553 22.7 Capacitated Facility Location Problems . . . . . . . . . . . . . . . . . . . . . . 559 22.8 Universal Facility Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570 Notation Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573 Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577 Subject Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585

2011-03-06

Algorithms for Approximation

Proceedings of the 5th International Conference, Chester, July 2005 Part I. Imaging and Data Mining; Part II. Numerical Simulation; Part III. Statistical Approximation Methods; Part IV. Data Fitting and Modelling; Part V. Differential and Integral Equations; Part VI. Special Functions and Approximation on Manifolds.

2011-03-07

保罗·戴特尔,哈维·戴特尔 Java大学教程(第十一版) 答案 Java How to Program, 11e

保罗·戴特尔,哈维·戴特尔 Java大学教程(第十一版) 答案 JAVA大学教程 答案 Java How to Program, 11e (Early Objects)答案

2023-03-11

Foundations of Location Analysis

Foundations of Location Analysis设施选址方面的著作

2014-08-18

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除