Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

The time complexity of algorithms.

30/10/2020 Client: user_3wd25t Deadline: 7 Days

Researchers from the School of BioSciences have requested our help with one of their


experiments. They are performing behavioural experiments with zebrafish. At any one instance in


time there are a large number of zebrafish in the aquarium. For their particular experiment, the


biologist take a snapshot of the aquarium and then need to find the longest series of zebrafish such


the length of each fish along the horizontal direction in the aquarium is increasing. They also need


to know the number of zebra fish in this series.


For example, the snapshot of the aquarium resulted in fish lengths of [2, 5, 3, 7, 11, 1, 12, 4, 15, 14, 6, 16].


One possible longest series of increasing lengths in this case is [2, 3, 7, 11, 12, 14, 16] with 7 zebrafish.


We say one possible longest series of increasing lengths here because it is not necessarily unique.


For example, the length 14 in the output could be replaced with 15: [2, 3, 7, 11, 12, 15, 16] and also


be valid.


In this question you will consider algorithms for finding the longest series of increasing lengths


via the function LongestIncreasingLengths(A[0, · · · , n − 1]), as well as the size of this output


array.


(a) [1+2+1 = 4 Marks] Consider a recursive algorithm:


i [1 Mark]Write down a recurrence relation for the function LongestIncreasingLengths.


ii [2 Marks] Using this recurrence relation, write a recursive algorithm in pseudocode for


LongestIncreasingLengths that only calculates the array size of the longest series of


increasing lengths. You do not need to output the actual array containing the longest


series of increasing lengths in this part of the question. For the example above with input


A = [2, 5, 3, 7, 11, 1, 12, 4, 15, 14, 6, 16], the output should just be 7. The pseudocode should


be about 10 lines of code.


iii [1 Mark] What is the time complexity of this recursive algorithm? Justify your answer.


(b) [5+1+1 = 7 Marks]


i [5 Marks] Building on from your recursive algorithm in part (a), write down a dynamic


programming implementation in pseudocode for the function


LongestIncreasingLengths(A[0, · · · , n − 1]) to find the longest series of increasing


lengths. This should also output the size of the longest series of increasing lengths. The


pseudocode should be about 20 lines of code.


ii [1 Mark] Explain how the recurrence relation used for your dynamic programming imple-


mentation involves overlapping instances.


iii [1 Mark] What is the time complexity of your algorithm and how much auxiliary space


was required. Justify your answer.


(c) [1+2 = 3 Marks] The time complexity of the recursive algorithm for LongestIncreasingLengths


was exponential, while the dynamic programming algorithm lead to a polynomial


time complexity (note, you need to determine that polynomial above). Here we will investigate


an algorithm for the function LongestIncreasingLengths that has a time complexity of


O(n log n).


Consider building a set of arrays for the input array A[0, · · · , n − 1]. As we scan along A, we


will compare A[i] with the final element in each array in this set. This comparison will satisfy


the following conditions:


(1) If A[i] is smaller than the final element in each array, start a new array of size 1 with A[i].


(2) If A[i] is larger than the final element in each array, copy the longest array and append


A[i] to this new array.


(3) If A[i] is in between, find the array with the final element that is greater than A[i] and


replace that element with A[i].


i [1 Mark] Write down the set of arrays that satisfy these rules for the input array


A = [0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15].


ii [2 Marks] Building from these conditions, explain how an algorithm for the function


LongestIncreasingLengths could run with time complexity O(n log n). You may make


use any algorithm introduced in the lectures to help you with your explanation. Note: you


do not have to write this algorithm in pseudocode. We are expecting that you write a short


paragraph or a short list of bullet points describing the important steps of the algorithm


to explain the time complexity.


Hint: what if you only consider the final elements of this set of arrays as a single array?

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Coursework Assignment Help
Custom Coursework Service
Innovative Writer
Finance Homework Help
Instant Assignments
Quick Mentor
Writer Writer Name Offer Chat
Coursework Assignment Help

ONLINE

Coursework Assignment Help

Hey, I have gone through your job posting and become very much interested in working with you.I can deliver professional content as per your requirements. I am a multi-skilled person with sound proficiency in the English language for being a native writer who worked on several similar projects of content writing and can deliver quality content to tight deadlines. I am available for both online and offline writing jobs with the promise of offering an incredibly responsive and supreme level of customer service. Thanks!

$95 Chat With Writer
Custom Coursework Service

ONLINE

Custom Coursework Service

Hey, Hope you are doing great :) I have read your project description. I am a high qualified writer. I will surely assist you in writing paper in which i will be explaining and analyzing the formulation and implementation of the strategy of Nestle. I will cover all the points which you have mentioned in your project details. I have a clear idea of what you are looking for. The work will be done according to your expectations. I will provide you Turnitin report as well to check the similarity. I am familiar with APA, MLA, Harvard, Chicago and Turabian referencing styles. I have more than 5 years’ experience in technical and academic writing. Please message me to discuss further details. I will be glad to assist you out.

$95 Chat With Writer
Innovative Writer

ONLINE

Innovative Writer

