This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Advanced Database Systems  CSCIGA.2434  Fall 2011 Professor: Dennis Shasha Homework 2  Due: Tuesday, November 22, 2011 In this assignment, you should do EITHER problems 1 and 2 (worth 20 points each) OR problem 3 (worth 40 points). If you do both, then we will take the max(your problem 1 plus problem 2 scores, problem 3 score). You may work with one partner and sign both of your names to your paper. 1. Design a program in your favorite programming language that can generate tuples where field values can be unique, have a fixed set of distinct values that are allocated to tuples according to a uniform probability distribution, and a fixed set allocated to the tuples according to a fractal probability distribution (7030 rule). An example function is pseudocode to do this is as follows: gen(frac, N) begin p:= random permutation of numbers from 1 to N outvec:= p // so outvec is of length N while(p > 1 p:= first frac*p elements of p concatenate p to outvec end while return random permutation of outvec...
View
Full
Document
 Spring '11
 Shasha

Click to edit the document details