This preview shows pages 1–16. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 11COMP170 – Fall 2007Midterm 1 Review21Question 1nguests are arranged seats in a row facing the audiencea) How many different ways are there to seat the n guestsat n seats?22Question 1Note that the order is important since the guests could belisted from left to right from the audience’s perspectiven!nguests are arranged seats in a row facing the audiencea) How many different ways are there to seat the n guestsat n seats?23Question 1nguests are arranged seats in a row facing the audienceb) Letn >2. How many ways to seat n guests if twospecific guests will not sit next to each other?24Question 1nguests are arranged seats in a row facing the audienceb) Letn >2. How many ways to seat n guests if twospecific guests will not sit next to each other?# waysnot sitting together=n!# ways sitting together25Question 1nguests are arranged seats in a row facing the audienceb) Letn >2. How many ways to seat n guests if twospecific guests will not sit next to each other?# waysnot sitting together=n!# ways sitting togetherTreating the two people as one indivisible group, there are(n1)!different ways of seating the guests.Withinthe twoperson group, there are 2 ways to sit them.# ways sitting together =2(n1)!# waysnotsitting together =n!2(n1)!=(n2)(n1)!26Question 1nguests are arranged seats in a row facing the audiencec)n >10. Guests include 5 couples. For each couple,husband must sit with wife. How many seatings are there?27Question 1nguests are arranged seats in a row facing the audiencec)n >10. Guests include 5 couples. For each couple,husband must sit with wife. How many seatings are there?Treat each couple as an indivisible group, and others asindividual groups.There are(n5)!ways to seatn5groups.For each couple (group),there are 2 ways to seat husband and wife.# ways to seat guests =25(n5)!31Question 2Zn={, ..., n1}a) How many 5element subsets ofZ10contain at least oneelement inZ3?32Question 2# 5element sets ofZ10=(105)# 5element sets ofZ10notcontaining elements ofZ3=(75)# 5element sets ofZ10containingat least oneelement ofZ3Zn={, ..., n1}a) How many 5element subsets ofZ10contain at least oneelement inZ3?=1057533Question 2b) How many 5element subsets ofZ10contain two odd andthree even numbers?34Question 2b) How many 5element subsets ofZ10contain two odd andthree even numbers?Z10={,1,2,3,4,5,6,7,8,9}(52)ways to choose 2 numbers from{1,3,5,7,9}(53)ways to choose 3 numbers from{,2,4,6,8}By the product principle, we have(52)·(53)35Question 2c) Let n be positive and odd. Show that # of evensizedsubsets ofZnequals # of oddsized subsets ofZn36Question 2c) Let n be positive and odd. Show that # of evensizedsubsets ofZnequals # of oddsized subsets ofZnLetOn={1,3, .5, ..., n}Since(nk)=(nnk), we haveXk∈Onnk=Xk∈Onnnk=Xk∈EnnkEn={,2,4, ..., n1}f(k) =nkdefines a bijection betweenOnandEn37Question 2c) Let n be positive and odd. Show that # of evensizedsubsets ofZnequals # of oddsized subsets ofZnAlternatively:2n= (1 + 1)n=X≤i≤nni!...
View Full
Document
 Spring '10
 M.J.Golin
 Computer Science

Click to edit the document details