I have read and understood all your initial requirements, and I am very professional in this task, I would be the best choice for this project, I am a PhD writer with 6-7 years of experience and can deliver quality notes to tight deadlines. I can generally compile up to 10 pages of lecture notes per day. I am known as Unrivaled Quality, Written to Standard, providing Plagiarism-free woork, and Always on Time

$95 Chat With Writer
Finance Homework Help

ONLINE

Finance Homework Help

I have a Master’s degree and experience of more than 5 years in this industry, I have worked on several similar projects of Research writing, Academic writing & Business writing and can deliver A+ quality writing even to Short Deadlines. I have successfully completed more than 2100+ projects on different websites for respective clients. I can generally write 10-15 pages daily. I am interested to hear more about the project and about the subject matter of the writing. I will deliver Premium quality work without Plagiarism at less price and time. Get quality work by awarding this project to me, I look forward to getting started for you as soon as possible. Thanks!

$95 Chat With Writer
Instant Assignments

ONLINE

Instant Assignments

Hey, I can write about your given topic according to the provided requirements. I have a few more questions to ask as if there is any specific instructions or deadline issue. I have already completed more than 250 academic papers, articles, and technical articles. I can provide you samples. I believe my capabilities would be perfect for your project. I can finish this job within the necessary interval. I have four years of experience in this field. If you want to give me the project I had be very happy to discuss this further and get started for you as soon as possible.

$95 Chat With Writer
Quick Mentor

ONLINE

Quick Mentor

Hey, I have gone through your job posting and become very much interested in working with you.I can deliver professional content as per your requirements. I am a multi-skilled person with sound proficiency in the English language for being a native writer who worked on several similar projects of content writing and can deliver quality content to tight deadlines. I am available for both online and offline writing jobs with the promise of offering an incredibly responsive and supreme level of customer service. Thanks!

$95 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Languages provision in victorian government schools - Access data registry viewer - Calibrating a spectroscope - Robert burns if a body meet a body - Binding death benefit nomination form hesta - Pharmacy intern oral exam - Maths vic curriculum scope and sequence - Mazak tool eye parameters - Three pillars of the colangelo college of business - Uva ltac - Changing nature of workforce - Ar book finder quick search us - Cost of bank cheque cba - A soccer ball manufacturer wants to estimate the mean circumference - Bus 311 week 5 final paper - Wolf hollow study guide - Cdc distracted driving study tradução do texto - Request to fill vacant position - What are the six elements of a typical scope statement - Laker company reported the following january purchases - How to present nmr data - How many neutrons does lanthanum have - Greenhouse geisser correction factor - What does seneca crane mean in catching fire - Antuan company set the following standard costs for one unit of its product. - Needing Assignment for Nursing Class - PCA - Is elisabetta dami still alive - Cambridge igcse music book - Future Trends in HRM - Take Test: Final Exam - Edexcel history past papers - Impediments to problem solving - Reflection paper on human relations - Objects that don't move - Discussion with reponses - Finance Dissertation Topics - Interpreting skewness and kurtosis in spss - How you do anything is how you do everything quote - Fresher than fresh snow cones - Teddy bunter firm west ham - NURSING: EVIDENCED-BASED PRACTICE PROJECT - Deliverable 2 - Regulatory Presentation - Essay MICROECONOMICS - Can you think of counterarguments that jenkins does not consider - Ardex ep 2000 primer - Construction Law - Research Paper - Milestone requirements matrix - Water by the spoonful pdf download - Counter rotation lock picking - You should pack foods high in ________ to provide the most energy or kilocalories per gram of food. - Big ideas math red resources by chapter - National diploma in ambulance - Miercoles - Watts and associates crop insurance - Three most common causes of fire in the nhs - Discussion - Basic grammar rules ppt - Bpp lifetime pass assurance acca - Broken hill court listings - Those who walk away from omelas full text - Marriage in the 16th century - New class assignment 1 - Modern marvels the stock exchange worksheet answers - Download coursera videos python - Cap 1 M4 - Discussion 7 - 27 broad st croydon park - Massage - Secret knock detecting door lock ppt - NUR512- MODULE 4 DISCUSSION - Mcdonald group investments loganlea - Jones electrical distribution case pdf - Theoretical yield of product - Synergy education first aid - Guardian procedure calls reference manual - NEED DONE ASAP - Social work role play scripts - 8 PAGES - Bsa qld home warranty insurance - Is fort street high school good - Full sail financial aid portal - Boral roof tile brochure - Similarities between taming of the shrew and 10 things - Wendell berry the pleasures of eating summary - Sydney water sewer diagram - Fisher's lsd test - The extraordinary science of addictive junk food summary - The running man michael gerard bauer characters - BUSINESS ADVENTURES WITHIN THE EURPEAN UNION - How is folate linked to natural selection - Powerpoint on why college athletes should be paid - Gastro stop how many to take - Sanatorium lake walking trail - Love your sister 5c heart - Dulux micaceous iron oxide - Carlsberg swot analyse - Melton city council water - Ap physics 1 free response 2013 - Process cost summary