Title: A Parallel Algorithm for the Generation of Costas Sequences
1A Parallel Algorithm for the Generation of
Costas Sequences
- E. Orozco - D. Bollman
- MPI Seminar
- April 17, 2009
- Department of Computer Science
- UPR-Rio Piedras
2References
- O. Moreno, J. Ramirez, D. Bollman, and E. Orozco
Faster Backtracking Algorithms for the Generation
of Symmetry-Invariant Permutations. Journal of
Applied Mathematics 26 (2002) 277-287. - D. Bollman and E. Orozco A Faster Algorithm for
the n-Queens Problem. Congressus Numerantium,
Vol. 148 (2001), 193-200. - E. Horowitz, Sahni and Rajasekaran Computer
Algorithms/C. Computer Science Press, 1996.
3Application of Costas Sequences
- Costas arrays are permutation matrices that
provide a frequency indexing sequence that
permits at most one tone in cross-correlation of
certain waveforms.
4MPI Seminar Orozco-Bollman
MPI Seminar Orozco-Bollman Dec 09, 2004
Examples
?
?
?
?
?
Not a solution to 5-Costas
A solution to 5-Costas
(4, 1, 2, 5, 3)
(3, 5, 1, 2, 4)
5MPI Seminar Orozco-Bollman Dec 09, 2004
Symmetries
(4, 1, 2, 5, 3)
6MPI Seminar Orozco-Bollman Dec 09, 2004
Symmetries
(4, 1, 2, 5, 3)
(3, 5, 2, 1, 4)
7MPI Seminar Orozco-Bollman Dec 09, 2004
Symmetries
(4, 1, 2, 5, 3)
(3, 5, 2, 1, 4)
(2, 5, 4, 1, 3)
8MPI Seminar Orozco-Bollman Dec 09, 2004
Symmetries
(4, 1, 2, 5, 3)
(3, 5, 2, 1, 4)
(3, 1, 4, 5, 2)
(2, 5, 4, 1, 3)
9Costas Property Difference Triangle
Let
be a permutation of the integers from 1 to n.
Then X is a Costas sequence if and only if
10Examples Costas Property Difference Triangle
11Examples Costas Property Difference Triangle
?
?
?
?
?
12Backtracking Technique Example n 4
1
12
124
1243
13Backtracking Technique Example n 4
1
13
12
132
124
1243
14Backtracking Technique Example n 4
1
13
12
132
124
134
1243
1342
15Backtracking Technique Example n 4
1
13
12
14
132
124
143
134
142
1243
1342
1423
16Backtracking Technique Example n 4
1
2
13
12
14
23
21
24
132
124
143
231
214
134
213
241
243
142
2314
2431
1243
1342
1423
2134
17Backtracking Technique Example n 4
1
2
3
13
12
14
23
21
24
32
31
34
132
124
143
231
214
314
312
134
213
241
243
324
342
142
2314
2431
1243
1342
1423
2134
3124
3241
3421
18Backtracking Technique Example n 4
1
2
3
4
13
12
14
23
21
24
32
31
34
42
41
43
132
124
143
231
214
314
312
412
421
413
134
213
241
243
324
342
423
431
142
2314
2431
1243
1342
1423
2134
3124
3241
3421
4132
4213
4312
19Master-Slave Technique
20Main code
if ( myid Master ) Master_Code( ) else
Worker_Code( )
MPI_Send (void buf, int count, MPI_Datatype
datatype, int dest, int tag, MPI_Comm
comm) MPI_Recv (void buf, int count,
MPI_Datatype datatype, int source, int tag,
MPI_Comm comm, MPI_Status status)
21Xi
Xi1
Xid
Master sends a subsequence with d terms having
the Costas property
22Worker receives the subsequence
Xi
Xi1
Xid
Y1
Yk
Worker tries to append as many terms to the right
as possible so that the enlarged subsequence
preserves the Costas property
23Xi
Xi1
Xid
Y1
Yk
Zt
Z1
Worker tries to append more terms to the left,
so that the enlarged subsequence preserves the
Costas property
24Xi
Xi1
Xid
Y1
Yk
Zt
Z1
Worker generates ¼ of ALL Costas solutions having
(Xi,Xi1,,Xid) as a subsequence.
25Masters Code
CostasMaster ( ) send each worker an
initial message //just the first chunk of
work while (there is a job to do)
receive answer from any worker Wi send
Wi another message to work on compute
if (there is no more job to do)
receive answer from any worker Wi send
Wi a STOP signal
26Workers Code
CostasWorker ( ) do receive message
from Master if (message ! STOP) compute
send answer to Master receive new
message from Master while (message !
STOP)
27Lets make some runs in your Gauss cluster!
Compile mpicc CostasPar.c Execute with 4
processes mpirun np 4 a.out
28(No Transcript)