 # Math - Algebra 101 - Challenge

In this lecture we looked at how to convert a design problem into an algebraic expression and then manipulate it in order to solve for different values.

For your challenge, our designer wants to make our fuel to last for 120 seconds.
To do this, we can adjust the maxFuel and/or burnRate.

You task is to rearrange our equation and solve for maxFuel [m] and burnRate [b].

currentFuel [c] = maxFuel [m] - (burnRate [b] * time [t])

Pop your answer below and remember to use the spoiler tags.

With burnRate of 2 then maxFuel needed would be 240
With maxFuel of 100 burnRate needed would be 5/6 or .83333

1 Like

m = bt + c
m = b120 + 0
m = 120b

b = m - c / t
b = m - 0 / 120
b = m / 120

1 Like

float maxFuel = 100;
float currentFuel = 0;
float time = 120;
float burnRate;

burnRate = (maxFuel - currentFuel) / time;

burnRate = 0.8333333;

OR

float maxFuel;
float currentFuel = 0;
float time = 120;
float burnRate = 2;

maxFuel = -burnRate * -time + currentFuel;

maxFuel = 240;

1 Like

c = m - (b * t)
m = (b * t) - c
(b * t) = m - c
b = (m-c) / t

for t = 120 and c = 0

if m is still 100
b = (100-0) / 120
b = 100 / 120
b = 5/6 = 0.8333…

if b is still 2
m = (2 * 120) - 0
m = 2 * 120
m = 240

1 Like

For the current problem I was able to rework the equations to be:

m = bt + c

and

b = (c-m) / -t

For fun: b = .833 and m = 240

1 Like

Here’s how I calculated it:

time elapsed = (max fuel - current fuel) / burn rate

To calculate the max fuel needed:

120 = (max_fuel - 0) / 2
120 = max_fuel / 2
max_fuel / 2 * 2 = 120 * 2
max_fuel = 120 * 2
max_fuel = 240

To calculate the burn rate needed:

120 = (100 - 0) / burn_rate
120 * burn_rate = 100 / burn_rate * burn_rate
(120 * burn_rate) = 100
(120 * burn_rate) / 120 = 100 /120
burn_rate = 0.83333

I expanded the names of the variables for clarity.

1 Like

So, rearranging the equation gave me:

m = (b * t) + c, or Max fuel = (burn rate multiplied by time) plus current fuel

and

b = (m - c) / t, or Burn rate = (max fuel minus current fuel) / time

So, a burn rate of 1 unit per second and a max fuel of 120 units would yield 120 seconds before the player ran out of fuel. Any scaled version of this would work too.

If the designers insisted that the max fuel be 100 units, then the burn rate would be 5/6 units per second, or ~0.833.

1 Like

Here’s my take on the challenge. I hope I didn’t make a mistake 3 Likes

c=m −(b ∗t)

m=c+(b∗t)

c=m−(b∗t)

c−m=−bt
(c−m)/t=−b

b=−(c−m)/t

m=c+(b∗t)
m=0+(2∗120)
m=240

b=−(c−m)/t
b=−(0−100)/120
b= 0.8333

1 Like

Either maxFuel is 240 or burnRate is 5/6 (0.833333)

1 Like

I hope to to be in the right way, this is my solution

i assume that burnRate(b) = 2, time (t) = 120 and currentFuel© = 0, so my implementation is

m = c + (b * t)
m = 0 + (2 * 120)
m = 240

b = c - m / -t
b = 0 - 240 / -120
b = -240 / -120
b = 2

c = m – (b*t)

0 = m – (120b)

c = m – (b*t)

c = m – bt

+bt +bt

c +bt = m

m = bt + 0

m = bt

m = 120b

100 = 120b

100/120 = 120b/120

.8333 = b

b = .8333

m = 120b

m = 120(.8333)

m = 100

The furmola to find the maximum fuel is:

m = c + b*t
So if c = 0, t = 120 and b = 2 we get
0 = m - (bt) => 0 = m - 240 => m = 240

The The furmola to find the burn rate fuel is:

b = (c-m) / t
So for c = 0 t = 120 and m = 100
0 = 100 - (b * 120) => 0 - 100 = -120b => b = -100 / -120 => b = 0.833

