Inverting an Equation with Floor Operations

CharlesVentin

New member
Joined
Sep 20, 2015
Messages
1
[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]Aman is paid in coins [/FONT][FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]c [/FONT][FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]startingon day [/FONT][FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]d[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]=0. At the end of every week, he is paid 5 coins. Additionally, everytenth day, he is paid one coin for every tenth day since d = 0.[/FONT]
[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]Theman wants to use these coins to buy as many bricks as he can so thathe can build a house. Bricks cost 25 coins each. The man cannot gointo debt to buy these bricks, so as soon as he has enough coins tobuy at leas one brick, he buys as many bricks as he can with hiscurrent reserve of coins. On what day will he first purchase morethan one brick?[/FONT]

[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]Obviously,the man gets paid 5 coins at the end of every week, so:[/FONT]
[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]$$[/FONT]
[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]c=5\lfloor\frac{d}{7}\rfloor[/FONT]
[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]$$[/FONT]
[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]Sinceevery tenth day he's paid one coin for every ten days he's beengetting paid, we need to add the sum of all integers from $i=1$ to$i=\frac{d}{10}$. Thus:[/FONT]
[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]$$[/FONT]
[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]c=5\lfloor\frac{d}{7}\rfloor +\frac{\lfloor\frac{d}{10}\rfloor(\lfloor\frac{d}{10}\rfloor+1)}{2}[/FONT]
[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]$$[/FONT]
[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]Then,the first equation is just cleanup:[/FONT]
[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]$$[/FONT]
[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]c=\left\lfloor\frac{10\lfloor\frac{d}{7}\rfloor+ \lfloor\frac{d}{10}\rfloor(\lfloor\frac{d}{10 }\rfloor+1)}{2}\right\rfloor[/FONT]
[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]$$[/FONT]
[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]Nowcomes the first hard part: finding the inverse equation. If I dropall the floors, I can just use the Quadratic Equation and add a floorback in in theend:[/FONT]
[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]$$[/FONT]
[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]d=\left\lfloor\frac{\sqrt{1070^2+4*7*1400c}-1070}{14}\right\rfloor[/FONT]
[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]$$[/FONT]
[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]Theproblem is, for many values $c$, $d$ is not an integer, though theman is paid in coins, on days, both which are to be considered usingonly natural numbers. So if I input $c$ into the inverse equation,the output needs to be the lowest possible value of $d$ such thatpassing that value $d$ into the original equation produces the leastpossible value $c$ that is at least the value $c$ that was firstpassed into the inverse equation. I have noticed that this only works for values of $c$ that are multiples of both $7$ and $10$. How can I make the inverse equation more precise?[/FONT]
 
Top