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

Discussion 2: Genes and Personality - Two Prompts (Two Pages) using the book "Brave New World" by Aldous Huxley - Company case 5 goldieblox swimming upstream against consumer perceptions - Smith & hawken estate size curled wreath white 30 - How to read literature like a professor chapter 12 summary - How effectively Nestle is addressing the social and environmental impact is its supply chain - Forensics Analysis report of a compromised system with images for analysis - Felipe es antipático y feo - Er diagram for marketing company - An overstatement of ending inventory in one period results in - PS490 Assignment 5 - You can soften the blow of the bad news in refusing a typical request or claim by - Biggest challenges facing organizations in the next 20 years powerpoint - School leadership series study guide - Dr.Michelle_Prof2 - Liner algebra - I love a sunburnt country poem banjo paterson - Atlas god roman name - Happy belly food truck menu atlanta - Discussion ,250 words ,add citations and references by 08/04/2020 at 8: 00 pm - Leadership - Thermoplastic composites manufacturing process - Edld 5345 week 2 assignment - Pearson backpack literature - Cultural competency staircase model steps - 972 849 0341 - Health and human development unit 4 outcome 1 - R v hallett 1969 - Visual Literacy - Melbourne grove medical practice - Mount baw baw live cam - Algebra rules cheat sheet - For don m banned line by line analysis - What happens in it follows - The primary challenge of a distributed database is - Nike learns how to change case study - Nursing practicum personal objectives - Ruled vs holographic grating - Predicting consumer tastes with big data at gap case solution - Telecomm Network Security - Helpyourmath sign in - Emerging threats_7.2 - How to calculate pvif - My many colored days art activities - Financial strategy matrix - Century 21 accounting chapter 15 mastery problem answers - Aerodynamics for naval aviators pdf - Learning objectives of linear equations - I am giving two questions please go through that - Kentucky nurse practice act - Hfcc final exam schedule - Glove size chart ansell - Uncle fester cookbook free - 616 CS2 - Need a discussion question 200 words min w/ references - East coast medical centre - A vending machine automatically pours soft drinks into cups - Leadership style of google ceo - Money matters newcastle upon tyne - Is steroid a carbohydrate lipid or protein - 150 to 200 words - HSA5300 Deliverable 6 - Chronic Diseases and Population Health Management-Powerpoint - Oxted health centre surrey - Open mind portrait template - Developing ideas penn foster exam - The two major problems that transcription solves for the cell are - Conflict resolution paper example - Specific identification method periodic inventory system - Ricky ripov's pawn shop charges - College prepares people for life freeman hrabowski summary - Business Stat Proposal - Approximation using differentials homework answers - Ardex wpm 300 price nz - Sylvia plath poem daddy analysis - Assignment-1his - Bus - Death investigation week 2 - Rough order of magnitude - Week 4 discussion 2 - Http www uml diagrams org use case diagrams examples html - Unimelb bachelor of environments - Call and response taking a stand summary - Gcu individual success plan example - Hildegard von bingen gregorian chant - Word document edit - The essence of a broad differentiation strategy is to - 10's complement of 00000 - How long to speak 1200 words - Sociology - Assignment 2) Working on Understanding: More from Singer's "All Animals Are Equal" - Brave new voices poems lyrics - Smoorenburg patent & trademark attorneys - Hoselink hose not retracting - Senior project board examples - HN 522 Discussion 10 - Post-Tania - Erik erikson stages worksheet - Respiratory Presentation - Macrob year 11 entry - Principles of distributed database systems 2nd edition pdf