# Final_Exam

Document Sample

```					                                ArsDigita University

Month 2: Discrete Mathematics - Professor Shai Simonson

Final Examination – 100 points

Show all work for partial credit. You may use three hours for this exam. After two
hours, raise your hand if you feel that the time constraint will be too tight.

Name: ______________________________________________________________

1.         /25

2.         /20

3.         /20

4.         /20

5.         /15

Total:              /100
1. Pyramid Numbers (25 points)

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.

a. Write a recurrence equation for the pyramid numbers.

b. Solve this equation and get a closed form for P(n).

c. 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).

d. Write down a generating function in closed form for the pyramid numbers.
2. Euclid and Friends? (20 points)

a. You have two containers, one of size 45 and one of size 19. Calculate two distinct
integer linear combinations of these two containers whose sum equals 1.

b. Prove that the sum of any three consecutive cubes is divisible by 9.
3. Circuits, Logic and Boolean Algebra (20 points)

A full-adder has three binary inputs (in1, in2 and carry_in) and two binary outputs
(sum and carry_out), whose values represent the two-bit sum of the three binary inputs. For
example, if in1, in2 and carry_in are 1, 1 and 0 respectively, then sum and carry_out would
be 0 and 1 respectively.

a. Draw a truth table for the full-adder.

b. Write CNF and DNF formulae for each binary output.

c. Draw a circuit for sum and carry_out.
4. Proofs and Counting (20 points)

a. Prove using any method that C(n,k) = (n/k)C(n-1, k-1).= (n/(n-k)) C(n-1, k).

b. A computer password is 6-8 characters long. Each character must be a digit,
an uppercase letter, or a lowercase letter. Each password must contain at least
one digit, one uppercase letter and one lowercase letter. How many
5. War and Disease (15 points)

a. 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.

b. 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?

c. 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.

```
DOCUMENT INFO
Shared By:
Categories:
Stats:
 views: 69 posted: 10/5/2010 language: English pages: 6
How are you planning on using Docstoc?