CSC201 Assignment 1
CSC201 Assignment 1
You can submit ONLY TYPED soft copies (NOT handwritten) for submissions with the
SUBJECT exactly in the following format:
AssignmentSubm01-CSC201-Sec03-Summer20-{YourFullName}-{YourStudentID}
e.g. AssignmentSubm01-CSC201-Sec03-Summer20-Md.Shahjahan-1910517
All submissions must be TYPED and the front page should be labeled with all
necessary student information.
Submission Deadline: Three weeks prior to the Final Exam, Summer 2020
2. Prove using any method that C(n,k) = (n/k)*C(n-1, k-1) = (n/(n-k))*C(n-1, k).
3. Forty equally skilled teams play a tournament in which every team plays every other
team exactly once, and there are no ties.
3.1. How many different games were played?
3.2. How many different possible outcomes for these games are there?
3.3. How many different ways are there for each team to win a different number of
games?
6. You choose three cards in order from a set of cards numbered 1 to 10.
6.1. How many possible outcomes are there? Explain.
6.2. How many of these are in sorted order from highest to lowest. Explain.
8. How many ways are there to choose three different numbers each between one and a
hundred so that their sum is even? Explain.
9. If you have 2n socks in a drawer, n white and n black, and you reach in to choose 2
socks at random,
9.1. How many ways are there to choose?
9.2. How many of these ways result in getting a pair of the same color?
9.3. Write a simple closed formula in terms of n for the chance of choosing a
matching pair of socks from a drawer with n white and n black socks.
10. Emma’s pizza shop has 21 different toppings, three kinds of sauce, and three kinds of
cheese. Assume that someone can order any combination of sauces and cheeses
(including none), but must order exactly two different toppings.
10.1. How many different pizzas can one create? Explain.
10.2. If three people are sharing a pizza, and each can order their third as in 10.1, then
how many different pizzas can they order? Explain carefully.
12. Prove by induction that the sum of any six consecutive squares leaves a remainder of
seven when divided by 12.
13. Poker:
13.1. How many different 5-card Poker hands are there?
13.2. How many of these are 1 pair?
13.3. How many of these are a flush (all one suit)?
13.4. How many are a full house (3 of a kind and a pair)?
15. How many ways are there to distribute eight balls into six distinct boxes with at least one
ball in each box if:
15.1. The balls are identical?
15.2. The balls are distinct?
16. How many numbers between 7500 and 7800 are divisible by 5 but not divisible by 7?
Explain how you got your answer. Make a picture if necessary.
17. How many ways are there to distribute eight balls into six distinct boxes with at most four
balls in the first two boxes if:
17.1. The balls are identical?
17.2. The balls are distinct?
18. In the game War, two cards are chosen at random from a standard deck of cards, and if
they are the same rank (the ranks are in the set {2-10, J, Q, K, A}), there is a war. What
is the probability of a war? Explain.
20. Five of 60 computers have a virus. Ten are selected at random. What’s the chance that
none of the selected computers have the virus?
21. Given a deck of 52 cards, how many ways are there to choose a set of four cards in
order followed by one additional card? Three in order followed by two additional
unordered cards? Two? One?
22. Four soldiers each choose a card from a standard deck. The highest card must lead the
charge to the front of the battlefield. One of the soldiers chooses the 3 of diamonds and
that ends up being the highest card, and he’s off to the front. On his way the soldier
wonders, “what was the chance of the 3 of diamonds being the highest card?” (Assume
that the suits are ordered clubs, diamonds, hearts and spades, and the ranks are
ordered 2 through Ace). While he is busy ducking bullets, answer his question for him.
23. There’s a new screensaver that displays a random rectangular piece of an n by n
checkerboard.
23.1. How many rectangles are there in a checkerboard of size 1? 2? 3? 4?
23.2. How many squares are there in a checkerboard of size 1? 2? 3? 4?
23.3. Guess a general formula for the number of squares and rectangles. Put each in
closed form in terms of n.
23.4. Prove your formulas are true either by induction or using a combinatorial
argument.
23.5. What’s the chance that the rectangle displayed is a square? Give a simplified
closed form in terms of n.
23.6. Although the number of squares and rectangles increase without bound as n
increases, what happens to the ratio of squares to rectangles?
24. The Pyramid numbers are the number of balls in a triangular pyramid of height n.
P(0) = 0. P(1) =1. P(2) = 1+3 = 4. P(3) = 1+3+ 6 = 10.
Think of cannon balls in a pyramid pile. Write down the first 7 or 8 rows of Pascal’s
triangle, and use this to find a simple formula in terms of binomial coefficients for P(n).
27. A particular graph-matching algorithm on n nodes, works by doing n2 steps, and then
solving a new matching problem on a graph with one vertex less. Show that the number
of steps it takes to run the algorithm on a graph with n nodes is equal to the sum of the
first n perfect squares.