Difference between revisions of "CSC352 Homework 1"
Line 19: | Line 19: | ||
=Problem #3= | =Problem #3= | ||
− | Take the threaded ''N''-Queens problem and find a different approach to parallelize it. | + | Take the threaded ''N''-Queens problem and find a different approach to parallelize it. |
− | The version that was given to you in class launches ''N'' new threads, | + | The version that was given to you in class launches ''N'' new threads, thread ''i'' starting by putting the first queen on Row 0, Column ''i'', with ''i'' ranging from 0 to ''N''-1, until one thread found a solution. Figure out another way. Remember, you could decide to use fewer threads, in which case you'd explore the solution tree in less breadth, but you'd go faster in depth... Or you could start more threads, exploring the tree slower in terms of depth, but faster in terms of breadth... Maybe... :-) |
− | Figure out a different approach, run it, and compare | + | Figure out a different approach, run it, and compare its execution time to the threaded ''N''-queens we saw in class. |
In order to do so, you will have to measure the timing of your version and compare it to the timing of the class N-Queens for several values of ''N''. | In order to do so, you will have to measure the timing of your version and compare it to the timing of the class N-Queens for several values of ''N''. |