文件名称:BestFirstSearch_HeapAlgo
介绍说明--下载内容均来自于网络,请自行研究使用
1. 此程式執行將從路徑讀取一個文字檔 ( 路徑:C:INPUT.TXT )
2. 執行結束會產生一個排序後的文字檔 ( 路徑:C:OUTPUT.TXT )
3. 給定的初始盤面一定有解
本程式採用的演算法策略為Best-first search with branch-and-bound algorithm
1. 使用Max heap 實作Priority queue
2. 使用bound function 估計目前盤面走至答案最少需要幾步
第一部分
所謂 heap property (或稱 heap condition) 是指每個 node 內的資料比它左右兩側 child nodes 內的資料都小 (但左右兩 child nodes 之間並無一定的關係)。
雖說 heap 在觀念上是一棵 complete binary tree, 實際上是存在一個陣列當中 root 存在 A[1], 接下來將 A[2] 與 A[3] 由左到右依序補滿第二層, 再將 A[4], A[5], A[6], A[7] 由左到右依序補滿第三層…。-1. This program is running from the path to read a text file (path: C: INPUT.TXT)
2. Implementation of the end will produce a sorted text file (path: C: OUTPUT.TXT)
3. Given the initial disk of at least one solution
The program uses the algorithm strategy Best-first search with branch-and-bound algorithm
1. Using the Max heap implement Priority queue
2. Bound function is estimated using the disk at least a few steps away to answer
The first part
The so-called heap property (or called heap condition) refers to the information within each node than its left and right child nodes of the information is small (about two child nodes, but there is no necessary relationship between).
Although the concept of heap is a complete binary tree, in fact there exist root among an array A [1], then the A [2] and A [3] from left to right order of fill over the second layer, then A [4], A [5], A [6], A [7] from left to right order of filling up the third tier ....
2. 執行結束會產生一個排序後的文字檔 ( 路徑:C:OUTPUT.TXT )
3. 給定的初始盤面一定有解
本程式採用的演算法策略為Best-first search with branch-and-bound algorithm
1. 使用Max heap 實作Priority queue
2. 使用bound function 估計目前盤面走至答案最少需要幾步
第一部分
所謂 heap property (或稱 heap condition) 是指每個 node 內的資料比它左右兩側 child nodes 內的資料都小 (但左右兩 child nodes 之間並無一定的關係)。
雖說 heap 在觀念上是一棵 complete binary tree, 實際上是存在一個陣列當中 root 存在 A[1], 接下來將 A[2] 與 A[3] 由左到右依序補滿第二層, 再將 A[4], A[5], A[6], A[7] 由左到右依序補滿第三層…。-1. This program is running from the path to read a text file (path: C: INPUT.TXT)
2. Implementation of the end will produce a sorted text file (path: C: OUTPUT.TXT)
3. Given the initial disk of at least one solution
The program uses the algorithm strategy Best-first search with branch-and-bound algorithm
1. Using the Max heap implement Priority queue
2. Bound function is estimated using the disk at least a few steps away to answer
The first part
The so-called heap property (or called heap condition) refers to the information within each node than its left and right child nodes of the information is small (about two child nodes, but there is no necessary relationship between).
Although the concept of heap is a complete binary tree, in fact there exist root among an array A [1], then the A [2] and A [3] from left to right order of fill over the second layer, then A [4], A [5], A [6], A [7] from left to right order of filling up the third tier ....
(系统自动生成,下载前可以参看下载内容)
下载文件列表
BestFirstSearch_HeapAlgo.cpp