# 算法代写 | COSC2123/1285 Algorithms and Analysis Assignment 1

Algorithms and Analysis – COSC2123/1285
Assignment 1
(Please check the Assignment Specification for details)
Computer Science & IT School of Science

Assignment 1
– Binary Space Partitioning (BSP)
• Pair (Group of 2) Assignment

Assignment 1
– Binary Space Partitioning (BSP)

• Implement the Tree Representations and their Operations (5 marks) – implement the BSP using Lecture 1/4 and Lab 05
– Sequential Representation, using a 1D array.
– Linked Representation, using a linked list (program your own). – support the required operations.
• For the above two data structures,
– you must program your own implementation,
– You must implement your own nodes and methods to handle the operations.
• Extra java class: Yes
– But, put it in the format of in-class implementation (within existing java files)

• Implement the Tree Representations and their Operations (5 marks) – implement the BSP using Lecture 1/4 and Lab 05
– Sequential Representation, using a 1D array.
– Linked Representation, using a linked list (program your own). – support the required operations.
• For the above two data structures,
– you must program your own implementation,
– You must implement your own nodes and methods to handle the operations.
• Extra java class: Yes
– But, put it in the format of in-class implementation (within existing java files)

• Implement the Tree Representations and their Operations (5 marks) – implement the BSP using Lecture 1/4 and Lab 05
– Sequential Representation, using a 1D array.
– Linked Representation, using a linked list (program your own). – support the required operations.
• For the above two data structures,
– you must program your own implementation,
– You must implement your own nodes and methods to handle the operations.
• Extra java class: Yes
– But, put it in the format of in-class implementation (within existing java files)

• Task B: Evaluate your Data Structures (5 marks) – Write data generator;
– Evaluate your TWO implemented structures, – In terms of their time complexities for
Lab 2.
Lab 2
Assignment specification
children nodes, Printing the nodes (Traversal).
– Report your analysis and evaluation of the different implementations.
– Analyse, compare and discuss your results across different trees (with various complexities, e.g. depth, and the number of nodes) ,
– the different operations:
– E.g. Addition, Finding nodes, and traversal.
– different use case scenarios:
– E.g. Growing BSP Tree (Additions), Finding node and its parent and
representations and scenarios.
Report restructure & marking guide
Lecture 4 and Lab 5
– Provide your explanation on why you think the results are as you observed.
– The report should be 6 pages or less, in font size 12.

Assessment
• Implementation (5/15)
– Checkpoint (1 marks) in week 5’s Lab (Lab 04):
– demo your implementation of the Sequential representation and its operations
• Report (10/15)

The Python Testing Code
• We provide a python script that
– automates testing, based on input files of operations.
– These are fed into the java framework which calls your implementations.
• The outputs resulting from any search or print operations are stored, then compared with the expected output.
• We have provided one sample input and expected files for your testing and examination (test1.* files).
• For our evaluation of the correctness of your implementation,
– we will use the same python script and but different input/output/expected
files,
– so to avoid unexpected failures, please do not change the python script nor TreeTester.java.

Thanks!

E-mail: [email protected]  微信:itcsdx