CS1050X Homework 9 Solutions
1.
If the graph is bipartite, then there are two sets of vertices A and B such that each vertex must be in
exactly one of them, and each edge must have one end in A and other in B. Now suppose for the sake of
contradiction th
CS1050X Homework 3 Solutions
1. A girlpessimal marriage is the one in which every girl is matched with a boy that is her
least favourite among her realm of possibilities.
Claim: TMA produces a girlpessimal marriage.
Proof : Let X be the stable marriage
CS1050X Homework 4 Solutions
1. Let B A be any 4element subset of A. If f is the sum of all the 4 elements in B , then
clearly, 1 + 2 + 3 + 4 = 10 f 194 = 47 + 48 + 49 + 50. Hence, f can take only 185 distinct
values (holes). However, there exist 1 0C4 =
CS1050X Homework 5 Solutions
Z
1. Let f = gcd(b, d) and g = gcd(a, b). Then we know that there exist x, y
such that
f = x b + y d = x b + y (a + bc) = (x + yc)b + y a. But we know that g is the smallest
positive integer that can be expressed as an intege
CS1050X Homework 6 Solutions
1. x1 + x2 + x3 = 14. There are 15 choices for x1 (0  14). For each of these, there are
15 x1 choices of x2 . Once x1 , x2 are xed, x3 is xed. Thus total number of solutions
14
= x1 =0 15 x1 = 120. If the constraint x1 1, x2
CS1050X Homework 7 Solutions
1. Question omitted.
2. (a) There are 123 ways of choosing the kind, and once that is chosen there is only one way
to choose four of that kind (you have to choose all of spades, diamonds, hearts, clubs of that
kind). Hence the
CS1050X Homework 9 Solutions
1. First property to observe that the tossing of red balls and blue balls is
indepedent.
(a)
2n
n
/
3n1
2n1
(b) Since each bin gets at least 1 ball, the case reduces to tossing 2n blue
balls in 2n bins: 4n1 / 6n1 .
2n1
4n1
2.
CS 2051: Honors Discrete Math
Homework 1
Due Tuesday, September 6, 2016
1. Prove that a graph is bipartite if and only if it does not have an odd cycle.
2. Give an instance of the stable marriage problem with n = 5, such that pairing each boy with
his lea
CS1050X Homework 1 Solutions
1. Here is an example:
Boys preferences:
1 (b c d e a)
2 (c d e a b)
3 (d e a b c)
4 (e a b c d)
5 (a b c d e)
Girls preferences:
a (1 2 3 4 5)
b (2 3 4 5 1)
c (3 4 5 1 2)
d (4 5 1 2 3)
e (5 1 2 3 4)
Check that following is a
r m t
Cshhfa ~
k
i3 ~
d g t fm t r k m fe d t v e p
iki)hnlnq3%h'ss9z'ilkfhm2lvf @[email protected]!'
f k v e p cfw_ t d gme t k k g cfw_ k
0hm'!33kfIiq!'wylni'yI%Ishtysi'ia8i%C39nizd
g v k d m p f r m e k fe t
Ihifik%i%hfq!'fhgTtilaXDiRqCsI3Iih'hhfaIhvf
CS1050X Homework 9 Solutions
1. First, note that P (B ) = 1 P (A), P (N A) = 1 P (Y A) and P (N B ) = 1 P (Y B ).
P (AY )
=
=
=
=
=
P (A Y )
P (Y )
P (Y A) P (A)
P (Y A) + P (Y B )
P (Y A) P (A)
P (Y A) P (A) + P (Y B ) P (B )
31
54
31
1
4 + 12
q%x[email protected]'9wx3od'op'ot'dopnii3!9q'nIxgjiq3opdgnIxoqDt
q f q p iu i i i s e d v h i i h u i s
dopni%q33e2%'xqI%kuix%Ioo'egtgn%xoji3'xjq3oof'[email protected]
i s h p d d lp f ipv i flp f iv p e
d f h d f d i pq
qIgjeexI23xIo9'opxnwrIie
h d p s h d e i
D ~ C w
w
@w
R h
vw
o g lkji
yy'nem'hge
e i l
yhrk'hge'gnmkI3%'hgei uwy y'y a f%rw
cfw_ ig
g
R cfw_w ~ w Rp
' R

w
tyRcfw_ty 8 y y Rpp
y
R
Rp
o
yyw
cfw_ cfw_ l l
wy 9yGcfw_ 9y%
[email protected]!'wCy%j'yhelenpphyyxewrhyimy2yws
jg lg d e e
h v m t r cfw_ hm hm fcfw_
'IxkIi3Ikvqshxkmhv'exelvDvkxa2xI'hqxq3pfGxkkxie9Iv%I%vv
f rv n f hj hj
vxlxexxxmxmk3I'g'[email protected]%
r f r nm f dm
ggsX'xp#xixmk'fl!x
f h h d m j hj r f r nm j dm
qxq3pfxxqx9%kcfw_khIs'vg%3mh#'kcfw_sxxxh)q'0'fk'gs'x2pixqx9%
r u s v x r vp o r s sur or
[email protected]!'vx'ygvdugxjygv3sI%v'yaqgr''[email protected]
sr s rp
qII3rgu3sw'xxqg
s s v s u s v r s v r u s x s r s
eyrgu' 'xrgus q3r'gtTeda @xsgpq3r%gtGdq2x'ygvdu%x#q3r0'gt)qr gv
rgr%gtIyrv2xq2%gsd'G%gt9gtgxu Ixqg9s u2%gtG3r'xu
s o v
CS 1050 H: Understanding and Constructing Proofs
Homework 6
Due Tuesday, March 10, 2009
1. How many solutions does the equation
x1 + x2 + x3 = 14
have, where x1 , x2 , x3 are nonnegative integers. In how many of these solutions is x1
1, x2 2, and x3 3?
kt nt i nft
[email protected]'apI
t k nl o rfe nft t k o r ke e k i ir nt n it n n
erptv%y'puqn'phIfImerptpumnIqtkrpt%mfmoDpe9G'a%pur03tI'pu!3t
nl nf o e t
@pe %9irr93niG%pun
e rf i t n o r tr t n o nl o e t
)rr'yI3t!%pu%mfe%vptrt I%2%pujfje %irr93niG%pu
yw cfw_X'm cfw_i cfw_
fk
3e%DyurDr3e3gmrp!'wIe mImikhIdvrpa2%iw'iwhIe 2%[email protected] 'mViwdgy
gt x r r x ne o tf f e fk re g gfe ne e e g gk g gf e e g e fk
r r gfe ne e e g gk g gf e e g e o ge r r x g gfe ne e e g gk g r r
pm3x3gIqvrpw%iw'iwcfw_Ie %iwpcfw_
CS 2051: Honors Discrete Math
Homework 2
Due Tuesday, September 13, 2016
1. Take a random instance of stable marriage problem with 4 boys and 4 girls and find all stable
marriages in it. Also give the realm of possibilities of all boys and girls. Indicate