MIT6_042JS10_lec26_sol

# MIT6_042JS10_lec26_sol - Massachusetts Institute of...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Massachusetts Institute of Technology 6.042J/18.062J, Spring ’10 : Mathematics for Computer Science April 9 Prof. Albert R. Meyer revised April 10, 2010, 731 minutes Solutions to In-Class Problems Week 9, Fri. Problem 1. A license plate consists of either: • 3 letters followed by 3 digits (standard plate) • 5 letters (vanity plate) • 2 characters – letters or numbers (big shot plate) Let L be the set of all possible license plates. (a) Express L in terms of A = { A,B,C,...,Z } D = { , 1 , 2 ,..., 9 } using unions ( ∪ ) and set products ( × ). Solution. L = ( A 3 × D 3 ) ∪ A 5 ∪ ( A ∪ D ) 2 (b) Compute | L | , the number of different license plates, using the sum and product rules. Solution. × D 3 ) ∪ A 5 ( A 3 × D 3 ) ( A 3 ∪ ( A ∪ D ) 2 A 5 | L | = = Sum Rule ( A ∪ D ) 2 + + = | A | 3 · | D | 3 + | A | 5 + | A ∪ D | 2 Product Rule = | A | 3 · | D | 3 + | A | 5 + ( | A | + | D | ) 2 Sum Rule = 26 3 10 3 + 26 5 + 36 2 = 29458672 · Creative Commons 2010, Prof. Albert R. Meyer . 2 Solutions to In-Class Problems Week 9, Fri. Problem 2. An n-vertex numbered tree is a tree whose vertex set is { 1 , 2 ,...,n } for some n > 2 . We define the code of the numbered tree to be a sequence of n − 2 integers from 1 to n obtained by the following recursive process: If there are more than two vertices left, write down the father of the largest leaf a , delete this leaf , and continue this process on the resulting smaller tree. If there are only two vertices left, then stop —the code is complete....
View Full Document

{[ snackBarMessage ]}

### Page1 / 5

MIT6_042JS10_lec26_sol - Massachusetts Institute of...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online