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)).

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

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

Rice’s theorem. Let P be any nontrivial property of the language of a Turing machine. Prove that the problem of determining whether a given Turing machine’s language has property P is undecidable. In more formal terms, let P be a language consisting of Turing machine descriptions where P fulfils two conditions. First, P is nontrivial—it contains some, but not all, TM descriptions. Second, P is a property of the TM’s language—whenever LM1=LM2, we haveM1P if and only iffM2P . Here, M1 and M2 are any TMs. Prove that P is an undecidable language.

a. Give an NFA recognizing the language (01001010)*.

b. Convert this to an equivalent DFA. Give only the portion of theDFAthat is reachable from the start state.

Give a counter example to show that the following construction fails to prove that the class of context-free languages is closed under star. Let A be a CFL that is generated by the CFG G=(V,,R,S). Add the new ruleSSS and call the resulting grammar. This grammar is supposed to generate A*.

Let D=w|wcontains an even number of ’s and an odd number of ’s and does not contain the substring ab}. Give a DFA with five states that recognizes Dand a regular expression that generates D.(Suggestion: Describe Dmore simply.)

Let F be the language of all strings over 0,1that do not contain a pair of 1s that are separated by an odd number of symbols. Give the state diagram of a DFA with five states that recognizes F . (You may find it helpful first to find a 4-state NFA for the complement of F).

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