Solution false problem set 5 has shown that the on 2

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: tiplication algorithm. Solution: False. Problem Set 5 has shown that the O(N 2 ) algorithm runs faster for small numbers. (d) T F [2 points] If we convert an n-digit base-256 number into base 2, the resulting number of digits is Θ(n2 ). log n Solution: False. log256 n = log 2256 = log82 n . By converting a base-256 number 2 to base 2, the number of digits is multiplied by 8. For all b1 , b2 = 1, converting a base-b1 number to base-b2 results in a linear increase or decrease in the number of digits. (e) T F [2 points] In a weighted undirected graph G = (V, E, w), breadth-first search from a vertex s finds single-source shortest paths from s (via parent pointers) in O(V + E ) time. Solution: False. Only in unweighted graphs. (f) T F [2 points] In a weighted undirected tree G = (V, E, w), breadth-first search from a vertex s finds single-source shortest paths from s (via parent pointers) in O(V + E ) time. 6.006 Quiz 2 Solutions Name Solution: True. In a tree, there is only one path between two vertices,...
View Full Document

This document was uploaded on 03/17/2014 for the course ELECTRICAL 6.006 at MIT.

Ask a homework question - tutors are online