REVISED 2/5: simpler turnin procedure (at end) This is the hw1 program part. The basic goal is to implement two different versions of the UF data structure, and compare their performance in the "Erdos Renyi random graph" application. It is due: 9pm Tuesday 2/7 (about one week to do it). In fact it is a short amount of code, but for some of you there may be some challenge in trying BlueJ. This is a BlueJ project. In fact it is possible to do it outside the lab, but here I'll describe how to start in the lab environment. To start the project in the lab, at a terminal you want to copy UFI.jar to your personal ~/cs323/hw1/ directory, and then open it under BlueJ. Like this: userid@caribou:~$ mkdir ~/cs323/hw1 userid@caribou:~$ cd ~/cs323/hw1 userid@caribou:~/cs323/hw1$ cp ~cs323000/share/hw1/UFI.jar . userid@caribou:~/cs323/hw1$ bluej UFI.jar & [1] 12345 userid@caribou:~/cs323/hw1$ The BlueJ window should appear. The goal here is that you will finish two different implementations of the union-find data structure, and then use the driver to compare their performance. The files you edit are: WeightedQuickUnionUF.java PathCompQuickUnionUF.java The first should be weighted quick union without path compression, the second should be path compression (or path halving) without weights. Unlike the book, we will define these classes as subclasses of QuickUnionUF, so you only define the data and methods that differ from the superclass. I don't think the book provides code for path compression, but you can find something in the slides. Once you think your code is working, try running ErdosRenyi.main(). You should see that they have similar performance (in my tests, half compression is a bit faster than full compression), and both are much faster than QuickUnionUF. Since the path compression approach uses half the space, it may be the best choice in low-memory situations. Turnin: once your program is compiled and working, under the Project menu select "Create Jar File" (NOT "Save As..."). A dialog window pops up: select ErdosRenyi as the Main class, click both boxes (to include source and project files), and click Continue. Next you get a file dialog (first time you use it, it shows your home directory). Navigate into your ~/cs323/hw1/, and enter "sol.jar" as the File Name, and click Create. If you did this correctly, you should be able to run your code from the jar file itself as follows: cd ~/cs323/hw1 java -jar sol.jar REVISED (2/5): simpler turnin procedure! Just leave your sol.jar file in your ~/cs323/hw1/ directory, I'll take a snapshot of those files on the deadline (9pm Tuesday). If you do late work, email mic@mathcs.emory.edu with sol.jar as an attachment. REMARK: you could actually do all the BlueJ work on another computer. Just as the last step, copy your sol.jar back onto a lab machine into your ~/cs323/hw1/ directory (which you may need to create).