Computer Science 174 - Spring 1998 - Canny - Midterm 2

Computer Science - CS174 Midterm 2 Spring 98 J Canny April 7 This is a closed-book exam with 4 questions The marks for each question are shown in

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: CS174 Midterm 2 Spring 98 J. Canny April 7 This is a closed-book exam with 4 questions. The marks for each question are shown in parenthe- ses, and the total is 60 points. Make sure you allocate enough time to attempt all the questions. You are allowed to use the formula sheet that will be handed out with the exam. No other notes are allowed. Calculators are OK. Write all your answers in this booklet. Good Luck! NAME SID Number 1 1. (20 points) Count the number of permutations (with repeats) of length k of the 5 characters a, b, c, d, e, if: (a) There are exactly two occurences of the substring “ab”? (b) There are exactly two occurrences of the substring “aa”? Note that the substring “aaa” counts as two occurrences. 2 2. (15 points) A program P is supposed to compute the inverse of an nxn input matrix A. Describe the steps of a probabilistic program checker that would run to check that the output is correct. You should analyze its running time....
View Full Document

This test prep was uploaded on 04/20/2008 for the course CS 174 taught by Professor Canny during the Spring '98 term at University of California, Berkeley.

Page1 / 6

Computer Science - CS174 Midterm 2 Spring 98 J Canny April 7 This is a closed-book exam with 4 questions The marks for each question are shown in

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online