Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CSIS-385 Quiz 9: Algorithms and Graph Theory, Quizzes of Algorithms and Programming

Quiz 9 for the csis-385 course, focusing on algorithms and graph theory. Topics include dijkstra's algorithm, breadth first search, trees, sorting algorithms, and prim's algorithm. Students are required to identify the correct answers for various questions related to these topics.

Typology: Quizzes

Pre 2010

Uploaded on 08/09/2009

koofers-user-s1p
koofers-user-s1p 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSIS-385: Quiz 9 Name____________________________________
pf3

Partial preview of the text

Download CSIS-385 Quiz 9: Algorithms and Graph Theory and more Quizzes Algorithms and Programming in PDF only on Docsity!

CSIS-385: Quiz 9 Name____________________________________

  1. We have actually learned two ways to compute the shortest path from a single source: (1) Dijkstra’s algorithm or (2) you can do a Breadth First Search from the source vertex. However, Breath First Search will only produce a shortest path for which types of graphs (Circle one). a. Complete Graphs b. Directed Graphs c. Un-weighted Graphs d. Directed Acyclic Graphs
  2. Trees are actually graphs. Thus, you could run Dijkstra’s algorithm on a tree to find the shortest distance from a node to any other node. Explain why this would be pointless.
  3. If you worked for the Census Bureau and you had to implement an algorithm for sorting all U.S. residents (300 million) by their Social Security number 9 digits, which algorithm would be the fastest theoretically? The log 2 (300,000,000) = 28.16. Your computer has 8GB of RAM and a 9 digit integer can be sorted using 4 bytes. a. Quick Sort b. Radix Sort c. Counting Sort d. Bubble Sort Briefly explain your answer for partial credit:
  4. Would your answer change if the government switched to a 16 digit Social Security number? a. Yes b. No Briefly explain your answer for partial credit.
  5. Would your answer change if your algorithm had to be implemented on a computer with 512MB of Ram a. Yes b. No Briefly explain your answer for partial credit.
  6. Given the following graph, show the last five update steps of Prim’s algorithm:

1 2 9 5 4 17 16 10 4 3 3 7 5 2 start