📖 Uncategorized

ITSFT-506-1608 Data Structures & Algorithms First Year BSc. 2025-2026 Assignment Guidelines Read the following instructions carefully before you start the assignment. If you do not understand any

ES EssayPanel Expert · 📅 21 May 2026 · ⏱ 13 min read
✍️ Need help with this assignment? Get expert quotes in minutes — free to submit. ✍️ Get Writing Help FREE

ITSFT-506-1608

Data Structures & Algorithms

First Year BSc. 2025-2026

Assignment Guidelines

Read the following instructions carefully before you start the assignment. If you do not understand any of them, ask your lecturer.

•          This is a HOME Assignment to be completed by the DEADLINE SPECIFIED BY LECTURER ON VLE.

•          The assignment consists of 3 Sections and CARRIES 61marks; all tasks must be attempted.

•          Please note that ALL WORK must be handed in by the stipulated deadlines. LATE ASSIGNMENTS WILL NOT BE ACCEPTED.

•          The assignment sheet and assignment coversheet should be fully completed with all the necessary details. Note that assignments handed in without the assignment cover sheet are considered as not submitted.

•          Assignments must be handed in as a soft copy uploaded on Moodle by the stipulated deadline.

•          Any references should be listed and quotes should be paraphrased properly. Unless listed and paraphrased  properly  the  assignment  will  be  regarded  as  plagiarized.

Referencing should be carried out using IEEE Style Referencing Notation.

•          Assignment text should not be submitted verbatim to AI. The assignment is designed to confuse

AI  and  force  the  AI  to  perform  tasks  differently  from  a  human.

Tasks where use of AI is detected due to inbuilt safeguards will be awarded 0 marks.

•          Copying is strictly prohibited and will be penalized in line with the College’s disciplinary procedures

Task 1    25marks

 

Implementation & Empirical Analysis of Sorting Algorithms (KU3.1, SE2.8, SE4.1)

 

1.   Implementation of Sorting Algorithms   (SE2.8, 10marks)

 

Implement two different sorting algorithms from the following list:

•          Merge Sort

•          QuickI n Sort

•          Counting Sort

 

IMPORTANT NOTES:

The implementation of the chosen sorting algorithms MUST ADHERE to the following specifications. ALTERNATIVE IMPLEMENTATIONS WILL NOT BE ACCEPTED

 

1.                 Each algorithm must be implemented in its own class, separately from the others; the class should have a summary comment specifying which sorting algorithm was chosen as well as its known theoretical speeds for Best Case, Average Case and Worst Case.

(1.5marks per algorithm)

2.                 The classes containing the implementation of the sorting algorithms must have a Sort() method with the following signature:

(2.5marks per algorithm)

 public static int[] Sort(int[] unsortedArray)

 

This method should receive an unsorted array of integers and return a sorted copy of this array; it is important that the original array supplied as parameter is never altered. Therefore, the method must not sort the original array supplied as input, instead it must return as sortedcopy of this array.

Additional methods may be added but these must be private and called within the specified Sort() method.

 

3.                 Sorting algorithms must be implemented in an efficient manner which is line with their known theoretical speeds e.g. Merge Sort implementations must have an asymptotic speed of O(n long n) for all cases.

(1 mark per algorithm)

 

Implementations which vary from the above will not be accepted & will be awarded 0marks.

2.   Empirical Analysis of Sorting Algorithms   (KU3.1, 5marks)

Measure the actual execution time for each of the two sorting algorithm, implemented in the previous part of the task, using the following input sizes

n = 1,000      10,0000          100,0000          1,0000,000

(2marks)

 

Take all necessary precautions to ensure timings are accurate and free of any bias using the same techniques used in class examples when carrying out empirical analysis.

(2marks)

 

Use the timings obtained to plot a graph of input sizes versus time taken on a suitable scale, using Excel. The Excel file with the plotted graphs and a screenshot of the timings obtained when running empirical analysis must be provided.

(1mark)

 

 

Analysis which varies from the above will not be accepted and will be awarded 0marks.

 

 

 

 

3.   Evaluation of Sorting Algorithms   (SE4.1, 10marks)

 

Evaluate the performance of the sorting algorithms implemented based on the timings obtained from Empirical Analysis for the given input sizes.

 

To do so:

 

i. State which of the 2 algorithms sorts the arrays the fastest? Justify your response by comparing the shape, position and gradient of the graphs produced in the previous part of the task.

(2.5marks)

 

 ii. Certain input sizes may have required a considerable amount of time to sort the given arrays, for either one or both of the sorting algorithms implemented. Nevertheless, the algorithms could still produce a result. Does this mean that one (or both) of the sorting algorithms is intractable? Justify your response by comparing the shape, position and gradient of the graphs produced in the previous part of the task.

(2.5marks)

 

This evaluation may be provided as text within the required Excel File containing the graphs plotted for the previous part of the task.

Evaluate the correctness of the sorting algorithms implemented by comparing their results to those produced by C#’s native sorting algorithm.

 

To do so:

 

