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: sudharsansrinivasp 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:

A+GRADE HELPER
Finance Homework Help
Custom Coursework Service
Helping Hand
Innovative Writer
Essay & Assignment Help
Writer Writer Name Offer Chat
A+GRADE HELPER

ONLINE

A+GRADE HELPER

Greetings! I’m very much interested to work on this project. I have read the details properly. I am a Professional Writer with over 5 years of experience, therefore, I can easily do this job. I will also provide you with TURNITIN PLAGIARISM REPORT. You can message me to discuss the detail. Why me? My goal is to offer services to you that are profitable. I don’t want you to place an order once and that’s it. For me to be successful, I need you to come back and order again. Give me the opportunity to work on your project. I wish to build a long-term relationship with you. We can have further discussion in chat. Thanks!

$55 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!

$55 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.

$55 Chat With Writer
Helping Hand

ONLINE

Helping Hand

Hello, I an ranked top 10 freelancers in academic and contents writing. I can write and updated your personal statement with great quality and free of plagiarism as I am a master writer with 5 years experience in similar ps and research writing projects. Kindly send me more information about your project. You can award me any time as I am ready to start your project curiously. Waiting for your positive response. Thank you!

$55 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

$55 Chat With Writer
Essay & Assignment Help

ONLINE

Essay & Assignment 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!

$55 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

Dva rap schedule of equipment - The default view that powerpoint opens in is called - 5 Best WaysTo Treat Your Mental Health Issues - Ssc balmain uniform shop - How to make a sarcophagus out of paper - How many languages does trevor noah speak - Ece teacher job description - American sign language handshapes - Vinnie hunter educating essex - Apn advocacy articles - Questions for act one of the crucible answer key - Shoo fly don t bother me - Lasswell's model of communication - What type of angles are x and y? - Statistic - The effect of scalability on virtualization - What is 5ed4 07a4 - Two years are better than four - Uncollected goods left for repair - Input impedance transmission line examples - Baphomet beauty and the beast - Comparison between different market structures - Grtep webcom 2.0 - 2 work 3 pages - Diverger converger assimilator accommodator - Read and answer - Zara international case study answers - Nursing - Movie review and queation answer assignment(due on 27 hours) - Respectively equipment cash and accounts payable are - Home depot my apron infocus - Vcds oxygen sensor test - Light fixture cable hangers - Miller forensic assessment of symptoms test m fast pdf - Help with case Analysis aviation law - PSY 6-2 - Stance essays on treating animals humanely - Nrs 490 scholarly activity summary - Parts of a bunsen burner - Bluecoat default enable password - Ubd stage 3 examples - Assignment on marketing mix of pepsi - Yabb œ 2000 2005 all rights reserved - Crisis team south tyneside - How to do standard deviation on a sharp calculator - Los invitados / no / querer / esperar / en la fiesta - Www courts sa gov au case list - Decision making case study with solution - Spartan heat exchangers inc case study - In the proto evangelium god promised that - Follow up to Essay - Outbreak at watersedge answers - Good research paper topics for american history - First second and third class levers - Literary movements in english literature ppt - Excel qm - N 1901, which company famously became the world's first billion-dollar corporation? - 4 pics 1 word basketball players kilowatt meter - Richard hillis heart attack - Cover page for a report - Magic eraser teeth whitening oprah - OPERATIONS MANAGEMENT - DB and power point - The collar has a mass of 2kg - Class diagram for pharmacy management system - Performance management at vitality health enterprises case analysis - British columbia investment management corporation ownership - The adjusted trial balance for china tea company at december 31, 2018, is presented below: - Bases of market segmentation for toothpaste - Thinking critically about ethical issues - Bike data project - Week7 - Histogram polygon bar graph - Ifas table - 7148 nw 100th ter tamarac fl 33321 - Need a paper done in APA format related to managing technology operations - Organ Leader Discussion - Week 6 - Urgent Help needed - Dr petar pjesivac melbourne - Gsk annual report 2010 - Complete and incomplete combustion - Ajax cleaning products is a medium sized firm operating - REFLECTION PAPER - Www citewrite qut edu au - Bsi teradata case of the misconnecting passengers - Project Plan - Banking concept of education vs problem posing - How to recover from emergency loan capsim - Science in the news assignment - Assignment: Roles and Responsibilities of Agencies and Officials in Disaster Response - Nurs 6501 week 1 discussion - Junior achievement org web ja usa courseware - Seven domains of nursing practice benner - A large firm uses an average of 40 boxes - Swansea university campus map - On a classified balance sheet current assets are customarily listed - Is the dissolution of nh4cl exothermic or endothermic - Apa style article critique sample - Characteristics of mass production - Tjx corporate social responsibility - Detroit christadelphian book supply