Download Section 2.5 - Concordia University

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Mathematics wikipedia , lookup

Discrete mathematics wikipedia , lookup

Brouwer–Hilbert controversy wikipedia , lookup

Foundations of mathematics wikipedia , lookup

Secondary School Mathematics Curriculum Improvement Study wikipedia , lookup

Ethnomathematics wikipedia , lookup

Elementary mathematics wikipedia , lookup

Infinity wikipedia , lookup

Transcript
COMP232 - Mathematics for Computer Science
Tutorial 8
Ali Moallemi
moa [email protected]
Iraj Hedayati
h [email protected]
Concordia University, Winter 2016
Ali Moallemi, Iraj Hedayati
COMP232 - Mathematics for Computer Science
1/9
Table of Contents
1
2.5 Cardinality of sets
Exercise 2
Exercise 6
Exercise 7
Exercise 8
Exercise 9
Exercise 10
Ali Moallemi, Iraj Hedayati
COMP232 - Mathematics for Computer Science
2/9
Exercise 2
Determine whether each of these sets is finite, countably infinite, or
uncountable. For those that are countably infinite, exhibit a one-to-one
correspondence between the set of positive integers and that set.
a) the integers greater than 10
Answer:
S = {11, 12, 13, . . . },S is countably infinite.
f : Z+ → S, f (n) = n + 10.
b) the odd negative integers
Answer:
S = {−1, −3, −5, . . . },S is countably infinite.
f : Z+ → S, f (n) = −2n + 1.
c) the integers with absolute value less than 1,000,000
Answer:
S = {−999999, −999998, −999997, . . . , 999997, 999998, 999999},
S is finite.
Ali Moallemi, Iraj Hedayati
COMP232 - Mathematics for Computer Science
3/9
Exercise 2 Cont...
Determine whether each of these sets is finite, countably infinite, or
uncountable. For those that are countably infinite, exhibit a one-to-one
correspondence between the set of positive integers and that set.
d) the real numbers between 0 and 2
Answer:
S = (0, 2),
S is uncountable.
e) the set A × Z+ where A = {2, 3}
Answer:
S = {(2, 1), (3, 1), (2, 2), (3, 2), (2, 3), (3, 3) . . . },S is countably
infinite.
f : S → Z+ , f ((2, n)) = 2n and f ((3, n)) = 2n − 1.
f) the integers that are multiples of 10
Answer:
S = {. . . , −30, −20, −10, 0, 10, 20, 30, . . . },S is countably infinite.
f : Z+ → S, f (2n) = (n − 1) · 10 and f (2n − 1) = −n · 10.
Ali Moallemi, Iraj Hedayati
COMP232 - Mathematics for Computer Science
4/9
Exercise 6
Suppose that Hilbert’s Grand Hotel is fully occupied, but the hotel closes
all the even numbered rooms for maintenance. Show that all guests can
remain in the hotel.
Answer:
By closing even numbered rooms, we have: {1, 3, 5, . . .}
All available room numbers are in form of 2 · k + 1. It is possible to move
all the guest in odd room numbers to odd room numbers where k is an
even number. Then the rest of odd room numbers where k is an odd
number are free. Guests in even numbered rooms n move to
2 · (n − 1) + 1. Guests in odd numbered rooms n = 2k + 1 move to
2 · 2k + 1. New assignment of guests is as follows:
Current room number k New room number
1=2·0+1
0 2·2·0+1=1
2
- 2·1+1=3
3=2·1+1
0 2·2·1+1=5
- 2·3+1=7
4
...
Ali Moallemi, Iraj Hedayati
COMP232 - Mathematics for Computer Science
5/9
Exercise 7
Suppose that Hilbert’s Grand Hotel is fully occupied on the day the hotel
expands to a second building which also contains a countably infinite
number of rooms. Show that the current guests can be spread out to fill
every room of the two buildings of the hotel.
Answer:
Move the guest in room 2n to n, and Move the guest in room 2n + 1 to n
in the new building.
In simple words, keep guests in even numbered rooms in first floor. Move
guests in odd numbered rooms to second floor.
Ali Moallemi, Iraj Hedayati
COMP232 - Mathematics for Computer Science
6/9
Exercise 8
Show that a countably infinite number of guests arriving at Hilbert’s fully
occupied Grand Hotel can be given rooms without evicting any current
guest.
Answer:
Move the current guest in room n to 2n. Fill every odd room 2n + 1 with
new guest number n.
Ali Moallemi, Iraj Hedayati
COMP232 - Mathematics for Computer Science
7/9
Exercise 9
Suppose that a countably infinite number of buses, each containing a
countably infinite number of guests, arrive at Hilbert’s fully occupied
Grand Hotel. Show that all the arriving guests can be accommodated
without evicting any current guest.
Answer:Use the fact of having infinite number of prime numbers.
Ref: http://mathandmultimedia.com/2014/05/26/grand-hotel-paradox/
Ali Moallemi, Iraj Hedayati
COMP232 - Mathematics for Computer Science
8/9
Exercise 10
Give an example of two uncountable sets A and B such that A − B is
a) finite.
Answer:
A = R and B = R − {1}.
Then A − B = {1}.
b) countably infinite.
Answer:
A = R and B = R − Z.
Then A − B = Z.
c) uncountable.
Answer:
A = R and B = R− .
Then A − B = R+ .
Ali Moallemi, Iraj Hedayati
COMP232 - Mathematics for Computer Science
9/9