exercise3 - B A the set of all total functions and P ( A,B...

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

View Full Document Right Arrow Icon
Algorithm and Data Structures Assignment 3 Dr. Andreas N¨uchter Fall 2009 Exercise 3.1 Compare the following function pairs. State for every pair f,g , if f O ( g ), g O ( f ) and/or f g is true and formally prove your statements! f ( n ) g ( n ) (a) n + log n 1 / 100 n + (log n ) 2 (b) log( n 2 ) log n (c) n 2 / (log n ) 2 n ( n (log n ) 2 ) (d) (log n ) log n n/ log n (e) n 3 n (f) e n 3 n Exercise 3.2 Let ( F n ) n 0 be the series of the Fibonacci numbers that is recursively de±ned as follows: F 0 = 0 F 1 = 1 F n = F n - 1 + F n - 2 for n 2 . 1. Write down the ±rst 15 Fibonacci numbers! 2. Proof by induction the following explicit formula F n = 1 5 pp 1 + 5 2 P n p 1 5 2 P n P 3. Proof that F 3 n is an even number for all n 1! (Hint: Use induction as well!) 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Exercise 3.3 Let A and B two non-empty sets. Furthermore, let
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: B A the set of all total functions and P ( A,B ) the set of partial functions from A to B (cf. slide 52). Show that if the sets A and B are non-empty and fnite the following fact are true: 1. | B A | = | B | | A | (Hint: Use induction over | A | .) 2. | P ( A,B ) | = ( | B | + 1) | A | (Hint: Use the previous result.) Exercise 3.4 Sort the following numbers with bubble sort. Write down every state of the array! 10 1 4 6 5 2 7 Please hand in the solutions on September 24 right before class. Use your own handwriting! Late homework will not be accepted. 2...
View Full Document

Page1 / 2

exercise3 - B A the set of all total functions and P ( A,B...

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

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