自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

KusanoNEU的博客

No day but today.

  • 博客(6)
  • 收藏
  • 关注

原创 8 puzzle with A* algorithm

The main idea is from: http://www.cs.princeton.edu/courses/archive/spr10/cos226/assignments/8puzzle.html A* is used to find the best solution. The detail of A* could be found: http://web.mit.edu/

2016-12-10 21:23:48 2595 1

原创 weighted Independent set on trees

This is solved by dynamic programming, the algorithm is from lecture slide: http://www.cs.princeton.edu/~wayne/kleinberg-tardos/pdf/IntractabilityIII-2x2.pdf #include #include #include #inc

2016-12-05 23:13:04 654

原创 Independent set of tree with greedy algorithm

/* Independent set on trees, which could be solved by greedy algorithm. Key observation: if node v is a leaf, there exists a max cardinality independent set containing v. http://www.cs.princeton.edu/

2016-12-05 18:50:55 449

原创 3-coloring problem

#include #include #include using namespace std; bool isSafe(const vector> &graph, const vector &color, int v, int c) { for (int i = 0; i != graph.size(); ++i) if (graph[v][i] == 1 && color[i]

2016-12-03 18:16:16 698

原创 vertex cover problem with dynamic programming

#include #include #include #include #include using namespace std; struct node { int data; node *left, *right; int vc; // vc is the vertex cover count for the subtree. node(int d) : data(d

2016-12-02 18:24:06 420

原创 vertex cover approximate algorithm

Reference: http://www.geeksforgeeks.org/vertex-cover-problem-set-1-introduction-approximate-algorithm-2/ #include #include #include #include using namespace std; class Graph { private: in

2016-12-01 17:23:53 657

空空如也

空空如也

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

TA关注的人

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