discrete mathematics recitation course 2tiger.ee.nctu.edu.tw/course/discrete2015/practice...
TRANSCRIPT
Discrete MathematicsRecitation Course 2
2013.03.14ๅผต็็ฟ
Acknowledge ้ญๅฎๅฒTA 2012
2-1
Sets
2-1 Ex.8
โข Determine whether these statements are true or false.โ a) โ โ {โ }โ b) โ โ {โ , {โ }}โ c) โ โ {โ }โ d) โ โ {{โ }}โ e) โ โ {โ , {โ }}โ f) {โ } โ {โ , {โ }}โ g) {โ } โ {{โ }, {โ }}
truetruefalsetruetruetruefalse, 2 sets are equal
Cardinality
โข 2-1 Ex.18What is the cardinality of each of these sets?โ a) รโ b) {ร} โ c) {ร, {ร} } โ d) {ร, {ร} ,{ร,{ร}}}
01
23
Power Set
โข 2-1 Ex.22Determine whether each of these sets is the power set of a set, where ๐๐ and ๐๐ are distinct elementsโ a) รโ b) {ร, {a}}โ c) {ร, {a}, {ร, a}}โ d) {ร, {a}, {b}, {a, b}} {๐๐, ๐๐}
{๐๐}x
x
Cartesian Products
โข 2-1 Ex.32Explain why (๐ด๐ด ร ๐ต๐ต) ร (๐ถ๐ถ ร ๐ท๐ท)and ๐ด๐ด ร (๐ต๐ต ร๐ถ๐ถ) ร ๐ท๐ท are not the sameโ The first is a pair, and the second is a triple
โข What about ๐ด๐ด ร โ ?โข The Cartesian products ๐ด๐ด ร ๐ต๐ต and ๐ต๐ต ร ๐ด๐ด are
not equal, unless ๐ด๐ด = โ or ๐ต๐ต = โ (so that ๐ด๐ด ร๐ต๐ต = โ ) or ๐ด๐ด = ๐ต๐ต
Cartesian Products (contโd)
โข 2-1 Ex.36Suppose that ๐ด๐ด ร ๐ต๐ต = โ , where ๐ด๐ด and ๐ต๐ต are sets, what can you conclude?โ We conclude that ๐ด๐ด = โ or ๐ต๐ต = โ โ To prove this, suppose that neither ๐ด๐ด nor ๐ต๐ต were emptyโ Then there would be elements ๐๐ โ ๐ด๐ด or ๐๐ โ ๐ต๐ตโ This would give at least one element, namely (๐๐, ๐๐) in ๐ด๐ด ร ๐ต๐ต, so ๐ด๐ด ร ๐ต๐ต would not be the empty set
โ This contradiction shows that either ๐ด๐ด or ๐ต๐ต (or both, it goes without saying) is empty
2-2
Set Operations
2-2 Ex.4
โข Let ๐ด๐ด = {๐๐, ๐๐, ๐๐,๐๐, ๐๐} and ๐ต๐ต ={๐๐, ๐๐, ๐๐,๐๐, ๐๐, ๐๐,๐๐, โ}. Findโ a) ๐ด๐ด โช ๐ต๐ตโ b) ๐ด๐ด โฉ ๐ต๐ตโ c) ๐ด๐ด โ ๐ต๐ตโ d) ๐ต๐ต โ ๐ด๐ด
๐๐, ๐๐, ๐๐,๐๐, ๐๐, ๐๐,๐๐,โ = ๐ต๐ต๐๐, ๐๐, ๐๐,๐๐, ๐๐ = ๐ด๐ดโ ๐๐,๐๐,โ
Mutual Subsets
โข 2-2 Ex.20โข Show that if A and B are sets, then ๐ด๐ด โฉ ๐ต๐ต โช
๐ด๐ด โฉ ๏ฟฝ๐ต๐ต = ๐ด๐ด.
โข ๐ด๐ด โ ๐ด๐ด โฉ ๐ต๐ต โช ๐ด๐ด โฉ ๏ฟฝ๐ต๐ต : every element ๐ฅ๐ฅ โ ๐ด๐ดis an element of either๐ด๐ด โฉ ๐ต๐ต(if ๐ฅ๐ฅ โ ๐ต๐ต ) or ๐ด๐ด โฉ๏ฟฝ๐ต๐ต (if ๐ฅ๐ฅ โ ๐ต๐ต).
โข If ๐ฅ๐ฅ โ ๐ด๐ด โฉ ๐ต๐ต โช ๐ด๐ด โฉ ๏ฟฝ๐ต๐ต , then either ๐ฅ๐ฅ โ ๐ด๐ด โฉ๐ต๐ต or ๐ฅ๐ฅ โ ๐ด๐ด โฉ ๏ฟฝ๐ต๐ต. In either case, ๐ฅ๐ฅ โ ๐ด๐ด.
Membership Table
โข 2-2 Ex.35โข Show that ๐ด๐ดโจ๐ต๐ต = ๐ด๐ด โช ๐ต๐ต โ (๐ด๐ด โฉ ๐ต๐ต)
โข Do not be confused with truth table
๐จ๐จ ๐ฉ๐ฉ ๐จ๐จโจ๐ฉ๐ฉ ๐จ๐จ โช ๐ฉ๐ฉ ๐จ๐จ โฉ ๐ฉ๐ฉ ๐จ๐จ โช ๐ฉ๐ฉ โ (๐จ๐จ โฉ ๐ฉ๐ฉ)0 0 0 0 0 0
0 1 1 1 0 1
1 0 1 1 0 1
1 1 0 1 1 0
2-3
Functions
2-3 Ex.6
โข Find the domain and range of these functionsโ b) the function that assigns to each positive integer its
largest decimal digitโ c) the function that assigns to a bit string the number if
ones minus the number of zeros in the stringโ e) the function that assigns to a bit string the longest string
of ones in the string
โข Z+; {1,2,3,4,5,6,7,8,9,}โข The set of bit strings; Zโข The set of bit strings; the set of string of 1โs: {ร,1,11,111,โฆ}
2-3 Ex.8
โข Find these values:โ a) 1.1โ b) 1.1โ c) โ0.1โ d) โ0.1โ e) 2.99โ f) โ2.99
โ g) 12
+ 12
โ h) 12
+ 12
+ 12
12
โ103
โ21
2
1-1 and Onto Functions
2-3 Ex.12
โข Determine whether each of these functions from ๐๐ to ๐๐ is one to one.โ a) ๐๐ ๐๐ = ๐๐ โ 1โ b) ๐๐ ๐๐ = ๐๐2 + 1โ c) ๐๐ ๐๐ = ๐๐3
โ d) ๐๐ ๐๐ = ๐๐/2
YN, ๐๐ 3 = ๐๐ โ3 = 10YN, ๐๐ 3 = ๐๐ 4 = 2
2-3 Ex.14
โข Determine whether ๐๐:๐๐ ร ๐๐ โ ๐๐ is onto ifโ a) ๐๐ ๐๐,๐๐ = 2๐๐ โ ๐๐โ b) ๐๐ ๐๐,๐๐ = ๐๐2 โ ๐๐2
โ c) ๐๐ ๐๐,๐๐ = ๐๐ + ๐๐ + 1โ d) ๐๐ ๐๐,๐๐ = ๐๐ โ |๐๐|โ e) ๐๐ ๐๐,๐๐ = ๐๐2 โ 4
YNYYN
2-3 Ex.18
โข Determine whether each of these functions is a bijection from ๐๐ to ๐๐โ a) ๐๐ ๐ฅ๐ฅ = โ3๐ฅ๐ฅ + 4โ b) ๐๐ ๐ฅ๐ฅ = โ3๐ฅ๐ฅ2 + 7โ c) ๐๐ ๐ฅ๐ฅ = (๐ฅ๐ฅ + 1)/(๐ฅ๐ฅ + 2)โ d) ๐๐ ๐ฅ๐ฅ = ๐ฅ๐ฅ5 + 1
โข ๐๐โ1 ๐ฅ๐ฅ = (4 โ ๐ฅ๐ฅ)/3โข not 1-1 since ๐๐ 17 = ๐๐(โ17), and not onto since the range is (โโ, 7]โข ๐๐โ1 ๐ฅ๐ฅ = (1 โ 2๐ฅ๐ฅ)/(๐ฅ๐ฅ โ 1), bijection, but not from ๐๐ to ๐๐โข ๐๐โ1 ๐ฅ๐ฅ = 5 ๐ฅ๐ฅ โ 1
2-3 Ex.34
โข Let ๐๐ ๐ฅ๐ฅ = ๐๐๐ฅ๐ฅ + ๐๐ and ๐๐ ๐ฅ๐ฅ = ๐๐๐ฅ๐ฅ + ๐๐, where ๐๐, ๐๐, ๐๐, and ๐๐ are constaints. Determine for which constants ๐๐, ๐๐, ๐๐, and ๐๐ it is true that ๐๐ โ ๐๐ = ๐๐ โ ๐๐.
โข ๐๐ โ ๐๐ ๐ฅ๐ฅ = ๐๐๐๐๐ฅ๐ฅ + ๐๐๐๐ + ๐๐โข ๐๐ โ ๐๐ ๐ฅ๐ฅ = ๐๐๐๐๐ฅ๐ฅ + ๐๐๐๐ + ๐๐โข โ ๐๐๐๐ + ๐๐ = ๐๐๐๐ + ๐๐
2-3 Ex.68
โข Suppose that ๐๐ is a function from ๐ด๐ด to ๐ต๐ต, where ๐ด๐ด and ๐ต๐ต are finite sets with |๐ด๐ด| = |๐ต๐ต|Show that ๐๐ is one-to-one iff it is onto
โข 1-1 โ onto:โ if not onto, |๐ต๐ต| is at least one greater than |๐ด๐ด|
โข onto โ 1-1:โ if not 1-1, |๐ด๐ด| is at least one greater than |๐ต๐ต|
2-S Ex.13
โข Let ๐๐ and ๐๐ be functions from {1, 2, 3, 4} to {๐๐, ๐๐, ๐๐,๐๐} and from {๐๐, ๐๐, ๐๐,๐๐} to {1, 2, 3, 4}respectively, such that ๐๐ 1 = ๐๐, ๐๐(2) = ๐๐, ๐๐(3) = ๐๐, ๐๐(4) = ๐๐ and ๐๐(๐๐) = 2, ๐๐(๐๐) = 1, ๐๐(๐๐) = 3, ๐๐(๐๐) = 2โ a) Is ๐๐ one-to-one? Is ๐๐ one-to-one? โ b) Is ๐๐ onto? Is ๐๐ onto?โ c) Does either ๐๐ or ๐๐ have an inverse?
Y; NY; N
Y; N
Floor and Ceiling Functions
2-3 Ex.54
โข How many bytes are required to encode ๐๐ bits of data where ๐๐ equals โ a) 4?โ b) 10?โ c) 500?โ d) 3000?
4/8 = 110/8 = 2500/8 = 633000/8 = 375
2-3 Ex.70 -c)
โข Prove ๐ฅ๐ฅ/2 /2 = ๐ฅ๐ฅ/4 for all real number ๐ฅ๐ฅ
โข Let ๐ฅ๐ฅ = 4๐๐ + ๐๐, where 0 โค ๐๐ < 4โข if ๐๐ = 0 โ ๐๐ = ๐๐, trueโข if 0 < ๐๐ โค 2, then ๐ฅ๐ฅ/2 = 2๐๐ + 1, ๐๐ + 1/2 = ๐๐ + 1โข if 2 < ๐๐ < 4, then ๐ฅ๐ฅ/2 = 2๐๐ + 2, ๐๐ + 1 = ๐๐ + 1โข Since we proved all cases, the proof is complete
2-4
Sequences and Summations
2-4 Ex.8
โข Find at least three different sequences beginning with the terms 3, 5, 7 whose terms are generated by a simple formula or rule.
โข 3, 5, 7, 9, 11, 13, โฆ .โข 3, 5, 7, 11, 13, 17, โฆ .โข Solve ๐ฆ๐ฆ = ๐ด๐ด๐ฅ๐ฅ3 + ๐ต๐ต๐ฅ๐ฅ2 + ๐ถ๐ถ๐ฅ๐ฅ + ๐ท๐ท where (1, 3),
(2, 5), (3, 7), (4, ๐๐) have been plugged in for ๐ฅ๐ฅand ๐ฆ๐ฆ.
2-4 Ex.10
โข For each of these lists of integers, provide a simple formula or rule that generates the terms of an integer sequence that begins with the given list. Assuming that your formula or rule is correct, determine the next three terms of the sequence.โ a) 3, 6, 11, 18, 27, 38, 51, 66, 83, 102, โฆโ d) 1, 2, 2, 2, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, โฆโ e) 0, 2, 8, 26, 80, 242, 728, 2186, 6560, 19682, โฆ
โข ๐๐2 + 2; 123, 146, 171โข for different value ๐๐, ๐๐๐๐ = ๐๐๐๐โ2 + ๐๐๐๐โ1; 8, 8, 8โข ๐๐3 โ 1; 59048, 177146, 531440
2-4 Ex.32
โข Determine whether each of these sets is countable or uncountable. For those that are countable, exhibit a one-to-one correspondence between the set of natural numbers and that set.โ a) the integers greater than 10โ d) integers that are multiples of 10
โข This set is countable; in general ๐๐ โ (๐๐ + 10).โข This set is countable; 1 โ 0, 2 โ 10, 3 โ โ10, 4 โ
20, 5 โ โ20, 6 โ 30, and so on.