-1
$\begingroup$

For every $n, m \in \mathbb{N}; n,m > 1$, construct a method to produce $\lfloor\frac{n}{2}\rfloor$ using n ms.

You can use: $$x+y$$ $$x-y$$ $$x*y$$ $$\frac{x}{y}$$ $$x^y$$ $$x\bmod y$$ $$\sqrt[k]{x} : k \in \mathbb{N}$$ $$x!$$

I can't think of anything else now off the top of my head, but you get the general gist.

NO TRIG FUNCTIONS.

Yes, I mean to write something which tells you how to write an equation to form n/2 with n m's, it doesn't matter what n is or m is, it MUST work!

$\endgroup$
  • $\begingroup$ When you say that it doesn't matter what n or m is, do you mean it must work for all m and n, or do you mean that the answerer is free to choose any convenient m and n? (E.g. I choose n=2 and any non-zero m, and we can get n/2 = m/m = 1.) $\endgroup$ – Lawrence Mar 1 '16 at 9:38
  • $\begingroup$ It's easy for even $n$. just do $m/m + m/m + ...$ until you have $n m$s. not sure about odd $n$. $n = 1$ probably is impossible $\endgroup$ – Ivo Beckers Mar 1 '16 at 9:44
  • $\begingroup$ @Lawrence Must work for all. $\endgroup$ – user3836103 Mar 1 '16 at 9:46
6
$\begingroup$

With the new rules, my m/m idea and Ivo Beckers' continuation:

For even $n$: $\frac{n}{2} = \frac{m}{m} + \frac{m}{m} + ...$.

For odd $n$: change the first term to $\frac{\sqrt{m}\sqrt{m}}{m}$.

$\endgroup$
  • $\begingroup$ @IvoBeckers probably the same reason I didn't think of extending the m/m idea :) . $\endgroup$ – Lawrence Mar 1 '16 at 10:04
3
$\begingroup$

This is easy

For even $n$ do $\frac m m + \frac m m + ...$ until you have $n m$s.

EDIT odd n is still incorrect, will fix it when i know a solution
For odd $n$ do $\frac {m+m} m + \frac m m + \frac m m + \frac m m ...$

$\endgroup$
  • $\begingroup$ +1, but this doesn't form 4 with 5 ms (see the OP's edited example). Probably a typo in the question. $\endgroup$ – Lawrence Mar 1 '16 at 9:55
  • $\begingroup$ @Lawrence yeah you're right. It's a bit unclear what the OP is asking I guess. $\endgroup$ – Ivo Beckers Mar 1 '16 at 9:57
  • $\begingroup$ Yeah, it should form 2 with 5ms. $\endgroup$ – user3836103 Mar 1 '16 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.