原创 leetcode 765(並叉集)
原理: https://leetcode-cn.com/problems/couples-holding-hands/solution/bing-cha-ji-yu-bao-li-tong-su-yi-dong-cyu-pyth
原创 43 字符串相乘
class Solution { public: //力扣415字符串相加 string addStrings(string num1, string num2) { int n=num1.size();
原创 378. 有序矩陣中第K小的元素(二分,歸併排序,優先隊列)
class Solution { public: int kthSmallest(vector<vector<int>>& matrix, int k) { int n=matrix.size();
原创 高級算法設計-- maxcut 隨機算法和確定性算法
https://personal.vu.nl/r.a.sitters/AdvancedAlgorithms/AdvAlgChapter5.pdf
原创 k-vertex cover
來源 Richter, S., Helmert, M., & Gretton, C. (2007). A stochastic local search approach to vertex cover. In Proc. of
原创 局部搜索算法--模擬退火求解MAX-SAT
來源: 這裏是引用
原创 隨機近似算法資料
近似算法書籍: https://www.designofapproxalgs.com/book.pdf 課程:http://www-cc.cs.uni-saarland.de/course/61/
原创 高級算法設計 --MAX-SAT隨機化及去隨機化
https://www-cc.cs.uni-saarland.de/media/lectures/S17/L-ApproximationAlgorithms/apx-script05.pdf
原创 高級算法設計 --The Schwartz-Zippel Lemma
1. zero polynomial 的定義 PIT :判斷兩個多項式是否相等,或判斷 多項式是否是identically zero 證明 主要思想是通過從p中分離變量x1x_1x1來獲得變量較少的多項式。 令k爲出現
原创 Numerical Optimization共軛梯度法
n個pin個p_in個pi線性無關且共軛,表示爲x的基 這樣極小化括號的數,轉化爲n個一維的優化問題 這裏求最小值 隱含了piTAPi>0p_i^TAP_i>0piTAPi>0,所以要求對稱正定,即強凸的。 共軛法
原创 84. 柱狀圖中最大的矩形(單調棧)
暴力 class Solution { public: int largestRectangleArea(vector<int>& heights) { int n=heights.size();
原创 高級算法設計分析-- Max-SAT(隨機算法>近似算法)
筆記來源:高級算法設計(孫曉明老師部分) https://en.wikipedia.org/wiki/Maximum_satisfiability_problem#Weighted_MAX-SAT 隨機算法在近似算法中的應用 本
原创 SQP(序列二次規劃中的Marotos效應)
在信賴域SQP 問題中 在求解子問題關於拉格朗日二次近似的二次規劃子問題時,由於線性化近似不能保證子問題是相容的,通常需要merit function 或filter 在引入價值函數後當拉格朗日的Hessian 矩陣是對稱正定的