With the formula for the maximum fuel being m = c + b*t m = 240

With the formula for b being b = (c-m) / -t b = 8.33333 approximately

1 Like

For maxfuel (m)…
c = m - (b * t), subtract m from both sides
c - m = -1 (b * t), do what’s in parenthesis and multiply by the variable to get
c - m = -bt, move the c over to the right of the equals by dividing both sides by c leaving
-m = -bt / c -> final answer

for burnrate (b)…
c = m - (b * t), do what’s in parenthesis first so
c = m - bt, get the b over to the left-side of the equals sign by dividing both sides by b leaving
© * c / b = (m - t) * c, next get the c on the right side of the equals sign by multiplying both sides by c leaving,
b = (m - t) * c -> final answer

Great work giving this challenge a go @anitconsultantllc.

For your first equation, you’ve made a small mistake when moving ‘c’ to the other side.
Rather than dividing both sides by `c`, you need to subtract instead.
This will leave you with `-m = -bt - c`. From there, you can multiply both sides by -1 to get `m = bt + c`.

For the second equation, it’s difficult to separate `b` straight away, like you’ve tried to do.
Doing so would leave you with `(c/b) = (m/b) - t`, which actually gets you slightly further away from the answer - Remember that you have to apply the division to everything on both sides.

For this one, it’s actually easier to strip everything else away from the right hand side and leave `b` alone.
Give this one another try and then check the solution below:

``````c = m - (b * t)
c - m = -bt        <- Subtract m from both sides
(c - m) / -t = b   <- Divide both sides by -t
b = (c - m) / -t   <- Swap the sides to tidy everything up
``````

Then, once you’ve got your two equations, try plugging in the numbers for our designer to see which numbers we could use for the `maxFuel` and `burnRate`.

I hope all of that makes sense but if you have any questions, please let me know.

Here is my answer:

( c = m - (b * t) ) - m
( c - m = -bt ) - c
( -m = -bt - c ) * -1
m = bt + c

m = 2 * 120 + 0
m = 240
Answer: You need to have 240 max fuel with a burn rate of 2 to be able to fly 120 seconds

c = m - (b * t)
( c = m - bt ) - m
( c - m = -bt ) / -t
b = (-c + m) / t

b = (0+100)/120
b = 10/12

Answer: You need to have a burn rate of around 0.833 with max fuel of 100 to be able to fly 120 seconds.

I hope these are right. Also, I have a question. To show what math action I use to the equation, I put brackets around the whole equation and then write the math action as you can see from my answer. In my opinion that looks a little messy so is there any clearer way to show it?

@Mikapo, your answers are spot on.

Rather than using parentheses to show the step you’re working on, you could just add a small comment to the side of each line.
Using the strikethrough to show variables being eliminated from one side is also an option. However, this doesn’t work with code formatting and tends to be a little harder to read.
Once you get used to reading calculation, you could even decide to just omit the details and assume the person reading will be able to follow along. You run the risk of obscuring any mistakes you may have made but it’s the easiest of the three to write.

To demonstrate these three approaches, here’s the first equation using each style.

Verbose comments:

``````    c = m - (b * t)
c - m = -(b * t)     <- Subtract 'm' from both sides
c - m = -bt          <- Expand the right side
-m = -bt - c      <- Add 'c' to both sides
m = bt + c       <- Multiply both sides by -1
``````

Strikethrough:
c = m - (b * t)
c - m = m - (b * t)
c - m = -(b * t)
c - m = -bt
c - m = -bt - c
-m = -bt - c
-1 * (-m) = -1 * (bt - c)
m = bt + c

Omitting Steps:

``````    c = m - (b * t)
c - m = -bt
-m = -bt - c
m = bt + c
``````

At the end of the day though, write in whichever style you think is the easiest to read (including options not mentioned here).
I tend to go with a blend of options 1 and 3 to keep things simple but adding verbose comments where things may seem a little unintuitive (like applying obscure math rules/tricks).

I hope that helps

HI there… Here’re my solutions:

for [m]
m = c + (b * t)
m = 0 + (2 * 120)
m = 0 + 240
m = 240

for [b]
b = -(c - m) / t
b = -(0 - 100) / 120
b = 100 / 120
b = 0,8333333333~

I hope that’s correct!

1 Like