Task 1: Python Program Choose a sorting and a search algorithm that you believe is well-suited for the given problem. Consider factors such as time complexity, space complexity, and the characteristics of the dataset. Implement the chosen
ASSESSMENT TASK BRIEF
| Subject Title | Introduction to Programming and Algorithm |
|---|---|
| Subject Code | PRO501AC |
| Assessment | 3 - Practical and Written |
| Individual/Group | Individual |
| Length | Code + Report |
| Learning Outcomes | 1,2,3,4,5,6 |
| Submission | TBA |
| Weighting | 40% |
| Total Marks | 40 |
Context
You are tasked with measuring and implementing an efficient sorting and searching algorithm to sort and search a large dataset of integers. The goal is to evaluate your understanding of various data structures and algorithms, as well as your ability to choose and implement an appropriate solution based on metrics.
Instructions
Assessment Tasks
This assessment has 2 Tasks:
Task 1: Python Program
Choose a sorting and a search algorithm that you believe is well-suited for the given problem. Consider factors such as time complexity, space complexity, and the characteristics of the dataset. Implement the chosen algorithms in Python and measure their performance in terms of time it takes to perform the searching and sorting tasks across datasets of 1000, 50000, 10000 and 100000 records.
Task 2: Report
You will submit a report that summarizes your choice of algorithm and data structure for searching and sorting in your application, the process you used to develop your solution, the test data sets used, along with specified metrics for the development. Run a selection of at least two search algorithms and 4 sorting algorithms, 3 from in-place sorting (such as bubble, selection and insertion) and 1 from either merge or quick sort. Document the following in your Report:
- Overview of the chosen sorting algorithms.
- Brief Explanation of how the algorithm works.
- Compare the performance of the two selected search algorithms in terms of the time taken:
- As demonstrated in class, produce Bar Graphs to showcase the comparisons. Repeat this for all the dataset of above datasets of different lengths.
- Based on the above results, discuss which algorithm would be the best selection in terms of the fastest time. Explain why.
- Repeat the steps (a) to (d) for the selected sorting algorithms and focus on:
- a) Time taken
- b) Number of Swaps
- c) Number of Comparisons
Testing:
Create 4 datasets with varying sizes (examples: 1000, 5000, 10000, 100000) to test the efficiency of your algorithms. Include the datasets used for testing along with your submission.
NOTE – You can use ChatGPT to produce the datasets of unsorted random integers. Searching and Sorting algorithms can be generated using ChatGPT along with code to generate the comparative Bar Graphs.
IMPORTANT: Document all the prompts you used in your Report.
You are to submit the following:
- Submit your Python code in files.
- Submit the datasets used for testing.
- Submit the report in a well-organized document format (Word).
Online submissions via subject Study Hub/Open Learning site.
Marking Guide
| Total number of marks – 40 | |
|---|---|
| Code in general | |
| Code adheres to the guidelines outlined in the PEP 8 Style Guide for Python code | 1 |
| Sorting algorithm | |
| Correctness and efficiency of the implemented sorting algorithm across 4 different size data sets | 2 |
| Time complexity between 4 sorting algorithms measured and displayed in a Bar Graph | 4 |
| Number of comparisons and swaps performed by the 4 selected sort algorithms and results displayed as a Bar Graph | 4 |
| Overview of the chosen sorting algorithm | 1 |
| Explanation of how the algorithm works. | 1 |
| Discussion of why you chose this algorithm over other alternatives. based on the measures data | 4 |
| Searching Algorithm | |
| Correctness and efficiency of the implemented searching algorithm | 2 |
| Time complexity analysis of the three search algorithms across all datasets | 4 |
| Overview of the chosen searching algorithm. | 1 |
| Explanation of how the algorithm works. | 1 |
| Bar Graphs generated across all datasets and a discussion of why you chose this algorithm over other alternatives. | 4 |
| General | |
| Correct files submitted including types and names (zip and Word) | 2 |
| Reflection Report | |
| Report presentation and comments including how long the programs took to create and any problems encountered | 2 |
| Details of the process they used to develop their solution is provided | 2 |
| The test data sets used, along with specified metrics for the development | 1 |
| Screen shots of testing and annotations | 2 |
| Reflection on the development process, including what you learned and how you would improve the implementation in the future. | 2 |
Note: This report is provided as a sample for reference purposes only. For further guidance, detailed solutions,