Chapter 3: Problem 4
Prove that an integer \(n\) is even if and only if its last decimal digit is even.
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.
/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none}
Learning Materials
Features
Discover
Chapter 3: Problem 4
Prove that an integer \(n\) is even if and only if its last decimal digit is even.
These are the key concepts you need to understand to accurately answer the question.
All the tools & learning materials you need for study success - in one app.
Get started for free
Find the greatest common divisor of 4905 and \(32445 .\)
Show that if \(a \mid b\) and \(c \mid d\), then \(a c \mid b d\).
Let \(m \geq 1\). Prove that an integer \(n\) is divisible by \(5^{m}\) if and only if the integer \(k\) consisting of its last \(m\) decimal digits is divisible by \(5^{m}\). Note that \(k=n \bmod 10^{m}\).
In this exercise, we show that one can multiply two \(k\)-bit binary numbers \(A\) and \(B\) faster than in \(\mathrm{O}\left(k^{2}\right)\) steps when \(k\) is large. Make \(k\) even by prepending a 0 bit, if necessary. We may have to remove two or three leading 0 bits from the product at the end. Write the numbers in base \(b=2^{k / 2}\) as \(A=A_{1} b+A_{0}\) and \(B=B_{1} b+B_{0}\). Prove that $$ A B=\left(b^{2}+b\right) A_{1} B_{1}+b\left(A_{1}-A_{0}\right)\left(B_{0}-B_{1}\right)+(b+1) A_{0} B_{0} . $$ This formula shows that the product \(A B\) of two \(k\)-bit numbers can be formed by multiplying the three \(k / 2\)-bit numbers \(\left(A_{1}-A_{0}\right)\left(B_{0}-B_{1}\right)\), \(A_{1} B_{1}\) and \(A_{0} B_{0}\), together with simple shifting and adding operations. Note that one can multiply a binary number by \(b\) or \(b^{2}\) by shifting the bits by \(k / 2\) or \(k\) positions. This simple trick can be used recursively. Let \(T(k)\) denote the time needed to multiply two \(k\)-bit binary numbers. The formula shows that \(T(k) \leq 3 T(k / 2)+c k\), for some constant \(c\). Show that this inequality implies that \(T\left(2^{i}\right) \leq c\left(3^{i}-2^{i}\right)\), for \(i \geq 1\). Deduce from this that \(T(k) \leq 3 c \cdot 3^{\log _{2} k}=3 c k^{\log _{2} 3}\). Since \(\log _{2} 3 \approx\) \(1.585<2\), this method, which is called Karatsuba multiplication, is faster theoretically than conventional multiplication when \(k\) exceeds a threshold. In practice, when multiplying large numbers with the same length, one uses the formula recursively down to the threshold.
Prove that an integer \(n\) is divisible by 5 if and only if its last decimal digit is divisible by 5 .
What do you think about this solution?
We value your feedback to improve our textbook solutions.