IntegerFunctions

# IntegerFunctions - CSE 1400 Applied Discrete Mathematics...

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

CSE 1400 Applied Discrete Mathematics Integer Functions Department of Computer Sciences College of Engineering Florida Tech Fall 2011 Integer Functions 1 Floor, Ceiling, and Related Functions 1 Number Theoretic Functions 4 Problems on Integer Functions 7 Abstract Integer Functions S ome things are easy to model continuously , but only dis - crete integer values make sense : T he 2000 census reports there are 0.90 children per family in the U nited S tates of A merica ! There are several kinds of integer functions . One kind has a signature f : R Z This type of integer function maps real numbers to integers . These are useful when rounding or truncating computed values to integer approximations. Another type maps integers to integers . This kind has a signature f : Z Z and is useful in number theory and its applications. Floor, Ceiling, and Related Functions T he floor of a real number x is the integer n immediately below x : n x . The ﬂoor functions has signature bc : R Z b 2.75 c = 2 b- 2.5 c = - 3 b 18.5 c = 18 b- 12.6 c = - 13 b 5 c = 5 b- 5 c = - 5 b π c = 3 b- π c = - 4 b e c = 2 b- e c = - 3 b ϕ c = 1 b- ϕ c = - 2

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

View Full Document
integer functions 2 x 1 2 3 0 - 1 y = b x c 1 2 3 - 1 T he ceiling lies above x . d 2.75 e = 3 d- 2.5 e = - 2 d 18.5 e = 19 d- 12.6 e = - 12 d 5 e = 5 d- 5 e = - 5 d π e = 4 d- π e = - 3 d e e = 3 d- e e = - 2 d ϕ e = 2 d- ϕ e = - 1 x 1 2 3 0 - 1 y = d x e 1 2 3 - 1 { 2.75 } = 0.75 {- 2.5 } = 0.5 { 18.5 } = 0.5 {- 12.6 } = 0.4 { 5 } = 0.0 {- 5 } = 0.0 { π } ≈ 0.1416 {- π } ≈ 0.8584 { e } ≈ 0.7183 {- e } ≈ 0.2817 { ϕ } ≈ 0.6180 {- ϕ } ≈ 0.3820 The ﬂoor and ceiling functions are useful when reasoning about the pigeonhole principle principle. Pretend you have a things to place in n places. For instance, pretend you have 13 shirts to place in 5 boxes. A natural, nearly uniform, distribution places 2 shirts in This is an application of the quotient remainder theorem : 13 = 5 · 2 + 3 and in general a = nq + r where 0 r < n . all 5 boxes and 1 shirt each of 2 boxes. Notice that b 12/5 c = 2 and d 12/5 e = 3. 1 . If all boxes contained 3 or more shirts, then there would be at least 3 · 5 = 15 shirts, but there are only 12 shirts. Therefore some box must contain 2 = b 12/5 c or less shirts. ( box )( shirts in box ≤ b 12/5 c ) It is useful to consider the function that maps shirts to boxes. Name the shirts
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 02/11/2012 for the course MTH 2051 taught by Professor Shoaff during the Fall '11 term at FIT.

### Page1 / 8

IntegerFunctions - CSE 1400 Applied Discrete Mathematics...

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

View Full Document
Ask a homework question - tutors are online