4 views

Uploaded by Paul Jones

- Intro
- Shell commands
- Horowitz Resume
- Shivani Mehan - Resume
- Transportation
- 07.+Le+Havre+Overview
- Time Table 2011
- Esteriana Haskasa__General Resume.docx
- UniAzad CW
- Defining and Implementing Business Add
- Tsa Practice Quiz #2 With Key
- Current (Hottest) Topics in Computer Science
- Graph + solution matrix
- Midterm Solutions
- Issues Paper- Should the US switch to plastic currency?
- Lab4_RepetitionEdit1
- Discrete Math
- Computer Courses
- Resume Kundan B.tech Cse 2012
- 101hw7w17

You are on page 1of 7

NAME: __________________________________________________________________________

RUID:___________________________________________________________________________

Electronic Devices are not permitted during the quiz. These include but are not restricted to calculators,

computers and cell phones.

No communication between students or anyone outside of class is permitted during the quiz.

Textbooks, notes and any other written materials are not permitted during the quiz.

INSTRUCTED TO DO SO

1. In each blank, write the letter of the formula that most closely provides the number of iterations

performed by the corresponding loop. Ignore any requirement to use a ceiling or floor function.

Note that an option may be used zero or more times (i.e. once, more than once, not at all).

A) a

B) x0

C) (x0 a)/k

D) (a - x0)/k

E) x0 + a k

F) (x0 a)/k

G) x0 / a

H) a / x0

I) x0 ^ a

J) a ^ x0

K) logk(x0 a)

L) logk(a - x0)

M) logk(a)

N) logk(x0)

O) logk(x0 / a)

P) logk(a / x0)

Q) logx0(a)

R) loga(x0)

S) logk(logx0(a))

T) logk(loga(x0))

U) logx0(a)/lg(a)

V) loga(x0)/logk(x0)

W) logx0(a)/logk(x0)

X)

____________ a)

x

x0

while x > a

x

x - k

end

where:

x0 and a are integers

a < x0 and k > 1

____________ b)

x

x0

while x < a

x

kx

end

where:

x0 and a are real numbers

0 < x0 < a and k > 1

____________ c)

x

x0

while x > a

x

x / k

end

where:

x0 and a are real numbers

0 < a < x0 and k > 1

____________ d)

x

x0

while x < a

x

xk

end

where:

x0 and a are real numbers

1 < a < x0 and k > 1

____________ e)

x

x0

while x > a

x

end

where:

x0 and a are real numbers

1 < a < x0 and k > 1

2. Find the least integer n such that f(x) is O(xn) for each of these functions. If no such n is

possible, write Impossible.

_____________ h) f(x) =

for x > k. Assume C, k and x are real numbers. For each of the following blanks, write True if

the given C and k establish a big-O relationship. Otherwise, write False.

a) f(x) = x + 10,

f(x) = O(x)

_____________

C = 1, k = 1

_____________

C = 10, k = 1

_____________

C = 2, k = 6

_____________

C = 100, k = 1

b) f(x) = x2 + x,

f(x) = O(x2)

_____________

C = 2, k = 0

_____________

C = 2, k = 1

_____________

C = 2, k = 2

_____________

C = 0.5, k = 2

c) f(x) = 2x + 2x,

f(x) = O(2x)

_____________

C = 2, k = 0

_____________

C = 2, k = 1

_____________

C = 2, k = 2

_____________

C = 0.5, k = 2

d) f(x) = lg(x) + 4,

_____________

C = 3, k = 4

_____________

C = 4, k = 1

_____________

C = 2, k = 16

_____________

C = 1, k = 256

e) f(x) = x! + 2x,

f)

f(x) = O(lg(x))

f(x) = O(x!)

_____________

C = 2, k = 2

_____________

C = 2, k = 3

_____________

C = 1, k = 4

_____________

C = 2, k = 4

f(x) = 7 + 1/x,

f(x) = O(1)

_____________

C = 7, k = 0

_____________

C = 7, k = 1

_____________

C = 8, k = 0

_____________

C = 8, k = 1

4. What is the effect in the time required to solve a problem when you increase the size of the input

from n to n+1, assuming that the number of milliseconds the algorithm uses to solve the

problem with input size n is each of the quantities expressed below? Let W1 denote the runtime

with input size n+1 and let W0 denote the runtime with input size n. In each blank, write the

corresponding letter from the table below. Note that an option may be used zero or more times

(i.e. once, more than once, not at all).

A) W1 - W0 = 0

B) W1 - W0 = 1

C) W1 - W0 = 2

D) W1 - W0 = n

E) W1 - W0 = 2n

F) W1 - W0 = 2n+1

G) W1 - W0 = n+1

H) W1 - W0 = lg(n)

I) W1 - W0 = lg(n+1)

J) W1 - W0 = lg(n+1) lg(n)

K) W1 / W0 = 2

L) W1 / W0 = 2n

M) W1 / W0 = n+1

N) W1 / W0 = 2n+1

O) W1 / W0 = 2n+2

P) W1 / W0 = lg(n)

Q) W1 / W0 = n2

R) W1 / W0 = n!

S) W1 / W0 = 2n

T) W1 / W0 = 2n+1

U) W1 / W0 = 2(2n+1)

___________ a) lg n

___________ b) n

___________ c) 2n

___________ d) n2

___________ e) 2n

___________ f) 2 ^ (n2)

___________ g) n!

Scratch Paper

