# ps5 - Introduction to Algorithms Massachusetts Institute of...

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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Introduction to Algorithms March 19, 2004 Massachusetts Institute of Technology 6.046J/18.410J Professors Erik Demaine and Shafi Goldwasser Handout 15 Problem Set 5 Reading: Chapters 18.1-18.2, 14.1-14.3, 33.1-33.3, Skip Lists Handout There are four problems. Each problem is to be done on a separate sheet (or sheets) of paper. Mark the top of each sheet with your name, the course number, the problem number, your recitation section, the date, and the names of any students with whom you collaborated. As on previous assignments, “give an algorithm” entails providing a description, proof, and runtime analysis. Problem 5-1. Joining and Splitting 2-3-4 Trees The JOIN operator takes as input two 2-3-4 trees, and , and an element such that for any and , we have . As output JOIN returns a 2-3-4 tree containing the node and all the elements of and . The SPLIT operator is like an “inverse” JOIN: given a 2-3-4 tree and an element , SPLIT creates a tree consisting of all elements in whose keys are less than , and a tree consisting of all elements in whose keys are greater than . In this problem, we will efficiently implement JOIN and SPLIT. For convenience, you may assume that all elements have unique keys....
View Full Document

## This note was uploaded on 10/08/2009 for the course EECS 6.046 taught by Professor Erikdemaine during the Spring '04 term at MIT.

### Page1 / 3

ps5 - Introduction to Algorithms Massachusetts Institute of...

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

View Full Document
Ask a homework question - tutors are online