hw5(1) - CS 373 Combinatorial Algorithms Fall 2000 Homework...

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

View Full Document Right Arrow Icon
CS 373: Combinatorial Algorithms, Fall 2000 Homework 1 (due November 16, 2000 at midnight) Name: Net ID: Alias: U 3 / 4 1 Name: Net ID: Alias: U 3 / 4 1 Name: Net ID: Alias: U 3 / 4 1 Starting with Homework 1, homeworks may be done in teams of up to three people. Each team turns in just one solution, and every member of a team gets the same grade. Since 1-unit graduate students are required to solve problems that are worth extra credit for other students, 1-unit grad students may not be on the same team as 3/4-unit grad students or undergraduates. Neatly print your name(s), NetID(s), and the alias(es) you used for Homework 0 in the boxes above. Please also tell us whether you are an undergraduate, 3/4-unit grad student, or 1-unit grad student by circling U, 3 / 4 , or 1, respectively. Staple this sheet to the top of your homework. Required Problems 1. Give an O ( n 2 log n ) algorithm to determine whether any three points of a set of n points are collinear. Assume two dimensions and exact arithmetic. 2. We are given an array of n bits, and we want to determine if it contains two consecutive 1 bits. Obviously, we can check every bit, but is this always necessary? (a) (4 pts) Show that when n mod 3 = 0 or 2, we must examine every bit in the array. that is, give an adversary strategy that forces any algorithm to examine every bit when n = 2 , 3 , 5 , 6 , 8 , 9 , . . . . (b) (4 pts) Show that when n = 3 k +1 , we only have to examine n 1 bits. That is, describe an algorithm that Fnds two consecutive 1s or correctly reports that there are none after examining at most n 1 bits, when n = 1 , 4 , 7 , 10 , . . . . (c) (2 pts) How many n -bit strings are there with two consecutive ones? ±or which n is this number even or odd?
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS 373 Homework 5 (due 11/16/00) Fall 2000 3. You are given a set of points in the plane. A point is maximal if there is no other point both both above and to the right. The subset of maximal points of points then forms a staircase . The staircase of a set of points. Maximal points are black.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/15/2009 for the course 942 cs taught by Professor A during the Spring '09 term at University of Illinois at Urbana–Champaign.

Page1 / 5

hw5(1) - CS 373 Combinatorial Algorithms Fall 2000 Homework...

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

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