• 沒有找到結果。

each column. Besides the operations of a standard mesh, each processor may also

N/A
N/A
Protected

Academic year: 2021

Share "each column. Besides the operations of a standard mesh, each processor may also "

Copied!
2
0
0

加載中.... (立即查看全文)

全文

(1)

1

5. Cost and Knight's Tours in Parallel

The cost of solving a problem on a parallel system is defined as the product of parallel run time and the number of processors used. It reflects the total time that each processor spends in solving the problem. The cost of solving a problem on a single processor is the execution time of the fastest known sequential algorithm. In the knight's tour problem, any sequential algorithm designed to construct a knight's tour on an n×m chessboard on a single processor must run at least in O(nm) time, because it have to decide the connectivity for each square on the board. Our algorithms Knight(n, m) and OpenKnight(n, m) can also run in O(nm) time to construct a knight's tour on a single processor so that they are cost optimal.

Our algorithms can also be implemented on parallel computer systems by following the methods described in Parberry [13] as a model. A mesh is an extension of the linear array to two dimensions with a particularly simple interconnection pattern. Each processor has a direct communication link connecting it to four other adjacent processors. An n × m mesh has n× m processors and processor (i, j) is connected to processors (i-1, j), (i+1, j), (i, j-1) and (i, j+1) for 0 ≤ i < n and 0 ≤ j < m.

A mesh with CREW buses is a mesh-connected machine with a bus for each row and

each column. Besides the operations of a standard mesh, each processor may also

write to or read from either its row bus or column bus. Only one processor has the

(2)

2

permission to write to each bus at any given time but concurrent reads from a bus are permitted without any restrictions. A CREW PRAM is a parallel machine where the processors can access a shared memory with concurrent reads and exclusive write of a single shared memory cell. Our algorithms can construct a knight's tour on an n×m board in O(1) time on a n ×m mesh, in O(1) time on an n×m mesh with multiple CREW buses, and also in O(1) time on a CREW PRAM with O(nm) processors.

Similar to the work in Ian Parberry [13], our method is also a divide-and-conquer

approach. Therefore, we can also achieve the goal of optimal cost.

參考文獻

相關文件

Rather than requiring a physical press of the reset button before an upload, the Arduino Uno is designed in a way that allows it to be reset by software running on a

An n×n square is called an m–binary latin square if each row and column of it filled with exactly m “1”s and (n–m) “0”s. We are going to study the following question: Find

The purpose of this research is to study a tiling problem: Given an m × n chessboard, how many ways are there to tile the chessboard with 1 × 2 dominoes and also ”diagonal”

6 《中論·觀因緣品》,《佛藏要籍選刊》第 9 冊,上海古籍出版社 1994 年版,第 1

In particular, we present a linear-time algorithm for the k-tuple total domination problem for graphs in which each block is a clique, a cycle or a complete bipartite graph,

To proceed, we construct a t-motive M S for this purpose, so that it has the GP property and its “periods”Ψ S (θ) from rigid analytic trivialization generate also the field K S ,

Ayurvedic medicine aims to keep each individual’s bo dy in a health y ba lanc e accord in g to its uniqu e combina ti on of doshas... It is also a money -making business where th

– The futures price at time 0 is (p. 275), the expected value of S at time ∆t in a risk-neutral economy is..