Homework 1

# Homework 1 - CS180 Winter 2011 Homework 1 The following...

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

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS180 Winter 2011 Homework 1 The following homework is due Wednesday, January 12 at the beginning of lecture. When submitting your homework, please include your name at the top of each page. If you submit multiple pages, please staple them together. We also ask that you do something to indicate which name is your last name on the first page, such as underlining it. Please provide complete arguments and time complexity analysis for all solutions, unless otherwise stated. In order to have any work graded in this class, you must first sign and return the academic honesty agreement. 1. Prove the following by induction: " 0 1 1 1 # n = " f n- 2 f n- 1 f n- 1 f n # where f i is the i th fibonacci number. As a reminder, f = f 1 = 1 and f n> 1 = f n- 1 + f n- 2 . 2. In class, we discussed the game of Nim . This game begins with a placement of n rows of matches on a table. Each row i has m i matches. Players take turns selecting a row of matches and removing any or all of the matches in that row. Whoever claims the final match from theand removing any or all of the matches in that row....
View Full Document

## This note was uploaded on 04/16/2011 for the course CS 180 taught by Professor Moloudi during the Spring '08 term at UCLA.

Ask a homework question - tutors are online