Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - bfs
Search - bfs - List
n个石头(每相邻两个的距离是1米,最边上石头和岸的距离也是1米),礼物放在第m个石头上,青蛙第i次跳2*i-1米.问能否得到礼物.(n>=49肯定能得到礼物,n<49,可以bfs或递归)-n stones (each of the two adjacent distance of a meter, the most edge of the rocks and the shore is a distance meters), gifts m on the first stone, the frog first time i jump 2 * i-1 meter. Gifts can be asked. (NGT; = 49 gift can be sure , 4; 49, zheng or recursive)
Update : 2008-10-13 Size : 823 Publisher :

此程序是解决八数码问题的。由于使用广度优先搜索,并且程序中用数组存储节点。所以只能进行比较简单的操作。-eight digital solve the problem. The use of BFS, and procedures with an array storage nodes. Therefore, only for a relatively simple operation.
Update : 2008-10-13 Size : 1636 Publisher : 于雷

比较DFS与BFS 简单的实现了,小地图范围的两种寻路算法原理的比较。 左键控制,可自动寻找路径,方便观察-DFS compared with the simple realization of BFS, the small scope of the two map routing algorithms for comparison. Left control that can automatically find a path to facilitate the observation
Update : 2008-10-13 Size : 29642 Publisher : 阿申

我们解决八数码问题,广度优先搜索可能会导致内存不够用,采用启发式搜索,启发函数为f(x)=g(x)+h(x) g(x)为该结点不同于目标结点的个数,h(x)为该结点的深度,选择那f(x)结点最小的那个结点进行扩展, 引入了一个\"扩展数组[4]\"(因为扩展的结点最多只有4个),该数组保存着某个结点的0点向各个方向的扩展的结点对象,然后对该扩展数组进行分析,利用启发函数在进行递归扩展... -us solve eight digital, BFS may lead to insufficient memory, using heuristic search, heuristic function f (x) = g (x) h (x) g (x) for the target node is different from the number of nodes, h (x) for the nodes of depth, the choice between f (x) nodes that the smallest node expansion. the introduction of an "expanded array [4]" (because the expansion of the nodes at most four), The array maintains a node of 0:00 a.m. to expand in all directions in the target node, and then expanded array analysis, use heuristic function during recursive expansion ...
Update : 2008-10-13 Size : 5507 Publisher : 丁如敏

我们解决八数码问题,广度优先搜索可能会导致内存不够用,采用启发式搜索,启发函数为f(x)=g(x)+h(x) g(x)为该结点不同于目标结点的个数,h(x)为该结点的深度,选择那f(x)结点最小的那个结点进行扩展, 引入了一个\"扩展数组[4]\"(因为扩展的结点最多只有4个),该数组保存着某个结点的0点向各个方向的扩展的结点对象,然后对该扩展数组进行分析,利用启发函数在进行递归扩展... -us solve eight digital, BFS may lead to insufficient memory, using heuristic search, heuristic function f (x) = g (x) h (x) g (x) for the target node is different from the number of nodes, h (x) for the nodes of depth, the choice between f (x) nodes that the smallest node expansion. the introduction of an "expanded array [4]" (because the expansion of the nodes at most four), The array maintains a node of 0:00 a.m. to expand in all directions in the target node, and then expanded array analysis, use heuristic function during recursive expansion ...
Update : 2008-10-13 Size : 10381 Publisher : 丁如敏

DL : 0
该程序实现了 无向图的建立和广度优先搜索及输出-the program no plans to the establishment and BFS and output
Update : 2008-10-13 Size : 8397 Publisher : 王并

Implemented BFS, DFS and A* To compile this project, use the following command: g++ -o search main.cpp Then you can run it: ./search The input is loaded from a input file in.txt Here is the format of the input file: The first line of the input file shoud contain two chars indicate the source and destination city for breadth first and depth first algorithm. The second line of input file shoud be an integer m indicate the number of connections for the map. Following m lines describe the map, each line represents to one connection in this form: dist city1 city2, which means there is a connection between city1 and city2 with the distance dist. The following input are for A* The following line contains two chars indicate the source and destination city for A* algorithm. Then there is an integer h indicate the number of heuristic. The following h lines is in the form: city dist which means the straight-line distance from the city to B is dist.
Update : 2008-10-13 Size : 2984 Publisher : bo

DL : 0
这是一个基于BFS文件搜索的java代码-This is a document based on the BFS search java code
Update : 2008-10-13 Size : 1654 Publisher : tdh

广度优先搜索 c语言实现-BFS c Language
Update : 2008-10-13 Size : 3992 Publisher : 崔恒

宽度优先算法解决八码难题-width priority code algorithm to solve eight problems
Update : 2008-10-13 Size : 2113 Publisher : 高兵

Othertu
DL : 0
[输入] 图的顶点个数N,图中顶点之间的关系及起点A和终点B [输出] 若A到B无路径,则输出“There is no path” 否则输出A到B路径上个顶点 [存储结构] 图采用邻接矩阵的方式存储。 [算法的基本思想] 采用广度优先搜索的方法,从顶点A开始,依次访问与A邻接的顶点VA1,VA2,...,VAK, 访问遍之后,若没有访问B,则继续访问与VA1邻接的顶点VA11,VA12,...,VA1M,再访问与VA2邻接顶点...,如此下去,直至找到B,最先到达B点的路径,一定是边数最少的路径。实现时采用队列记录被访问过的顶点。每次访问与队头顶点相邻接的顶点,然后将队头顶点从队列中删去。若队空,则说明到不存在通路。在访问顶点过程中,每次把当前顶点的序号作为与其邻接的未访问的顶点的前驱顶点记录下来,以便输出时回溯。 #include<stdio.h> int number //队列类型 typedef struct{ int q[20] -[imported] map of the number of vertices N, Vertex map of the relationship between the starting point and end point A and B [output] if A to B without path then exporting "There is no path" Otherwise output A to B on the path vertices [storage structure] plan adopted adjacency matrix of storage. [Algorithm for the basic idea] BFS way from the vertex A, A visit followed with adjacent vertices VA1, VA2 ,..., VAK, visiting times, if not visit B, continue to visit with the VA1 adjacent vertices VA11, VA12 ,..., VA1M. VA2 and then visit the adjacent vertices ... and so on until finding B, the first to reach point B path, must be at least a few side paths. Queue used to achieve record was visited by the vertex. Each visit with the team atop the points are adjacent to the vertex, then t
Update : 2008-10-13 Size : 9954 Publisher : Demonic

DL : 0
zoj 1136题。 BFS搜索+同余求解
Update : 2008-10-13 Size : 1044 Publisher : wzc

基本算法正稿 包括:一、数论算法;二、图论算法;三、背包问题;四、排序算法;五、高精度计算;六、 树的遍历;七 进制转换;八 全排列与组合的生成;九.查找算法;十、贪心;十一、回溯法框架;十二、DFS框架;十三、BFS框架;十五、数据结构相关算法
Update : 2008-10-13 Size : 14514 Publisher : oh204

DL : 0
文件搜索程序 在windows环境下根据键入的目录进行文件搜索,包括子目录在内进行递归遍历.使用了BFS算法.
Update : 2008-10-13 Size : 2488 Publisher : xiao fei

DL : 0
VC++实现广度优先遍历,BFS算法,属于数据结构习题
Update : 2008-10-13 Size : 162373 Publisher : 张婷

DL : 0
java的DFS(Depth-first search )和BFS(Breadth-first search)的实现-the DFS (Depth-first search) and BFS (Breadth-first search) Implementation
Update : 2008-10-13 Size : 6030 Publisher : Rachel

两种AstarPathFinder 一种DijkstraPathfinder BFS,DFS等相关寻路代码总结 带地图随机生成和记时器
Update : 2008-10-13 Size : 20057 Publisher : JC

基本数据结构与STL 树及遍历 图的DFS与BFS
Update : 2008-10-13 Size : 223584 Publisher : veryha

bfs是宽度遍历,在acm中占着很大的作用,这份课件包含了大部分内容
Update : 2008-10-13 Size : 89791 Publisher : 阿宝

双向BFS搜索算法,是针对acm.hdu.edu.cn上1401题所实现的代码,效率非常高。
Update : 2008-10-13 Size : 1304 Publisher : sinamaster
« 1 2 3 4 5 6 78 9 10 11 12 ... 20 »
DSSZ is the largest source code store in internet!
Contact us :
1999-2046 DSSZ All Rights Reserved.