CMSC 250 Quiz #10 KEY Monday, Nov. 12, 2001

  1. [10 pnts.] A computer programmer writes 500 lines of computer code in 16 days. Must there have been at least one day when the programmer wrote 30 or more lines of code? Why
    answer:
    Size of the Domain = 500. (number of lines)
    Size of the Co-Domain = 16. (which day)
    if $n(Domain) > k \cdot n(Co-domain)$ then $\exists$ a day with k+1 lines.
    if $500 > 29 \cdot 16$ then $\exists$ a day with 30 lines (or more) written.
    or alternate answer:
    k = number of days 30 or over lines were written (long days)
    29(16-k) = number of lines written on the short days
    464 - 29k = number of lines written on the short days
    $464 - 29k \geq 500$
    $29k \geq 36$
    $k \geq 1.26$
    Therefore there must have been at least 1 day when 30 or more lines of code were written.


    Grading:
    5 points for knowing to apply the pigeonhole principle (in either form).
    5 points for the algebra and proof.


  2. [10 pnts.] Use the fact that $log_bc = \frac{1}{d}$ to simplify the expression as far as possible.

    \begin{displaymath}
a^{log_b(c^d)}
\end{displaymath}

    answer:
    $a^{log_b(c^d)}$
    $= a^{d\cdot log_bc}$
    $= a^{d \cdot \frac{1}{d}}$
    $= a$


    Grading:
    3 points for knowing how to bring the power to the front.
    3 points for substituting the fraction value for the log.
    2 points for the integer times 1 over the integer = 1.
    2 point for the flow/logic.


  3. [10 pnts.] Prove or give a counter example. If $f:X\rightarrow Y$ and $g:Y\rightarrow Z$ are functions and $g \compose f: X \rightarrow Z$ is onto, must both $f$ and $g$ be onto? answer:
    This statement is false.
    Assume $X = \{x_1\}$, $Y= \{y_1,y_2\}$ and $Z = \{z_1\}$.
    Let $ f = \{(x_1,y_1)\} $ and $ g = \{(y_1,z_1),(y_2,z_2)\}$.
    This would make $g \compose f = \{(x_1,z_1)\}.$
    By this definition $g \compose f$ is onto.
    While $f$ is not onto (since $y_2$ is a member of $Y$, but there is no element in $X$ that $f$ maps to $y_2$).
    Grading:
    4 points for stating that it is false.
    6 points for the counter example.

About this document ...

This document was generated using the LaTeX2HTML translator Version 99.1 release (March 30, 1999)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -show_section_numbers -split 0 -no_navigation -no_footnode quiz10ans

The translation was initiated by Deep Saraf on 2001-11-14


Deep Saraf
2001-11-14