0 Up votes0 Down votes

87 views4 pagesMar 29, 2016

© © All Rights Reserved

PDF, TXT or read online from Scribd

© All Rights Reserved

87 views

© All Rights Reserved

- Analysis of the greedy algorithm on graph theory problems
- Data Structures & Algorithms
- Edmond's Matching
- lec17
- 2 - 4 - Quick-Union Improvements (1302)
- (de Werra
- problemset9sol[1]
- Roberto Maieli and Quintijn Puite- Modularity of proof-nets:Generating the type of a module
- ad
- Algo Analysis
- Graph Theory Terms
- Filename: MCA_Science_FacultyIII.pdf
- Saso08 Cornejo
- Monte Carlo
- Solutions Manual
- Artigo Do Periodico
- Chapter 6 Deadlocks
- Probability Practice
- 2011-fpdaa
- sample.pdf

You are on page 1of 4

Sample Questions

The quiz will have questions for approx. 70 minutes

1. Choose the MOST appropriate answer and circle the letter corresponding to

your answer.

(15 Minutes)

The penalty for each INCORRECT answer is 0.25 point.

i)

that the number of distinct integers in the sequence is O (log n), the

time complexity to find an element in the list is given by,

A. O(n)

ii)

B. O(log n)

The residual capacity of the augmenting path for the network shown

below is

A. 1

B. 2

C. 3

1/1

D. 7

c

1/1

1/1

s

t

0/3

0/2

b

iii)

D. (1)

C. O(log log n)

0/2

C. 105n + 26n

A. n + 10000n

B. n1.9999

iv)

A. determines the edge connectivity of a network

B. comprises edges which can admit positive flow

C. converts a tree network into a cyclic chain

D. is used only for cyclic chain networks

v)

A. It gives optimal solution

B. The solution has optimal substructure

C. It is faster than Greedy technique

D. n3/n

vi)

A. If it is as hard as any problem in NP

B. A non-polynomial time algorithm has been discovered

C. A polynomial time algorithm can exist but needs a parallel computer

D. There is Greedy solution to the problem

vii)

solution

A. Longest simple path problem for a given graph

B. The 3-colorability problem in graphs

C. The Eulerian cycle in a graph

D. The Hamiltonian Cycle in a graph

viii)

0

3

1

1

0 2 4

0 1

0

A. QR and RS

B. QS

C. PQ and RS

D. there is no path

ix)

determine the presence of a cycle in a given graph

A. minimum cost spanning tree algorithm

B. Ford-Fulkersons algorithm

C. breadth-first search algorithm

D. depth-first search algorithm

x)

Working modulo q= 11, how many spurious hits does the Rabin-Karp

matcher encounter in the text T = 31415926 when looking for the

pattern P = 26

A. None B. One

C. Two

D. Three

(15 Minutes)

Penalty for each incorrect answer is 0.5 point

i)

ii)

can be constructed in O(n) worst-case time.

iii)

weighted undirected graph is an example of a dynamic

programming algorithm.

iv)

computed in O(v2) time by the Floyd-Warshall algorithm, which

repeatedly squares the adjacency matrix of G.

v)

determined in O(n) worst-case time.

vi)

length n is (n2).

vii)

log n switches per stage.

viii)

T(n)=2T(n/2)+ (n)

ix)

x)

O (log n).

x and y are two distinct numbers in the set S. Write an O(n) time

algorithm to determine x, y S such that x-y w-z for all w,z S.

(15 Minutes)

4. Examine the procedure DOES_SOMETHING below and answer the

following questions.

(15 Minutes)

a. What is the function of the procedure DOES_SOMETHING?

b. What is the time complexity of the procedure?

c. If A[l .. r] = [24, 30, 09, 46, 15, 19, 29, 86,78], what is the output?

Procedure DOES_SOMETHING(A,l,r)

Input : Array A(l .. r)

1.

2.

3.

4.

5.

6.

7.

8.

x A[l]; i l; j r;

while i < j do

while A[i] x and i r do i i +1;

while A[j] > x and j l do j j -1;

if i< j then

exchange A[i] A[j];

q j;

exchange A[l] A[q];

using only min (m,n) entries in an array plus O(1) additional space. (15 Minutes)

6. A graph is bipartite if all its vertices can be partitioned into two disjoint subsets

X and Y so that every edge connects a vertex in X with a vertex in Y. Design an

algorithm to check whether a given graph is bipartite.

(15 Minutes)

7. What is an optimal Huffman code for the following set of frequencies, based on

the first 8 Fibonacci numbers?

a:1

