Advertisement
olemis

Coursera algs4partII-004 - Assignment 4

Jan 3rd, 2015
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.18 KB | None | 0 0
  1.  
  2. Algorithms, Part II
  3. by Kevin Wayne, Robert Sedgewick
  4.  
  5.  
  6. Programming Assignment 4: Boggle | boggle.zip
  7. Submission time Fri-02-Jan 18:45:17
  8. Raw Score 81.67 / 100.00
  9. Feedback See the Assessment Guide for information on how to read this report.
  10. Assessment Summary
  11. Compilation: PASSED
  12. Style: FAILED
  13. Findbugs: No potential bugs found.
  14. API: PASSED
  15.  
  16. Correctness: 13/13 tests passed
  17. Memory: 0/3 tests passed
  18. Timing: 4/6 tests passed
  19.  
  20. Aggregate score: 81.67% [Correctness: 65%, Memory: 10%, Timing: 25%, Style: 0%]
  21. Assessment Details
  22. The following files were submitted:
  23. ----------------------------------
  24. total 28K
  25. -rw-r--r-- 1 2.5K Jan 3 02:47 BoggleSolver.java
  26. -rw-r--r-- 1 4.1K Jan 3 02:47 Dictionnaire.java
  27. -rw-r--r-- 1 4.3K Jan 3 02:47 Exploration.java
  28. -rw-r--r-- 1 4.1K Jan 3 02:47 studentSubmission.zip
  29.  
  30.  
  31. ******************************************************************************
  32. * compiling
  33. ******************************************************************************
  34.  
  35.  
  36. % javac BoggleSolver.java
  37. *-----------------------------------------------------------
  38. ================================================================
  39.  
  40.  
  41.  
  42. % checkstyle *.java
  43. *-----------------------------------------------------------
  44. BoggleSolver.java:14:8: Unused import - java.util.List.
  45. BoggleSolver.java:24:1: File contains tab characters (this is the first instance).
  46. ================================================================
  47.  
  48.  
  49. % findbugs *.class
  50. *-----------------------------------------------------------
  51. ================================================================
  52.  
  53.  
  54. Testing the APIs of your programs.
  55. *-----------------------------------------------------------
  56. BoggleSolver:
  57.  
  58. ================================================================
  59.  
  60.  
  61. ******************************************************************************
  62. * correctness
  63. ******************************************************************************
  64.  
  65. Testing methods in BoggleSolver
  66. *-----------------------------------------------------------
  67. Running 13 total tests.
  68.  
  69. Test 1: test getAllValidWords() on two fixed 4-by-4 boards given in assignment
  70. * dictionary = dictionary-algs4.txt; board = board4x4.txt
  71. * dictionary = dictionary-algs4.txt; board = board-q.txt
  72. ==> passed
  73.  
  74. Test 2: test getAllValidWords() on fixed 4-by-4 boards
  75. * dictionary = dictionary-yawl.txt; board = board4x4.txt
  76. * dictionary = dictionary-yawl.txt; board = board-points1.txt
  77. * dictionary = dictionary-yawl.txt; board = board-points2.txt
  78. * dictionary = dictionary-yawl.txt; board = board-points3.txt
  79. * dictionary = dictionary-yawl.txt; board = board-points4.txt
  80. * dictionary = dictionary-yawl.txt; board = board-points5.txt
  81. ==> passed
  82.  
  83. Test 3: test getAllValidWords() on more fixed 4-by-4 boards
  84. * dictionary = dictionary-yawl.txt; board = board-points100.txt
  85. * dictionary = dictionary-yawl.txt; board = board-points200.txt
  86. * dictionary = dictionary-yawl.txt; board = board-points300.txt
  87. * dictionary = dictionary-yawl.txt; board = board-points400.txt
  88. * dictionary = dictionary-yawl.txt; board = board-points500.txt
  89. * dictionary = dictionary-yawl.txt; board = board-points750.txt
  90. * dictionary = dictionary-yawl.txt; board = board-points1000.txt
  91. * dictionary = dictionary-yawl.txt; board = board-points1250.txt
  92. * dictionary = dictionary-yawl.txt; board = board-points1500.txt
  93. * dictionary = dictionary-yawl.txt; board = board-points2000.txt
  94. ==> passed
  95.  
  96. Test 4: test getAllValidWords() on random Hasbro boards
  97. * dictionary = dictionary-yawl.txt; board = 10 random Hasbro boards
  98. * dictionary = dictionary-yawl.txt; board = 50 random Hasbro boards
  99. * dictionary = dictionary-yawl.txt; board = 100 random Hasbro boards
  100. ==> passed
  101.  
  102. Test 5: test getAllValidWords() on high-scoring N-by-N boards
  103. * dictionary = dictionary-yawl.txt; board = board-points4410.txt
  104. * dictionary = dictionary-yawl.txt; board = board-points4527.txt
  105. * dictionary = dictionary-yawl.txt; board = board-points13464.txt
  106. * dictionary = dictionary-yawl.txt; board = board-points26539.txt
  107. ==> passed
  108.  
  109. Test 6: test getAllValidWords() on exotic boards
  110. * dictionary = dictionary-yawl.txt; board = board-dodo.txt
  111. * dictionary = dictionary-yawl.txt; board = board-noon.txt
  112. * dictionary = dictionary-yawl.txt; board = board-couscous.txt
  113. * dictionary = dictionary-yawl.txt; board = board-rotavator.txt
  114. * dictionary = dictionary-yawl.txt; board = board-estrangers.txt
  115. * dictionary = dictionary-yawl.txt; board = board-antidisestablishmentarianisms.txt
  116. * dictionary = dictionary-yawl.txt; board = board-dichlorodiphenyltrichloroethanes.txt
  117. * dictionary = dictionary-yawl.txt; board = board-pneumonoultramicroscopicsilicovolcanoconiosis.txt
  118. ==> passed
  119.  
  120. Test 7: test getAllValidWords() on boards with a Q
  121. * dictionary = dictionary-yawl.txt; board = board-qwerty.txt
  122. * dictionary = dictionary-yawl.txt; board = board-quinquevalencies.txt
  123. * dictionary = dictionary-yawl.txt; board = board-inconsequentially.txt
  124. * dictionary = dictionary-yawl.txt; board = board-qaimaqam.txt
  125. * dictionary = dictionary-yawl.txt; board = board-aqua.txt
  126. * dictionary = dictionary-yawl.txt; board = 100 random Hasbro boards
  127. * dictionary = dictionary-16q.txt; board = board-9q.txt
  128. * dictionary = dictionary-16q.txt; board = board-16q.txt
  129. ==> passed
  130.  
  131. Test 8: test getAllValidWords() on random M-by-N boards
  132. * dictionary = dictionary-common.txt; board = 100 random 3-by-3 boards
  133. * dictionary = dictionary-common.txt; board = 100 random 4-by-4 boards
  134. * dictionary = dictionary-common.txt; board = 100 random 5-by-5 boards
  135. * dictionary = dictionary-common.txt; board = 20 random 5-by-10 boards
  136. * dictionary = dictionary-common.txt; board = 20 random 10-by-5 boards
  137. ==> passed
  138.  
  139. Test 9: test getAllValidWords() on random M-by-N boards
  140. * dictionary = dictionary-common.txt; board = 10 random 2-by-2 boards
  141. * dictionary = dictionary-common.txt; board = 10 random 1-by-10 boards
  142. * dictionary = dictionary-common.txt; board = 10 random 10-by-1 boards
  143. * dictionary = dictionary-common.txt; board = 10 random 1-by-1 boards
  144. * dictionary = dictionary-common.txt; board = 10 random 1-by-2 boards
  145. * dictionary = dictionary-common.txt; board = 10 random 2-by-1 boards
  146. * dictionary = dictionary-common.txt; board = 1 random 0-by-4 boards
  147. * dictionary = dictionary-common.txt; board = 1 random 4-by-0 boards
  148. ==> passed
  149.  
  150. Test 10: test getAllValidWords() on boards with no valid words
  151. * dictionary = dictionary-nursery.txt; board = board-points0.txt
  152. * dictionary = dictionary-2letters.txt; board = board-points4410.txt
  153. ==> passed
  154.  
  155. Test 11: mutating dictionary[] after passing to BoggleSolver constructor
  156. * dictionary = dictionary-algs4.txt
  157. * dictionary = dictionary-algs4.txt; board = board4x4.txt
  158. * dictionary = dictionary-algs4.txt; board = 10 random Hasbro boards
  159. ==> passed
  160.  
  161. Test 12: create more than one BoggleSolver object at a time
  162. [ BoggleSolver object 1 uses dictionary-algs4.txt ]
  163. [ BoggleSolver object 2 uses dictionary-nursery.txt ]
  164. * dictionary = dictionary-algs4.txt; board = 10 random Hasbro boards
  165. * dictionary = dictionary-nursery.txt; board = 10 random Hasbro boards
  166. * dictionary = dictionary-algs4.txt; board = 10 random Hasbro boards
  167. ==> passed
  168.  
  169. Test 13: test scoreOf() on various dictionaries
  170. * dictionary = dictionary-algs4.txt
  171. * dictionary = dictionary-common.txt
  172. * dictionary = dictionary-shakespeare.txt
  173. * dictionary = dictionary-nursery.txt
  174. * dictionary = dictionary-yawl.txt
  175. ==> passed
  176.  
  177.  
  178. Total: 13/13 tests passed!
  179.  
  180. ================================================================
  181.  
  182. ******************************************************************************
  183. * memory
  184. ******************************************************************************
  185.  
  186. Computing memory of BoggleSolver
  187. *-----------------------------------------------------------
  188. Running 3 total tests.
  189.  
  190. Test 1: memory with dictionary-algs4.txt (must be <= 2x reference solution).
  191. - memory of dictionary[] = 494472 bytes
  192. - memory of student BoggleSolver = 2904024 bytes
  193. - memory of reference BoggleSolver = 5135408 bytes
  194. - student / reference = 0.57
  195. ==> passed
  196.  
  197. Test 2: memory with dictionary-shakespeare.txt (must be <= 2x reference solution).
  198. - memory of dictionary[] = 1925392 bytes
  199. - memory of student BoggleSolver = 10208472 bytes
  200. - memory of reference BoggleSolver = 17479568 bytes
  201. - student / reference = 0.58
  202. ==> passed
  203.  
  204.  
  205. Total: 0/3 tests passed:Test aborted. Ran out of time or crashed before completion.
  206. ================================================================
  207.  
  208.  
  209.  
  210. ******************************************************************************
  211. * timing
  212. ******************************************************************************
  213.  
  214. Timing BoggleSolver
  215. *-----------------------------------------------------------
  216. Running 6 total tests.
  217.  
  218. Test 1: timing constructor (must be <= 5x reference solution).
  219. * dictionary-algs4.txt
  220. - student solution time (in seconds): 0.13
  221. - reference solution time (in seconds): 0.02
  222. - ratio: 5.68
  223.  
  224. * dictionary-enable2k.txt
  225. - student solution time (in seconds): 0.62
  226. - reference solution time (in seconds): 0.35
  227. - ratio: 1.78
  228.  
  229. * dictionary-yawl.txt
  230. - student solution time (in seconds): 0.61
  231. - reference solution time (in seconds): 0.55
  232. - ratio: 1.11
  233.  
  234. * dictionary-zingarelli2005.txt
  235. - student solution time (in seconds): 2.76
  236. - reference solution time (in seconds): 0.62
  237. - ratio: 4.48
  238.  
  239. ==> FAILED
  240.  
  241. Test 2: timing findAllWords() for 1.0 seconds (must be <= 25000x reference solution).
  242. - reference solution calls per second: 4815.18
  243. - student solution calls per second: 359.06
  244. - reference / student ratio: 13.41
  245.  
  246. ==> passed
  247.  
  248. Test 3: timing findAllWords() for 1.0 seconds (must be <= 25x reference solution).
  249. - reference solution calls per second: 5014.99
  250. - student solution calls per second: 1191.00
  251. - reference / student ratio: 4.21
  252.  
  253. ==> passed
  254.  
  255. Test 4: timing findAllWords() for 1.0 seconds (must be <= 10x reference solution).
  256. - reference solution calls per second: 5084.92
  257. - student solution calls per second: 1130.00
  258. - reference / student ratio: 4.50
  259.  
  260. ==> passed
  261.  
  262. Test 5: timing findAllWords() for 1.0 seconds (must be <= 5x reference solution).
  263. - reference solution calls per second: 4515.48
  264. - student solution calls per second: 1116.00
  265. - reference / student ratio: 4.05
  266.  
  267. ==> passed
  268.  
  269. Test 6: timing findAllWords() for 3.0 seconds (must be <= 2x reference solution).
  270. - reference solution calls per second: 5020.00
  271. - student solution calls per second: 1131.67
  272. - reference / student ratio: 4.44
  273.  
  274. ==> FAILED
  275.  
  276.  
  277. Total: 4/6 tests passed!
  278.  
  279. ================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement