07Ma6aSol6

# 07Ma6aSol6 - Math 6a Solution Set 6 Problem 1 Write a...

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

Math 6a - Solution Set 6 Problem # 1 Write a paragraph on dominance in graphs, fire fighting, and the spread of computer viruses, with reference to the work of Hartnell. Write a paragraph on what binary search trees have to do with port security, with reference to the work of anyone at Rutgers University. Solution. Note that this is not a ”question,” but rather, a writing assignment, and thus it does not have a ”solution.” Problem # 2 If you have 25 droids arranged on a 5 × 5 grid, show how each droid can move exactly one space forward, back, left or right (no diagonal moves allowed and no droid can remain stationary), or show it cannot be done. Solution. Label the rows and columns of the grid with elements from the set { 1 , 2 , 3 , 4 , 5 } and then label the square in row i and column j with ( i, j ) and color the square ( i, j ) black if i + j is even and color it white if i + j is odd. Then, note that a droid on square ( i, j ) can move to square ( i 0 , j 0 ) if and only if either the move is horizontal, so i = i 0 and | j - j 0 | = 1 , in which case | i - i 0 + j - j 0 | = 1 , or the move is vertical, j = j 0 and | i - i 0 | = 1 in which case we also have | i - i 0 + j - j 0 | = 1 . Thus, if a given droid moves from ( i, j ) to ( j, j 0 ) then 1 = | i - i 0 + j - j 0 | = | ( i + j ) - ( i 0 + j 0 ) | and it follows that the sums i + j and i 0 + j 0 differ by 1 which means that i + j is even and ( i, j ) is black if and only if i 0 + j 0 is odd and ( i, j ) is white. Thus, droids on black squares can only move to white squares and droids from white squares can only move to black squares. But note that in rows 1 , 3 , and 5 there are 3 black squares and in rows 2 and 4 there are 2 black squares, and thus there are a total 9 + 4 = 13 black squares, and thus 25 - 13 = 12 white squares. So, if each of the droids moves, that means the 13 droids on black squares much each move to one of 12 whites squares, which implies, by the pigeonhole principle that two such droids must move to the same square, an impossibility, since each droid must move to a unique square. Thus, this cannot be done. Problem # 3 1

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

View Full Document
2 Fix m 1 According to Liu, page 138, every regular m -ary tree of length h has a number t of leaves, where m + ( m - 1)( h - 1) t m h .
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern