Country : Australia
Assignment Task :

Aim 

This assessment task allows you to demonstrate your problem solving ability on problems covering counting, algorithms, complexity and graphs. It is worth 20 of your nal mark for this unit. 

 

Questions 

1. Everyone is still stuck at home. However we have plenty of things we can do to keep us busy. For all parts of this question, working is required, including combinatoric/factorial notation as needed as well as nal answers. An answer consisting of solely an integer will be awarded 0 marks.

i. How many different activity patterns can be formed from those ve activities? 

ii. How many patterns contain only three types (e.g., clean - sit - read)? 

iii. How many patterns with at least four different activities start with playing games? 

b) ? [2 + 1 = 3 marks] You have found six ingredients in your fridge that need to be used up. 

i. How many ways could these be combined? Explain in a sentence how you calculated your answer. 

ii. How many ways could you use three ingredients only? 

 

2. You have been given a le with two columns: a name and an integer (whole number) representing how many times the person logged onto Canvas this semester, between 0 and 255 inclusive.

a) Draw a owchart (following the conventions used in class) that reads the le and then calculates and prints the number of students who have logged in at least 50 times this semester. 

b) What is the likely complexity of your program using big-O notation? Clearly point out what the primary parameters are and de ne your terms. 

3. Your colleague is working on two algorithms, X and Y, that determines whether two people are a certain distance apart. They use a number of different inputs, n. They are seeking your advice. 

a)  If they tell you that algorithm X has a worst-case runtime complexity of O(n2) and algorithm Y has a worst-case runtime complexity of O(n3), which algorithm would you recommend and why? 

b) Your colleague then adds that the average-case time complexity for X is Θ(n2) and for Y is Θ(n). Does this change your advice at all, and why? Your answers should be no longer than a sentence or two. 

4. Write a recursive function sum_odd(n), using the pseudocode principles covered in the lecture, to sum up the numbers i between 1 and n where the binary representation of i contains an odd number of 1s, e.g., 14 is represented as 0b1110 which contains an odd number of 1s. 

 

This IT Computer Science Assignment has been solved by our IT Experts at UniLearnO. 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.

  • Uploaded By : Grace
  • Posted on : May 25th, 2019
  • Downloads : 189

Whatsapp Tap to ChatGet instant assistance