Difference between revisions of "CSC352 Homework 1"

From dftwiki3
Jump to: navigation, search
Line 35: Line 35:
 
     echo "-----------------------------------"
 
     echo "-----------------------------------"
 
     echo $i
 
     echo $i
     time python threadedNQueens.py $i > /dev/null
+
     python threadedNQueens.py $i | grep "processor time"
 
  done
 
  done
  
Line 44: Line 44:
 
     ./timeIt.sh
 
     ./timeIt.sh
  
 +
* observe the output
 +
-----------------------------------
 +
10
 +
processor time:    0.023224 sec
 +
-----------------------------------
 +
11
 +
processor time:    0.02232 sec
 +
-----------------------------------
 +
12
 +
processor time:    0.094016 sec
 +
----------------------------------- 
 +
...
 +
 +
* Adapt this to your need so that you can plot the '''average''' of 3 runs of your version of the ''N''-queens to the '''average''' of 3 runs of the the class version of the ''N''-queens problem, for ''N'' ranging from 10 to 20.
 +
 +
The answer to this problem should be a pdf containing 3 parts:
 +
# a one-paragraph description of your solution
 +
# the listing of your program's main class (not the whole program)
 +
# the plot of the execution time comparing your program to the class program.
  
 
</onlydft>
 
</onlydft>

Revision as of 19:47, 1 February 2010


...