cs1800 discrete structures fall 2017 lecture 16 … · discrete structures fall 2017 lecture 16 ......
TRANSCRIPT
CS1800 Discrete Structures
Fall 2017
Lecture 16 10/12/17
.
Last time Today Next time
⇒J . Finish set operations . Permutations &
. Set operations . Computer representations Combinations
of sets
. Basic rules
for counting
Pott
PC A) = set of all subsets of A
A={ d.is!) -P( A) = { %
,
tag,
I'bT,
{ c ),
@{ a .cl,
{ b. 4,
{ 9.b.cl )
IAI a b C
IPLAII = 2 Too ¢0 o I { cl
- O 10 { b )
P( 0 ) = { 0 )°
!1 { b. 4
1
|P( A) 1=21^4 1 I 1 { 9. b. c)101=0
1810 )/= 1
101011=210120--1
mail.IE#@*.r*it....x@Ax B = { ( x. y ) | XEA, yeB )
e. 9 . A= {
42,31B= { a. b )( lia ) =/ ( a. 1 )
AXB = { ( 1,
a ),
( 2. a ),
( 3,
a),
4. b ),
(21 b ),
13,
b ) )
( Bx A = { ( a. I ),
( a. 2),
- ( b,
} ) ) AXB # B×A
abii.MY#PiaPIAxBl=lHxlB11 2 3
AXBXC = { ( x. y.tl/xeA,yeB,
zct )
1 AxBxcl= IAIXIBIXKI
|Ai×AhxA, x. -×An/= IAIXIAHX . -× IAUI
( 9,92 , - -
,an ) - n - tuples
Representatimsofsets
U= { 1,2 , ),
- -
,10 ) 1 2 3 4 5 6 7 8 9 10
A = { 2,4 , 6,8/10 ) 0 I 0 I 0 I 0 I 0 I
B= { 112,3, 4,5 ) I I I 1 I 0 0 0 0 0
bitwiseoR→AUBl1ll1l#bitwise AND → ANB 0 I 0 I 0 0 0 0 0 0
bitwise XOR → ASB I 0 I 0 I I 0 I 0 1
bitwise Not → B- 0 0 0 0 0 I I I L I
iai÷E¥i's #
Sumruledproductrule. 8 parts
,6 shorts parts 01 shorts ⇒ 14=8+6
sillyexample . 8 parts ,
12 shirts parts AID shirts ⇒ 8×12=96
mmm
Product Rule : If A & B are finite sets,
then-
the number of ways to pick an element
from A andthen an element from B
is IAIXIBI = IAXBI
More generally .
- A,
,Aa
, - An → IAIXIAHX . -× IAN
Exaplesc4 - char passwords ,upper Hover case El digib A={ a ,b , -
t
A ,B , .-
Z,
0,1/2, -
- 9). how may ?
AXAXAXA
62×62×62×62=621 14,776,336
÷W : Jay Kevin Virgil⇒7 79 103
3- person. tee ) 407×79×103 = 3,311,759count
onestudent
persection
SumrwleifA and B are tent finite sets
,then the number
of ways of pocking an object from A of B B IAIHBI
Generally An An,
-
,An ace all mutually disjoint
then 1 A , U Aa - U Ant IA ,1HAs1t - +
ItPrinciple of Inclusion - Exclusion Student
2 sets A & B
, au , ,= ,µ+ , , , . ,an , ,|smg§!vein
WVH
} satin
@1 AUBUCI = IAITIBITICI
- IANBI - IAACI - IBNCI
+ IANDNCI
Exaiple : Passwords between 6 and 10 chars,
upperllwer case letters
or digits,
at least of digit and at least one letter
How many ? . pick length 6 I 7 I 8 I . .a 10
-
mutually disjoint → apply Lumru#fours on length 6 pass winds
.
all passant ,
all - illegal
" It,:L; "
in "#:* /
total :
(62aiotsi)-lb2±io±52⇒t--(Yo[Y?s_=