Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q 4 . ( a ) Consider a set of randomly generated integer data whose cardinality is high ( 2 2 0 ) . Justify

Q4.(a) Consider a set of randomly generated integer data whose cardinality is high (220).
Justify which algorithm will be appropriate to arrange this data in order with a proper time-
complexity analysis. Provide a pseudocode of i) data generation and ii) your algorithm.
(b) Suppose you want to find out whether an integer is present in the above data. Justify which
algorithm will be appropriate to achieve this goal with a proper time-complexity analysis.
Provide a pseudocode of your algorithm.
(c) Examine whether a non-linear data structure can be used to perform the task in (a). Q5. Construct two strings x and Y. The string x should contain the first three characters of your
firstname followed by "ETCE". The string Y should contain "ETCE" followed by the last three
characters of your lastname. Clearly show x and Y. Find i) a longest common subsequence of x
and Y and ii) a longest common substring of x and Y. In both the cases, you should show the
recursive solution and appropriate table. Analyze the time-complexity of your solutions.
Showing pseudocode is not compulsory but can be of help for the construction of the tables.Q3.(a) What is meant by an asymptotic tight bound? Given: T(n)=T(3n4)+1. Find the tight
asymptotic bound for T().
(b) Find the complexity of T(n)=4T(n2)+cn using the recurslon tree approach.
(c) Prove that if f(n)=O(g(n)) and g(n)=O(h(n)), then f(n)=O(h(n)).
(d) Let f(ri),g(n) be asymptotically nomegative. Show that max
g(n).
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions