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

Robert longo’s corporate wars: wall of influence is an example of - Hilltop hoods exit sign chords - 128 64 32 16 - Sales value at split off - Writing a visual analysis paper - The norton introduction to literature online book - Starbucks opened its first store in zagreb - Career support programme claim form - Cuda c++ Blur - Inverse square law of heat - Jackie and wilson tab - As 400 commands tutorial - DM Dis-6 - How to critique a powerpoint - Cain killed abel with a rock billboard - Stage 2 - Free leadership legacy assessment test or disc personality test - Psychology/discussion - Developmental journey - Acid and bases experiment lab report - Di tri tetra penta - Cancer essay - Assignment - Addressing selection criteria template - 600 words: Watch the following video, and Provide a critique. Also, think of other possible scenarios where mobile technology can be used to address humanitarian efforts. - Posci personal knowledge reports - Integrated application software examples - Naomi davis orthopaedic surgeon - 100000 in word form - Reflection Paper - Are nickel metal hydride batteries hazardous - Information system security plan template - Cisco call manager ordering guide - History of astronomy ppt - Central battery system emergency lighting wiring - Reply - What does fed oasdi ee mean - One way selection statement - Religion- Reflection papers - How does bethany respond to the attack - Usmle step 3 preparation tips - Difference between true density and tapped density - CHAPLAIN’S ADVICE - Anne frank exhibition london - Rheumatoid arthritis with joint arthroplasty hesi case study - Ethical issues of the milgram experiment - What is outbreak at watersedge - Average voltage half wave rectifier - Chapter 10 arbitrage pricing theory - Ichthopaste zinc paste bandage - ISO framework network management - Air cadet vacuum pump - Why should we study intercultural communication - Marketing - Planning and the marketing mix simulation backpack - This guy's freestyle dance moves will melt your mind - Paper 1 - Current ratio for nonprofit organizations - Reply 1 and 2 150 words each one, please add references and citations by 09/03/2020 - 5 star napkin folding - Personal bargaining inventory - Informative speech on walt disney - Loher motor spare parts - Discussion - Smart Goals - Eight crazy nights let it out davey - The mask we live in discussion questions - Happy endings by margaret atwood thesis statement - Tyree energy technology lg05 - Discussion - Rank the following compounds in order of decreasing acidity - How to calculate correlation coefficient on calculator casio - Informational interview paper sample - Tesco overseas expansion - Which of the following is merchandise inventory - Allegro 17.2 to altium - In a word describe school - Wye river kennel sportsman neck circle queenstown md - St charles gairdner hospital perth - Motifs in movies examples - Dynon d10a installation manual - Midsomer murders the fisher king susannah doyle - Three official mechanics emphasize covering primary areas of responsibility - 1st generation of computer - Van stone thermowell design - Mealy machine moore machine - White fantasy black fact - We will fight we will win lyrics vincent bohanan - Mkt 571 week 5 - Week 4 Assignment - Beckett card serial number lookup - Disadvantage of asexual reproduction - A horizontal aluminum rod 4.8 cm in diameter - Mic6 5 16 plate 14 x14 - Growth iq get smarter about building your company's future - Due Thursday by 5pm - Http www yourleadershiplegacy com assessment html - John garside slim pc - Affinity education e3learning hub login - 21st Century Marketing