i. Generate 1,000 arrays of length 2,000 with random numbers (including potential duplicates) using C#’s inbuilt random number generator

(1mark)

 ii. Sort each array using each of the two sorting algorithms implemented in previous tasks.

(1mark)

 iii. Sort each array using C#’s native sorting algorithm

(1mark)

 iv. Make sure that the results produced by the 2 sorting algorithms are both equal to the result provided by C#’s native sorting algorithm. This check for sequence equality must be carried out through code.

(2marks)

 

 

 

Assignment Continues on Next Page

Task 2    21marks

Implementation of Hierarchical Data Structures

(AA2.3, AA2.4,AA2.5)

 

This task requires the implementation and testing of 2 Hierarchical Data Structures

1.  Priority Queue based on MinHeap

2.  Binary Search Tree

 

Both implementations are to be part of the same project and are to be tested through code in Program.cs as described in part 3 of this task.

Both tasks require the use of a ServiceTicket object class which is to be constructed as per the following code sample:

 

Build a Priority Queue based on a MinHeap         (AA2.5)

Create a Priority Ǫueue class that uses MinHeap logic to manage elements of type

ServiceTicket based on their createdEpoch attribute; the smaller the value of the createdEpoch the higher the priority of the ServiceTicket.

 

 

The Priority Ǫueue class will require the implementation of the following operations

 void EnqueTicket(ServiceTicket element)

This operation inserts an object of type SeviceTicket into the queue in the correct position based on it’s createdEpoch attribute. The smaller, the value of the createdEpoch attribute the closest to the top the element should be.

 

(3.5marks)

String DequeNextTicket()

This operation removes the ServiceTicket object at the head of the priority queue and returns its details in the form of a string; the ticket with the smallest createdEpoch should be deque first.

(3.5marks)

 

 

IMPORTANT NOTES:

The implementation of the priority queue MUST ADHERE to the following specifications. ALTERNATIVE IMPLEMENTATIONS WILL NOT BE ACCEPTED

1. All programming logic to insert and remove ServiceTicket elements from the Priority Ǫueue must be placed in the PriorityǪueue class; the creation of additional classes.

 

2. Methods in the Priority Ǫueue class must match the indicated method signatures.

 

3. The Priority Ǫueue must enque and deque elements based on MinHeap logic which reflects the pseudocode for heaps provided on VLE for Topic 9; this pseudocode is for a MaxHeap and should be altered to reflect MinHeap logic in your implementation.

 

4. The Priority Ǫueue must use an array as the underlying data structure to store the ServiceTicket elements; the size of this array is to be passed through the overloaded constructor.

 

5. The ServiceTicket object is to be constructed in the same way as the class shown on the previous page. This is the only other class allowed in this implementation other than the requested Priority Ǫueue class.

 

 

Implementations which vary from the above will not be accepted & will be awarded 0marks.

Build a Binary Search Tree for Service Tickets    (AA2.4)

Create a Ticket Binary Search Tree class that is able to Search for ServiceTickets based on their TicketID attribute; it can be assumed that the Ticket IDs will be in alphanumeric format i.e. a combination of characters and numbers e.g. ‘TIC1’. The search should not be case sensitive.

 

To do so, the Ticket Binary Search Tree class requires:

 

1. The creation of a Node structure suitable for the construction of a Binary Search Tree, where the value of the node is an object of type Service Ticket. The Node structure can be created as a separate class from the Binary Search Tree.

(2marks)

 

2. The creation of a ROOT pointer within the Binary Search Tree class to point to the first Node in the tree; this should be the first ServiceTicket object added to the tree.

(1mark)

 

3. The implementation of a Build() operation with the following method signature: public void Build( ServiceTickets[] elements )

 

This operation should construct a Binary Search Tree by adding all the elements in the array to the tree; the first element in the array should be at the ROOT of the tree; the elements should be inserted, in relation to the ServiceTicket object at the ROOT of the tree i.e. to the left of the tree, or to the right of the tree, based on the value of their TicketID attribute.

The insertion of elements in the tree must not be case sensitive.

(2marks)

 

 

3. The implementation of a Search() operation with the following method signature: public string Search( string requiredTicketID )

 

This operation should search the Ticket Binary Search Tree for the required ServiceTicket matching the supplied TicketID and return its details; if no SeviceTicket with a matching

TicketID is found, a null is returned. The search must not be case sensitive

(2marks)

 

 

IMPORTANT NOTES:

 

The implementation of the priority queue MUST ADHERE to the following specifications.

ALTERNATIVE IMPLEMENTATIONS WILL NOT BE ACCEPTED

1. All programming logic to search for ServiceTicket elements must be placed in the Ticket Binary Search Tree class; the creation of additional classes, other than the permitted Node class, is not allowed.

 

2. Methods in the Ticket Binary Search Tree class must match the indicated method signatures.

 

3. The ServiceTicket object is to be constructed in the same way as the class shown on previous pages of the assignment brief.

 

Implementations which vary from the above will not be accepted & will be awarded 0marks.

Test the Implemented Hierarchical Data Structures    (AA2.3)

Using code in Program.cs, test the Priority Ǫueue and Ticket Binary Search TreeData structures, implemented in the previous parts of the task.

 

To do so:

 

1. Test Data Generation

Generate an array of 20 Service Ticket Objects; the TicketID should have the following format “TICx” where x is the sequence number of the ticket e.g. the first ticket has ID “TIC 1”.

(1mark)

 

2. Testing of Ticket Binary Search Tree

Build a Ticket Binary Search Tree based on the ServiceTickets array generated above.

(0.5marks)

 

Use the tree’s Search operation to prove that all tickets in the array can be found in the Ticket Binary Search Tree and the search is not case sensitive; to do this, comparisons of the TicketID passed as parameter to the Search operation must be compared to TicketIDs of ServiceTicket objects stored within the tree in lower case.

 

 

 

 

 

 

(2marks)
Also show that searching for tickets with Ids that are not in the
tree returns a null.

(0.5marks)

3.  Testing of MinHeap based priority Ǫueue           

Build
a Priority Ǫueue by adding every ticket in the array to the queue.   
 

(0.5marks) Prove
that the ServiceTickets are enqued based on their createdEpoch attribute by :
 

First
adding each ServiceTicket object in the array to the queue     
 

(1mark)
Then
emptying the queue, by dequing each and every ServiceTicket in it.

(1mark)
While
doing so, display the details of each dequed ServiceTicket to show that
tickets with a smaller createdEpoch attribute were dequed first.       
(0.5marks)

 

 

 

Testing which vary from the above will not be accepted & will be awarded 0marks.

 

 

Assignment Continues on Next Page

Task 3    15marks

Randomization and Shuffling Algorithms

(KU2.7, SE2.6)

 

This task requires research in order to carry out the implementation of a Custom Pseudo Random Number Generator (PRNG) based on the following well known PRNG and Shuffling Algorithms:

 

1.  Linear Congruential Generator (LCG)

2.  Additive Lagged Fibonacci (LFG)

3.  Fisher Yates Shuffle (FYS)

 

Some of the above algorithms may have been covered in class; others may not have been and will therefore require you to carry out your own research to understand how these algorithms work and how they need to be implemented.

 

 

The implementation of the required Custom PRNG does not require any testing from your end, however, the implementation MUST ADHERE TO THE FOLLOWINGSPECIFICATIONS. ALTERNATIVE IMPLEMENTATIONS WILL NOT BE ACCEPTED

1. The Custom PRNG must be implemented in its own class separately from the other two algorithms. It must have a Next() operation with the following method signature: public decimal Next ( decimal max)

 

This must generate a pseudo-random number between 0 and the maximum value supplied as parameter, using the Additive Lagged Fibonacci formula with the following values for constants:

J = 273                K = 607 M = 232

(SE2.6, 5marks)

 

2.                 The array representing the initial set of k states, to be used for pseudo random number generation, using the specified LFG formula, must be of size k and initialized inside the constructor for the Custom PRNG using values produced by the LCG.

(SE2.6, 1mark)

 

 

3.                 The LCG must be implemented in a separate class from the Custom PRNG and should only have one operation with the following method signature: public decimal Next( )

 

This should generate a positive pseudo-random number in no specific range, using the following values for constants A = 1664525 C = 1013904223 M = 232

The current time in milliseconds may be used as the seed to generate the first random number.

(SE2.6, 3marks)

4.                 After, generating the required pseudo-random number and after making all necessary updates to the values of j and k and the array representing the initial set of k states, as required by the LFG, The Fisher-Yates Shuffle should be used to shuffle the elements within the array of initial k states.

(SE2.6, 1mark) 5. The Fisher-Yates Shuffle must be implemented in a separate class from the Custom PRNG and the LCG should only have one operation with the following method signature: public decimal[ ] Shuffle(decimal[] originalArray )

 

This should use Fisher Yates Shuffle, to return a shuffled version of the array passed as parameter.

(KU3.1, 5marks)

 

Implementations which vary from the above will not be accepted & will be awarded 0marks.

Plagiarism Free Assignment Help

Expert Help With This Assignment — On Your Terms

  • All subjects — UK, USA & Australia writers
  • 100% Plagiarism-Free — Turnitin report included
  • Deadline from 3 hours
  • Unlimited free revisions
  • Free to submit — compare quotes
ES
EssayPanel Expert
Academic Expert · EssayPanel

Expert academic writer and education specialist helping students in the UK, USA, and Australia achieve their best results across all subjects.

Need help with your own assignment?

Our expert writers can help you apply everything you've just read — to your actual assignment, brief, and marking criteria.

Get Expert Help Now →
📝 Free Submission — No Card Required

Need Help With This Assignment?

Our verified experts deliver 100% original, plagiarism-free work to your exact brief and marking criteria. Submit free — compare quotes — choose your expert.

Write My Assignment FREE Get A Free Quote →

No credit card · No commitment · First quote in minutes