# Midterm1 - UC Berkeley—CS 170 Midterm 1 Lecturer Michael Jordan September 30 Midterm 1 for CS 170 Print your name(last(first Sign your name Write

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

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

Unformatted text preview: UC Berkeley—CS 170 Midterm 1 Lecturer: Michael Jordan September 30 Midterm 1 for CS 170 Print your name: , (last) (first) Sign your name: Write your section number (e.g., 101): Write your SID: One page of notes is permitted. No electronic devices, e.g. cell phones and calculators, are permitted. Do all your work on the pages of this examination. If you need more space, you may use the reverse side of the page, but try to use the reverse of the same page where the problem is stated. You have 50 minutes. The questions are of varying diﬃculty, so avoid spending too long on any one question. In all algorithm design problems, you may use high-level pseudocode. DO NOT TURN THE PAGE UNTIL YOU ARE TOLD TO DO SO. Problem Score/Points 1 /12 2 /20 3 /17 4 /10 5 /10 6 /10 7 /10 8 /15 Total /104 Date: September 30 2 1. True/False [2 points per problem] For each statement below, say whether it is true or false by circling True or False . You do not need to provide any explanation for your answer. (a) True or False : The topological sort of an arbitrary acylic directed graph can be computed in linear time. (b) True or False : Consider an edge ( u, v ) in a directed graph. In a depth-first search of this graph, if u has ( pre , post ) times equal to (6,9) and v has ( pre , post ) times equal to (5,10) then ( u, v ) must be a back edge. (c) True or False : In a depth-first search of a directed graph, it is possible to have an edge between two vertices u and v with ( pre , post ) times equal to (5,10) for...
View Full Document

## This document was uploaded on 02/27/2010.

### Page1 / 9

Midterm1 - UC Berkeley—CS 170 Midterm 1 Lecturer Michael Jordan September 30 Midterm 1 for CS 170 Print your name(last(first Sign your name Write

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online