0
$\begingroup$

I'm trying to express the following statement using mathematical symbols:

The base time in seconds is the block's hardness multiplied by 1.5 if the player can harvest the block with the current tool, or 5 if the player cannot.

If I represent the base time as $B$, the hardness as $h$ and the optimal tool as $t^*$ then I can start the statement as:

$$B = h \cdot ()$$

However, that's where I get stuck. From a code standpoint, it's easy to express as:

if (t*)
    b = h * 1.5
else
    b = h * 5

I thought using the symbol for implication (I think) would work, but after further research, it reads as true or false, not conditional assignment. For example:

$$x = 2 \implies x^2 = 4$$

This statement evaluates to true because it is read as (I think):

$x$ is equal to $2$ if $x^2$ is equal to $4$.

Meanwhile $x^2 = 4 \implies x = 2$ evaluates to false because $x$ could be $-2$.


How can I translate this statement using mathematical symbols only?

Note: This is for recreational practice.

$\endgroup$
4
  • 1
    $\begingroup$ No. $x = 2 \implies x^2 = 4$ might be read as "$x^2 =4$ if $x=2$" or "$x =2$ only if $x^2=4$" $\endgroup$
    – Henry
    Sep 29, 2021 at 16:01
  • 3
    $\begingroup$ $T\to B=h\cdot5$ and $\lnot T\to B=h\cdot 1.5$. I understand this is just for your recreational understanding, but this isn't what mathematics is about, in my opinion. $\endgroup$ Sep 29, 2021 at 16:01
  • $\begingroup$ @DonThousand can you write that up in an answer for future readers and explain how and why that works? If not I can do the research for each symbol and try to do it justice. $\endgroup$ Sep 29, 2021 at 16:06
  • $\begingroup$ @Tacoタコス My point is, a future user should never learn from this thread, as this is not how one should do mathematics. $\endgroup$ Sep 29, 2021 at 16:49

2 Answers 2

3
$\begingroup$

I saw the comments on the origional question, and thought I would elaborate on one of the answers

$T$ is a boolean, and is either true or false. If $T$ is true, then $B = h\cdot 1.5$. This give us

$$T \rightarrow B=h\cdot 1.5$$

Or in other words, $T$ being true implies $B = h\cdot 1.5$. If $T$ is false, then $\lnot T$ is true, and $B = h\cdot 5$. This gives us

$$\lnot T \rightarrow B=h\cdot 5$$

Or in other words, $T$ being false implies $\lnot T$ is true, which imples that $B = h\cdot 5$.

$\endgroup$
1
$\begingroup$

Another way to do this would be to use the notation for piecewise functions; if we consider $B$ to be a function of the current tool $t$, and the optimal tool to be $t^*$, then we can write: $$ B(t)= \begin{cases} 1.5h, & t=t^* \\ 5h, & t\neq t^* \\ \end{cases} \ $$

$\endgroup$
1
  • $\begingroup$ I like this from the perspective of brevity! $\endgroup$ Sep 29, 2021 at 16:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .