Highlights
Week 6. Think.
1. Often programs need to manipulate collections of information, e.g., a list of student names, a list of numbers or a collection of records. For example, you have a list of names you want to sort – what is the first thing required before you can manipulate the data? How does Python support
the representation of collections?
2. Write an iterative algorithm and a recursive algorithm to sum the numbers in a list.
3. Write a recursive algorithm to sort the numbers in a list.
4. Compare mergesort and insertion sort of this list [2,9,1,6,3,2]: how many comparisons are needed in each?
5. Consider the following problem. Write pseudocode for an algorithm (that uses recursion) to solve it.
Week 7. Think.
1. What does it mean to say that a function T(n) = O(n log n) ?
2. If the time complexity of mergesort is O(n log n) and insertion sort isO(n2), where n is the input size, how much faster is mergesort?
3. What does a polynomial time algorithm mean, i.e. an algorithm in class P?
4. What does non-deterministic polynomial time algorithm mean, i.e. an algorithm in class NP?
5. Give an example of an algorithm that is in NP?
6. Is P=NP?
7. Consider the following directed graph represented by adjacency lists:
A: [B,C]
B: [D]
C: [E,F,G]
D: []
E: []
F: []
G: []
Do a BFT and a DFT of the graph.
8. What is the advantage of BFT over DFT when searching over an infinite sized graph?
Week 8. Think.
1. What is dynamic programming? Why does it usually work faster?
2. Using the dynamic programming solution for the knapsack problem, compute a solution to this knapsack problem: Weight value
2 16
3 19
4 23
5 28
total number of items = 4
capacity of the knapsack = 7
3. Suppose that the similarity between an object O and 6 other objects in the database A,B,C,D,E and F are as follows:
sim(A,O) = 0.1
sim(B,O) = 0.3
sim(C,O) = 0.85
sim(D,O) = 0.8
sim(E,O) = 0.9
sim(F,O) = 0.6
Also, suppose objects A, B and C are in class 1 and D,E and F are in class 2.
With k=4, what class should O be in, using the kNN algorithm?
With k=2, what class should O be in, using the kNN algorithm?
This IT Assignment has been solved by our IT experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.