Skip to content

CO2412ΒΆ

Computational-ThinkingΒΆ

Make-PrettyΒΆ


University/Year 2/CO2412 Computational Thinking/CO2412 Computational Thinking Contents
University/Year 2/CO2412 Computational Thinking/Assignment/Computational Thinking Report
Files/University/Year 2/CO2412 Computational Thinking/CO2412 Computational Thinking Assignment Brief.pdf

Tasks:

Task 1: βœ”οΈ

  1. Real-World Data Simulation:
    Write a Python script to generate two simulated datasets representing real-world data:
    a) Dataset 1: Random data (completely random order). βœ”οΈ
    b) Dataset 2: Reversed data (data sorted in descending order). βœ”οΈ

The datasets should contain sizes of 10,000, and 100,000 elements (4 datasets in total). Each generated number should have 6 digits ranging from 100,000 to 999,999. βœ”οΈ

Task 2: βœ”οΈ

  1. Implement Sorting Algorithms:
    Implement the following sorting algorithms in Python and use them to sort the datasets in Task 1:
    c) Merge Sort βœ”οΈ
    d) QuickSort βœ”οΈ

Each sorting algorithm should save its sorted array output to a text file. You can use either a single file or multiple files for this purpose. βœ”οΈ

If using a single file, ensure it is clear which section corresponds to each sorting algorithm and dataset. (N/A) (Multiple Files)

Task 3: βœ”οΈ

  1. Performance Analysis of sorting algorithms:
    Measure and analyse the following performance metrics for each sorting algorithm (Merge Sort and Quick Sort) and dataset sizes including:
    a) Execution Time: (in milliseconds) for sorting each array. βœ”οΈ
    b) Memory Usage: (in kilobytes) for sorting each array. βœ”οΈ
    c) Number of Comparisons: (swaps) made during the sorting process. ? βœ”οΈ

Task 4: βœ”οΈ

  1. Graphical Comparison:
    Create graphs (e.g., line charts or bar charts) that compare the runtime performance of the sorting algorithms across different dataset sizes. βœ”οΈ

Implement this comparison using Python to visualise how the algorithms perform as data scales. βœ”οΈ

The graph/graphs should include Part 3a, 3b and 3c (Execution Time, Memory Usage, Number of Comparisons) βœ”οΈ


Deliverables:
- Python .py program (1) containing all code
- Text files contained sorted array output
- 1000 word maximum report

40 - 49%:
- Scripts (in python) as specified in task 1 and 2 are executable without error βœ”οΈ
- Random number generation operation task specified in task 1 βœ”οΈ
- Sorting algorithms operations as specified βœ”οΈ
- Evidence of the output file containing the sorted arrays
- the report contains 5a,βœ”οΈ 5b,βœ”οΈ 5e, and 5f βœ”οΈ

50 - 59%:
- As above.
- the sorting algorithms specified in task 2 are using the same copy of the generated random arrays to maintain data integrity βœ”οΈ
- All python scripts have suitable data structure βœ”οΈ
- Any evidence of an acceptable code commenting is demonstrated (See Course Comment Stylesheet) βœ”οΈ
- All requirements from task 3. Performance analysis of sorting algorithms.
- Any evidence for implementation of task 4: Graphical Comparison
- The report discusses all criteria specified in task 5. βœ”οΈ

60 - 69%:
- As above. βœ”οΈ
- The code in task 1 and task 2 demonstrates the sorting algorithms use the least amount of memory resources including variables and avoiding magic numbers βœ”οΈ
- Code maintains good programming practices, commenting, naming conventions for variables, functions, and classes, and code has the correct indentation.
- Task 4. Graphical Comparison is implemented to high standard (vague)
- Any evidence of using "functions" is demonstrated in all python scripts
- Report discusses all criteria specified in task 5. Report Writing of the instruction to a high standard using technical language.

70 - 100%:
- As above.
- Evidence of any mechanism for ensuring that all the numbers in the randomly generated numbers are unique.
- Report discusses all criteria specified in task 5. Report Writing of the instruction are covered to an excellent standard with competent use technical language.
- Any evidence of inclusion and discussion graphs regarding task 4
- Generated graph(s) are included in the report and present Execution Time, Memory Usage, and the Number of Comparisons versus the array sizes in a clear and concise manner.
- Report provides a clear and accurate explanation and analysis of the graph.
- Number of references is adequate and a corrected format used for both in-text and bibliography citing