98midt - keys Discuss the quality of each of your solutions...

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

View Full Document Right Arrow Icon
CS531 Midterm Exam Winter, 1998 This exam is closed book/notes/neighbors/etc. Answer all questions in the blue books. Unsupported work will receive no credit. 1. (25%) Given a list S s s n = 1 ,..., of n integers, and a search key k , determine the number of occurrences of k in S . Discuss the quality of each of your solutions in terms of time/space/processors. Efficiency counts. a) RAM b) CREW PRAM c) CRCW PRAM d) Linear array 2. (35%) Given a list S s s n = 1 ,..., of n integers, and a search key k , create a list of members of S arranged so that all of the search keys appear before all of the other
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: keys. Discuss the quality of each of your solutions in terms of time/space/processors. Efficiency counts. a) RAM b) CREW PRAM c) CRCW PRAM d) Linear array e) 2-D Mesh 3. (40%) Given a set X x x n = { ,..., } 1 of integers, x n i ∈ [ , ] / 1 1 2 , distributed in an arbitrary fashion one element per processor on a 2-D mesh of size n , give an optimal algorithm to sort X . Given a 2-D mesh of size n 2 3 / , give an optimal algorithm to solve this problem....
View Full Document

This document was uploaded on 05/02/2010.

Ask a homework question - tutors are online