Solutions

1.Supposeastringofnbitsissentacrossalossylink.Inhowmanywayscan2
biterrorsoccur?Whenn=3,listthepossiblesetofbiterrorpatterns.
Solution
We’repicking2itemsfromasetofnitemsandwedon’tcareabouttheorder,so
𝑛
thereare
combinations.
2
Whenn=3,thereare
3
=3errorpatterns.Thesetofpatternsis:
2
110
011
101
2.Howmany3digitnumberscanyoumakeusingthedigits1,2and3without
repetition?Howmany2digitnumberscanyoumakeusingthedigits1,2,3and
4withoutrepetition?
Solution
Pick the first digit in the number from 1, 2 or 3. Pick second digit from the
remainingtwo,pickthirddigitfromremainingone.Sobyproductrulethereare
3x2x1=6possible3digitnumbers.
Insecondcase,pickfirstdigitfromavailable4,picksecondfromavailable3.So
thereare4x3=12possible2digitnumbers
3. From a group of 8 professors and 9 students and admissions committee
consistingof5professorsand3studentsistobeformed.Howmanydifferent
committeesarepossible?
Solution
8
Wecanpick5professorsfrom8in
differentways.Wecanpick3students
5
9
from9in
differentways.Usingtheproductrule,thenumberofcommittees
3
8 9
possibleis
.
5 3
4.Howmanywayscan12peoplebeseatedinarowif:
(i)
(ii)
(iii)
Therearenorestrictionsontheseatingarrangement?
TwoofthepeopleAandBrefusetosittogether?
TwoofthepeopleAandBmustsittogether?
Solution
(i)
(ii)
(iii)
Pick first person from 12, second person from remaining 11, third
from remaining 10 and so on. Using the product rule there are 12!
permutations.
SupposepersonAsitsinseat1.ThenpersonBmustsitinoneofseats
3 to 12. So there are 10 different seats for B. The remaining 10
people can sit in 10! different permutations. Using the product rule
thereare10x10!differentarrangementswhenAsitsinseat1.When
A sits in seat 2 then B can can sit in seats 4 to 12 i.e. 9 different
positions.SimilarlywhenAsitsinseats3to11.WhenAsitsinseat12,
Bcansitinseats1through10i.e.10differentpositions.Sothereare
2x10x10!+10x9x10!arrangementsintotal.
SupposepersonAsitsinseat1.ThenpersonBmustsitinseat2and
the remaining people can sit in 10! different permutations. Suppose
personAsitsinseat2.ThenpersonBcansitinseats1or3.Sothere
are2x10!differentarrangements.Similarlyforseats3throughto11.
Whenpersonsitsinseat12thenpersonBmustsitinseat11,sothere
are 10! arrangements. In total there are 10!+2x10!x10+10!
arrangementsi.e.22x10!
5. Consider an array x of integers with k elements, where each element has a
distinct integer value between 1 and n inclusive and the array is sorted in
increasingorderi.e.x[1]<x[2]<x[3]….Whenk=2howmanysuchsortedarrays
arepossible?
Solution
Pickthefirstelementfromtheset{1,2,…,n-1}(itonlygoesupton-1becausewe
needtoallowatleastonelargervalueforthesecondelement.Selectthesecond
elementfromtheset{x[1]+1,…,n}.Sincex[1]<nweknowthatthereisatleast
oneelementinthisset.Sotherearen-x[1]waystoselectthesecondelement.
Sototalnumberofarraysis !!!
!!! (𝑛 − 𝑖).