- IntroUploaded byBrian
- Shell commandsUploaded bygeek_sbc
- Horowitz ResumeUploaded byviky
- Shivani Mehan - ResumeUploaded byShivani Mehan
- TransportationUploaded bypednekar30
- 07.+Le+Havre+OverviewUploaded byelectrotehnica
- Time Table 2011Uploaded bySaiprasad Minajigi
- Esteriana Haskasa__General Resume.docxUploaded byEster Haska
- UniAzad CWUploaded byAyyaz Shad
- Defining and Implementing Business AddUploaded byErnesto Aleman Landrove
- Tsa Practice Quiz #2 With KeyUploaded byapi-16147700
- Current (Hottest) Topics in Computer ScienceUploaded byRendiTriyana
- Graph + solution matrixUploaded byDaisuke Niwa
- Midterm SolutionsUploaded byshandeva99
- Issues Paper- Should the US switch to plastic currency?Uploaded bybennettnate5
- Lab4_RepetitionEdit1Uploaded byzieraS
- Discrete MathUploaded byAngelo John R. Javinez
- Computer CoursesUploaded byshabeer
- Resume Kundan B.tech Cse 2012Uploaded byakshayg148
- 101hw7w17Uploaded bychrislake12
- Kata YuanUploaded byfresilda valeriano
- 1.Introduction of SEUploaded byRaj Akhani
- MSCS Test SampleUploaded byTruepaki Khan
- Final Exam Schedule Spring 2015Uploaded byfaisal_ahsan7919
- TKAIXRHA4XGXSFUWKIHX2W_IITD_CRSEOFF.pdfUploaded byManu Chakkingal
- Macro ExcelUploaded byreddylogin
- Statement of Principle of OptimalityUploaded bySyed Majeed
- Limits-and-Continuity-Worksheet.pdfUploaded byknlsinha
- Limits-and-Continuity-Worksheet.pdfUploaded byknlsinha
- APCSA BrochureUploaded byTiffany

- 20121108_quiz_6bUploaded byPaul Jones
- 20121206_quiz_10_solutionsUploaded byPaul Jones
- 20121206_quiz_10Uploaded byPaul Jones
- 20121129_quiz_9bUploaded byPaul Jones
- 20121025 Quiz 4r SolutionsUploaded byPaul Jones
- 20121011 Quiz 4b SolutionsUploaded byPaul Jones
- 20121129 Quiz 9b SolutionsUploaded byPaul Jones
- 20121129_quiz_9aUploaded byPaul Jones
- 20121011_quiz_4a.pdfUploaded byPaul Jones
- 20121025_quiz_4rUploaded byPaul Jones
- 20121129 Quiz 9a SolutionsUploaded byPaul Jones
- 20121120_quiz_8bUploaded byPaul Jones
- 20121011_quiz_4bUploaded byPaul Jones
- 20121120 Quiz 8a SolutionsUploaded byPaul Jones
- 20121115_quiz_7bUploaded byPaul Jones
- 20121115 Quiz 7b SolutionsUploaded byPaul Jones
- 20121115_quiz_7aUploaded byPaul Jones
- 20121115 Quiz 7a SolutionsUploaded byPaul Jones
- 20121108 Quiz 6b SolutionsUploaded byPaul Jones
- 20121108 Quiz 6a SolutionsUploaded byPaul Jones
- 20121018_quiz_5aUploaded byPaul Jones
- 20121018 Quiz 5b SolutionsUploaded byPaul Jones
- 20121018 Quiz 5a SolutionsUploaded byPaul Jones
- 20121011 Quiz 4a SolutionsUploaded byPaul Jones
- 20121004_quiz_3bUploaded byPaul Jones
- 20121004 Quiz 3a SolutionsUploaded byPaul Jones

- Session Plan CHSUploaded byleijulia
- EnCase Forensic Imager v7.06 User's GuideUploaded byNeetish Jayant
- MAD LAB for CSEUploaded byanil
- Seisan TutorialUploaded byhenry
- Basics LatexUploaded byOmisakin Adedayo
- Design FundamentalsUploaded bySalik Siddiqui
- Ehu15 30R ManualUploaded bySal Mendez
- 29_Heterogeneous Connectivity Administrator’s GuideUploaded byapi-3702030
- The Flappy BirdUploaded byTran Tuan Thanh
- 01 the Structure Difference of Atca and Cpci Sgsn Issue1.00 (Duxiaoqin 20100520)Uploaded byAus
- GEH-6126Uploaded byHamzaBendjaballah
- ASROCK N68PV-GSUploaded byPyuk Aze Kurokawa
- ITPS1528Uploaded byAbhishek Verma
- 220 1 Document Optix Metro 1000 Ss42efsUploaded bySam Awi
- 1Uploaded bypriyanga
- HairyDairyMaid_WRT54G_v22Uploaded byMC. Rene Solis R.
- C++ 07 Batch by 09CE37Uploaded byDarya Memon
- Password Based DoorUploaded byhunnbajaj
- McAfee DLP Endpoint datasheetUploaded byM_BB
- Linear User Manual.pdfUploaded byasafridis
- ps2Uploaded byShafayet Uddin
- 2804wbrp g MnUploaded bybigbigbig90003270
- AMD Overclocking Guide for Dragon PlatformUploaded byGIGABYTE UK
- Monotone ProgramUploaded byDavid
- 2N3906 datasheetsUploaded byGangadai Persaud
- Rr720204 Embedded SystemsUploaded byandhracolleges
- IP AddressUploaded byRavi Krishnan
- embeded systemUploaded byanshu_ranjan1
- Printer No PriceUploaded byservicer
- RACSIG_RACInternalsUploaded byKarthik Raman