b:1

c:2

d:3

e:5

f:8

g:13 h:21

Can you generalize your answer to find the optimal code when the frequencies

are the first n Fibonacci numbers?

(15 Minutes)

- Analysis of the greedy algorithm on graph theory problemsUploaded byJerick Mari A. Tancinco
- Data Structures & AlgorithmsUploaded bysrinu63
- Edmond's MatchingUploaded byking_bodontee
- lec17Uploaded byAlaul Asif
- problemset9sol[1]Uploaded byGobara Dhan
- (de WerraUploaded byactionmenn
- Roberto Maieli and Quintijn Puite- Modularity of proof-nets:Generating the type of a moduleUploaded byGholsas
- Graph Theory TermsUploaded byAsif Iqbal Chhipa
- 2 - 4 - Quick-Union Improvements (1302)Uploaded byeshwaar1
- adUploaded byDiego Espinoza
- Filename: MCA_Science_FacultyIII.pdfUploaded byatulzende
- Saso08 CornejoUploaded byOnetwothreefourfunk
- Algo AnalysisUploaded byGajendra Singh
- Monte CarloUploaded byarun06msrit
- Solutions ManualUploaded byDavid N Jiang
- Artigo Do PeriodicoUploaded byadrianazeredo
- Chapter 6 DeadlocksUploaded bybagrechaamit
- Probability PracticeUploaded bysandeep_leo088714
- 2011-fpdaaUploaded byajitkarthik
- sample.pdfUploaded bySandeep Chaurasia
- GString_A Novel Approach for Efficient Search in Graph Databases.Jiang.pdfUploaded byusernameuserna
- COT-311 Algorithm DesignUploaded bysadafScribd
- AlgorithmUploaded byYessica Rosas
- 4Uploaded byArnav Guddu
- Vertex Coloring With Basic Bound on Chromatic Number (1)Uploaded byInternational Journal of Innovative Science and Research Technology
- ERS-2015-006-LISUploaded bynisarg
- A512738919_22224_20_2018_deadlock2bUploaded byHitesh Verma
- A New Concept of Matrix Algorithm for MST in Undirected Interval Valued Neutrosophic GraphUploaded byAnonymous 0U9j6BLllB
- July 15Uploaded byGhanshyam Sharma
- lect0123.pdfUploaded bySangeeta Jain

- RU40 3rd Carrier Addition MOP.v1.5Uploaded byAaron Perkins
- sagemlink_userguideUploaded byAnonymous hFnTIUjx
- idm crackUploaded bytilalmansoor
- Counters and Formulae_HuaweiUploaded byPrasoon Singh
- aUploaded bysurya43
- Correctedreport EXP 3Uploaded bySuneelRuttala
- Gigaset Service Manual 347 SM A160 SuaUploaded byms0103
- CCNA 3 EX_EIGRPUploaded byJosueChalenSarez
- WhatsApp-Security-Whitepaper (1).pdf [SHARED].pdfUploaded byVíctor hugo
- LTE radio overview_Ver.3.pdfUploaded byAnonymous JmeZ95P0
- Brochure Bizhub 552 652 3Uploaded byEmerzito Tlv
- Tracking GhostNet: Investigating a Cyber Espionage NetworkUploaded byThe SecDev Group
- Network Access Control evaluationUploaded byOaNa Andreea
- PDF Android AdvanceUploaded byIlyas Ahamed
- BIPAC-5100_CLI_Reference_ManualUploaded byCarlos Correia
- DLP-and-IRM-Oracle-DatasheetUploaded bytopperge
- moot-prop-2017Uploaded byAdarsh Srivastava
- Basic IP Network Troubleshooting - Jorgen LanesskogUploaded bySholl1
- Ngx Mx-lpc1768-s User ManualUploaded bytallurips91
- Spec Lcu 500Uploaded byhenrydav_o
- NB series manual.pdfUploaded byflorin
- Diameter Credit ControlUploaded byTrần Trọng Tiến
- Chapter 9 ExamUploaded byidk
- Audio-Video Add-On Tutorial - KodiUploaded bylenovoa820lm
- Subnetting Summary Youtube.com%2Fromeroc24Uploaded byFlakita Bella
- PI ProcessBook User Guide (Español)Uploaded byNicoleIsabelCifuentesMuñoz
- 3G PerformanceUploaded byMike Esguerra
- w Lan Switch 200506Uploaded byJeong-geun Kim
- COMMON LAC IN 2G&3GUploaded byabdollahseyedi2933
- Web ProxyUploaded byYe Zeiya Shein

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.