User:Spblat/Sandbox

$$f = $$# of floors

$$r = $$# of residential floors

Express $$r$$ in terms of $$f$$

Assumptions:
 * All available jobs ($$j$$) in shops are filled.
 * All residential floors are filled with bitizens ($$b$$).
 * If $$r$$, when expressed in terms of $$f$$, comes out as a non-integer, round $$r$$ up after the calculation.

From these assumptions we have $$j = b$$

Here's what we know from playing the game:


 * Each residential floor houses up to 5 bitizens. $$b = 5r$$
 * Each shopping floor provides jobs for up to 3 bitizens. $$j = 3s$$

Logically we know that $$s = f - r$$.

Put it all together, substituting as necessary so everything is expressed in terms of $$r$$ and $$f$$, then solve for $$r$$!

$$j = 3s$$ (There are three jobs per shopping floor)

$$j = 3(f-r)$$ (Because $$s = f - r$$)

$$b = 3(f-r)$$ (Because $$j = b$$)

$$5r = 3(f-r)$$ (Because $$b = 5r$$)

Now we have an expression that's limited to the relationship between $$r$$ and $$f$$. Solve for $$r$$ using eighth grade algebra.

$$5r = 3f - 3r$$

$$8r = 3f$$

$$r = \frac{3}{8}f$$ (⅜)

So if your Tiny Tower has $$f$$ floors, you'll want three eighths that number to be residential floors, or at least 38% of them.

I went through all this not because I'm a geek (although I admit as much), I did it to remind my kids that there are all sorts of interesting questions in life that you need to think though in order to solve definitively. And you need the right intellectual skills to do it.

$$\frac{\sin a}{4}=0.5$$

$$r=\frac{d}{b} \times 1000$$

$$d=\frac{h}{\sin 20^\circ}$$

$$r=\frac{h}{b} \times \frac{1000}{\sin 20^\circ}$$

$$r=\frac{h}{b} \times 342$$

$$1990 \times \frac{175}{483} = 721$$

When I rent a car, how many miles I must drive per day to justify the added cost of choosing a Toyota Prius considering the $6 per day extra rental cost, the hybrid's fuel economy and the cost of gas?

let $$c\!$$ = the cost of gas for a given distance of travel (in dollars).

let $$p_1\!$$ = the mileage of a conventional car (in miles per gallon).

let $$p_2\!$$ = the mileage of the prius (in miles per gallon).

let $$d\!$$ = the distance travelled in one day (in miles).

let $$v\!$$ = the cost of gas (in dollars per gallon).

let $$x\!$$ = the daily extra rental cost of a Prius over a conventional car (in dollars).

Now let's figure out the relationship between all these numbers and units.

$$$ = \frac{$}{gallons} \times \frac{gallons}{mile} \times miles$$

So we can show the relationship between all our variables.

$$c = v \times \frac{1}{p} \times d$$

which simplifies to

$$c = \frac{vd}{p}$$

Finding the break-even driving distance (of rental fees plus fuel cost) means calculating $$c\!$$ for the conventional car, $$c\!$$ for the Prius (plus $$x\!$$, the additional Prius rental cost), creating an equation making them equal and solving for $$d\!$$. Here we go!

$$\frac{vd}{p_1} = \frac{vd}{p_2} + x$$

Solving for $$d$$ requires a little bit of high-school algebra.

$${p_2}vd = {p_1}vd + {p_1}{p_2}x\!$$

or

$${p_2}vd - {p_1}vd = {p_1}{p_2}x\!$$

and

$$vd(p_2 - p_1) = {p_1}{p_2}x\!$$

finally:

$$d = \frac{{p_1}{p_2}x}{v(p_2 - p_1)}$$

I rented a Prius today and got 45 MPG with it. The rental cost me $6 more than the car I would have otherwise selected, which would probably got me 15 MPG. Today's gas price was $3.89. Was it worth it?

$$d = \frac{15 \times 45 \times 6}{$3.89 \times (45 - 15)} = \frac{4050}{116.7} = 35 miles$$

I would have had to drive 35 miles today for the Prius upgrade to make financial sense. I drive 60, so my smug emissions are completely justified.