Math 424

For homeworks, you are encouraged to write a program to assist you for any problem. If you do, make sure to submit any relevant code, or explain the code if you wrote it for an earlier homework assignment.

  • HW due 9/11:
    • A. Suppose \( x, y\) are two positive integers each having \(n\) digits. Show that \(x + y\) has either \(n\) or \(n+1\) digits.
    • B. Suppose \(x, y\) are two positive integers, \(x\) having \(m\) digits and \(y\) having \(n\) digits. How many digits can the product \(xy\) have? Prove your answer.
    • C. The symbol \(\lfloor x \rfloor\) means to round \(x\) down to the nearest integer. Suppose you just want to round \(x\) in the usual way (so 1.5 becomes 2). How could you do this using only \(\lfloor, \rfloor\)? That is, can you come up with a formula using \(\lfloor, \rfloor\) that accomplishes usual rounding? Give an informal explanation for why your formula works.
    • D. A password consists of \(n\) lowercase letters. A hacker tries to guess the password by testing random strings of \(n\) letters until they find the correct password. Suppose it takes time \(T\) for this attack to work on average. How much time would it take if we used \(n+1\) letters instead? Prove your answer.