Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Question: Answer each part TRUE or FALSE.

a.2n=O(n)b.n2=O(n)·Ac.n2=O(nlog2n)·Ad.nlogn=O(n2)e.3n=2O(n)f.22n=O(22n)

Short Answer

Expert verified

(a) 2n=O(n)is True.

(b)n2=O(n)isFalse.

(c)n2=O(nlog2n)isFalse.

(d)nlogn=O(n2)isTrue.

(e)3n=O(2n)isFalse.

(f)22n=O(22n) is True.

Step by step solution

01

To check whether 2n = O(n)  True or false

a)2n=O(n)isTrue

Suppose.c=22ncn=2nforalln>=1

Thus Big-O holds.

02

To check whether  O(n)n2=O(n) True or false

b)n2=O(n)isFalse

n2=cnn2<=cnforalln>=n0doesn’t hold.

03

To check whether  n2=O(nlog2n) True or false

c)n2=O(nlog2n) isFalse

There doesn’t exist positive constants n0 and c such that n2cnlog2nforalln>=n0.

04

To Find whether  nlogn=O(n2) True or false

d)nlogn=O(n2)isTrue

logn=O(n) there exist positive constants c and n0 such that log ncnforalln>=n0.

05

To Find whether  n = 2O(n) True or false

e) 3n=2O(n)isFalse

there doesn’t exist constants c and n0 such that 3nc2nforalln>=n0.

06

To Find whether 22n=O(22n)  True or false

f) 22n=O(22n)isTrue

We know any function fnisO(f(n)).

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Show that every infinite Turing-recognizable language has an infinite decidable subset.

Question:Consider the algorithm MINIMIZE, which takes a DFA as input and outputs DFA .

MINIMIZE = “On input , where M=(Q,Σ,δ,q0,A) is a DFA:

1.Remove all states of G that are unreachable from the start state.

2. Construct the following undirected graph G whose nodes are the states of .

3. Place an edge in G connecting every accept state with every non accept state. Add additional edges as follows.

4. Repeat until no new edges are added to G :

5. For every pair of distinct states q and r of and every aΣ :

6. Add the edge (q,r) to G if δq,a,δr,a is an edge of G .

7. For each state q,let[q] be the collection of statesq={rQ|noedge joins q and r in G }.

8.Form a new DFA M'=Q',Σ,δ',q'0,A'where

Q'={[q]|qQ}(ifq=r,onlyoneofthemisinQ'),δ'(q,a)=[δq,a]foreveryqQandaΣ,q00=[q0],andA0={[q]|qA}

9. Output ( M')”

a. Show that M and M' are equivalent.

b. Show that M0 is minimal—that is, no DFA with fewer states recognizes the same language. You may use the result of Problem 1.52 without proof.

c. Show that MINIMIZE operates in polynomial time.

Question: Describe the error in the following “proof” that 0*1*is not a regular language. (An error must exist because 0*1*is regular.) The proof is by contradiction. Assume that 0*1*is regular. Let p be the pumping length for localid="1662103472623" 0*1*given by the pumping lemma. Choose s to be the string 0p1p . You know that s is a member of 0*1*, but Example 1.73 shows that s cannot be pumped. Thus you have a contradiction. So 0*1* is not regular.

Let be the language of properly nested parentheses. For example, (()) and ()are in, but) (is not. Show that A is in L.

Show that the set of incompressible strings contains no infinite subset that is Turing-recognizable.

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free