December whispers of treachery
seen from United States
seen from Australia
seen from Hong Kong SAR China
seen from Egypt
seen from Spain

seen from Germany
seen from Spain
seen from Italy

seen from India
seen from Switzerland

seen from United States
seen from China
seen from Bangladesh

seen from Japan

seen from United States

seen from Malaysia

seen from United States

seen from Malaysia
seen from France
seen from China
December whispers of treachery
Individual Tax Return Problem 5
Individual Tax Return Problem 5
Individual Tax Return Problem 5 in $110 only
Individual Tax Return Project (LO 2 & 3)
Tax return problem: Complete the individual tax return problem 5 on page Appendix C-7 in your textbook. This is an individual project instead of a group project. However, you are encouraged to discuss with your classmates. Make sure that you don’t simply copy the forms. You have to download the appropriate forms…
View On WordPress
IMO 1986 Question 5
Find all (if any) functions \( f \) taking the non-negative reals such that (a) \( f(y)f(xf(y)) = f(x + y) \) for all non-negative \( x, y \)
(b) \( f(2) = 0 \)
(c) \( f(x) \neq 0 \) for all \(0 \leq x < 2 \)
We know immediately \( f \)'s behaviour outside of \( [0, 2) \): let \( y = 2 \) then (a) says \( f(2 + x) = f(2) f(x f(2)) = 0 \cdot f(x \cdot 0) = 0 \). ie. \( f \) is the zero function above 2. Next I claim \( f(x) \geq \frac{2}{2 - x} \) for all \( x \in [0, 2) \). This time let \( y \leq 2 \) and \( x = 2 - y \) in (a): \( f( y)f((2-y)f(y)) = f(2) = 0 \). But \( f(y) \neq 0 \) so it must be the case that \( (2-y)f(y) \geq 2 \rightarrow f(y) \geq \frac{2}{2-y}\).
Luckily, it turns out \( f(y) \leq \frac{2}{2 - y} \) as well. We assume not for contradiction: \( \exists y \in [0, 2) : f(y) > \frac{2}{2 - y} \). Note that \(y \neq 0 \) since \( f(0) f(0 f(0)) = f(0 + 0) \rightarrow f(0) f(0) = f(0) \rightarrow f(0) = 1 = \frac{2}{2-0} \). Then given such an \( y \) we can find positive \( x < 2 \) such that \( x f(y) \geq 2 \) and yet \( x + y < 2 \). To see this let \( \alpha \) be such that \( f(y) = \alpha \frac{2}{2-y} \) and note that \( \alpha > 1 \). Then let \( x = \frac{2 - y}{\alpha} \) and we get: \( x \cdot f(y) = (\frac{2 - y}{\alpha}) (\frac{2}{2 - y} \alpha) = 2 \). Thus we have positive \( x, y \) s.t. \( 0 = f(y) f(x f(y)) = f(x+y) > 0 \). It remains to show that the function \(f(y) = \frac{2}{2-y} \) (on \( [0,2) \) and zero elsewhere), but this is a matter of algebra with requirement (a) and left as an exercise to the tireless reader. \( \blacksquare \)
Ruby continues to blow my mind!
In preparation for tomorrow's interview with App Academy (yes, it keeps getting postponed and I wish it could get over already!!), I've been working on problems from Project Euler today. I learned about Project Euler from morgtheborg. She is awesome + will be going to Dev Bootcamp in the summer and you should follow her.
Anyways. I was solving this problem...
Problem 5: 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?
Solution: While the problem is worded differently, they are technically asking you to find the "least common multiple" for the numbers 1 to 20. While I love Math & can solve this without any problem on paper, translating math to code has always been tricky for me. I wrote multiple lines of code trying to figure out how to solve this problem till I realized that Ruby has an "lcm" method that returns the least common multiple of two numbers. Several scratching-my-head moments later, I figured out how to solve this problem in a single line. Woot.
(1..20).inject(:lcm)
While lcm can be used only for two integers, using "inject" allows you to run lcm across a range of numbers. Ruby, you blow my mind!