Advertisement
Guest User

Untitled

a guest
May 1st, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. For Lab 4, you will need to write a document in LaTex. I personally would recommend overleaf.com for doing so. If you didn't get an invite to the site either ask one of your classmates to invite you, or simply sign up there. For writing equations, I would advise using an equation editor until you get used to the LaTex syntax.
  2.  
  3. Link to equation editor: http://www.codecogs.com/latex/eqneditor.php
  4.  
  5. Your Algorithm: http://rosettacode.org/wiki/Nth_root#Java
  6.  
  7. It would help to look up the Nth root approximation on youtube in-order to discuss it better in your report.
  8.  
  9. Here is a template you can use to start your first la_tex document.
  10.  
  11. https://www.overleaf.com/read/xmfxxfwwmkhw
  12.  
  13. Good luck.
  14.  
  15.  
  16.  
  17. ------------------
  18.  
  19. This lab builds on your first project and lab 4.
  20.  
  21. Basically you need to make an a number of arrays of varying sizes populated by random numbers. For each array you will need to measure is execution time.
  22.  
  23. To make your life easier, label your arrays by their size and iterate through them. My advice is to have the difference between each array size be a fixed interval. It will make your graphs look much nicer. Say 1 to n arrays where you skip i steps for every iteration.
  24.  
  25. Once you are done, plot 20 to 30 points on a graph and demonstrate that the algorithm you were testing satisfy it's given time complexity. If that does not work then do more steps and add them to your graph, otherwise you are doing something wrong.
  26.  
  27. Algorithm you can use (pick one):
  28.  
  29. Selection Sort : http://rosettacode.org/wiki/Sorting_algorithms/Selection_sort#J
  30.  
  31. Insertion Sort : http://rosettacode.org/wiki/Sorting_algorithms/Insertion_sort#Java
  32.  
  33. Quick sort: http://rosettacode.org/wiki/Sorting_algorithms/Quicksort
  34.  
  35. -- if you find those hard to write about then do both merge sort and bubble sort- They are in your notes.
  36.  
  37. -ps: the coding shouldn't take you more than 20 minutes.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement