围城个人博客

人丑就要多读书


  • 首页

  • 分类

  • 关于

  • 归档

  • 标签

  • menu.projects

Shortest Path Algorithm:Floyd

发表于 2016-05-02   |   分类于 Algorithm   |  
I use the same background, which I compose, as the previous blog.Absolutely, the meanning of inputs and outputs are the same. FloydFloyd Algorithm is a Dynamic Programming Algorithm.It is more efficenct than Dijkstra and SPFA but it’s time complexity is higher which determinate Floyd Algorithm is no ...
阅读全文 »

Shortest Path Algorithm:Dijkstra

发表于 2016-05-02   |   分类于 Algorithm   |  
BackgroundTony, a clever boy, whose dream is travelling around world, has no sense of direction.The summer vacation is coming and Tony decides to see the world outside.But his the length of the vacation is limited, while he has a lot of homework needs to be done.So Tony wants to find a nearest place ...
阅读全文 »

Standard Recursion Formula of 0/1 Knapsack

发表于 2016-04-25   |   分类于 Algorithm   |  
FormulaDP[i][j] = f ( DP[i-1][j] , DP[i-1][j-weight[i]]+values[i] )For this case, f is the max function. Variables:int n:number of casesint N:number of itemsint V:max volume of the knapsackarray values:value of each itemarray weight:weight of each item Implement12345678910111213141516171819202122232 ...
阅读全文 »

Tragedy of Greedy Algorithm

发表于 2016-04-25   |   分类于 Algorithm   |  
BackgroundIt is said that, long long time ago, the poor rabbit experienced the biggest blow in her life - lost a race to the tortoise, depressed in her heart and swearing to avenge. Since then, she hid in a Hangzhou Xiasha, an agricultural park, practicing industriously. Finally she mastered the sk ...
阅读全文 »

Centos配置J2EE环境

发表于 2016-03-27   |   分类于 Notes   |  
步骤一:安装JDK12345678910111213141516# cd /usr/java # wget --no-check-certificate --no-cookies - --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u76-b13/jdk-7u76-linux-x64.rpm -O jdk-7u76-linux-x64.rpm [root@VM_49_244_centos java]# rpm -ivh jdk-7u7 ...
阅读全文 »

搜索策略学习笔记(6):Strategy of Branch & Bound

发表于 2016-03-19   |   分类于 Algorithm   |  
承接我的搜索学习笔记(4)BFS最优问题求解实例、(5)DFS最优问题求解的缺陷,我在问题搜索求解的过程中添加剪枝条件,并且对BFS和DFS分别进行了剪枝前后的性能测试,结果和总结我写在了这篇文章的最后 BFS with Bounds & Constraints123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 ...
阅读全文 »

搜索策略学习笔记(5):DFS最优问题求解的缺陷

发表于 2016-03-18   |   分类于 Algorithm   |  
承接上一篇学习笔记(BFS最优问题求解实例)我再给大家看看如果用DFS求解这个问题的代码,比BFS复杂很多在使用DFS时,我遇到的困难有: Difficult1.为了防止死循环,所以 当Ignatius走到一个Bomb-Reset-Equipment上时,这个结点的子辈结点都不能再使用这个Bomb-Reset-Equipment,而这个结点的兄弟结点和父辈结点的兄弟结点仍可以使用,所以在递归和回溯时要把控制Bomb-Reset-Equipment是否可用的变量修改(reset[i][j]–/reset[i][j]++,当reset[i][j]=1时maze[i][j]的Bomb-Reset-E ...
阅读全文 »

搜索策略学习笔记(4):BFS最优问题求解实例

发表于 2016-03-14   |   分类于 Algorithm   |  
Case:NightmareProblem DescriptionIgnatius had a nightmare last night. He found himself in a labyrinth with a time bomb on him. The labyrinth has an exit, Ignatius should get out of the labyrinth before the bomb explodes. The initial exploding time of the bomb is set to 6 minutes. To prevent the bomb ...
阅读全文 »
1…345…7
围城

围城

Java|Python|CC++

52 日志
9 分类
84 标签
RSS
GitHub Weibo Zhihu
友情链接
  • XiaoWei
  • 阿尔卑斯君
© 2014 - 2018 围城