[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

How do I into math?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 14
Thread images: 1

File: divided by zero.jpg (91KB, 750x600px) Image search: [Google]
divided by zero.jpg
91KB, 750x600px
I didn't learn much about mathematics outside the required minimum to get through vocational school, but now I find myself needing to know how to put together a very specific kind of expression.

Let's say I have a kind of random number generator. This RNG's function is to manipulate the outcome of a separate calculation. The idea is to have the RNG add or subtract a single point (at random) per every 8 points that appear in this calculation. So for instance, if the calculation outputs 19 points, then the RNG is applied to that output twice, each time randomly adding or subtracting a single point. The RNG can be allowed to manipulate this outcome only up to a maximum possible of +8 or -8 points.

Is there an expression that could summarize this kind of formula, or is this something I just have to describe in verbose terms?
>>
>>8289096
take your number N, divide by 8. Then either round up or down depending on if you want the remainder to trigger the random point application. Whatever you do, you end up with a new number call it X as your answer.

Assuming you want to have equal chance of either randomly adding or subtracting, you then need to call a function that uses an actual RNG and set it up to return one of two values (depends on the program language you use), 1 or -1. Do this X number of times and sum the results, and add this sum to N.

You cant write an explicit formula for this, as it requires randomness. You can write a formula for the expectation value. Look into binomial distributions for a start.
>>
>>8289106

Thanks. That was very helpful.

>no explicit formula

I guess it's pretty much as I expected.
>>
>>8289161
There is undoubtably mathematical notation for random values and functions, but again, you wouldnt be able to solve it explicitly.

Most people just write the problem down in the form of a computer function.
>>
>>8289096
Take a modulo 8 of the input number
so x = 19 mod 8 = 2
this tells you the number of time the RNG will be applied.

create a variable to hold the number of points the RNG manipulated the value already and set it to zero
int changed = 0;

Then create a cycle
for (int i = 0 i < x; i++)
in which you get a random number between 0 and 100
int num = rand(0,100)

then simply if num > 50 add a point to the "changed" variable and if num <= 50 subtract a point from the changed variable but only do that if changed < 8 && changed > -8

in the end take the output and add the "changed" variable to that.

there is no way to describe this concretely and purely in math. It has to be a function
>>
division by 0 would do the opposite of a black hole
>>
>>8289832
We don't know that
>>
>>8289844
division by 0 is infinite
>>
>>8289846
Except we don't know that. In reality x/0 is undefined. we just decided based on some simple logic that it should be infinite. but in mathematical sense, it doesn't actually work.

take a look at this example
6 / 2 = x
this implies that
2 * x = 6
x = 3

that is simple but consider 0
6 / 0 = x
so in mathematics it also has to be true that
0 * x = 6
this has no solution as any number you multiply by 0 has to be 0, so how do you get 6?
is 0 * inf = 6 ?
if so, then why it also is true that 0 * inf = 7
because 7/0 = inf?

by this example you can see that we don't actualy know what division by 0 is or causes.
6 / 0 maybe as well equal "duck"
>>
>>8289814
19 mod 8 =2 ?
even that, if i do 16 mod 8, it means i'll apply RNG 0 time ? What ?
i didn't even bother reading the rest, you are retarded m8
>>
>>8289926
Oh yeah, fuck, sorry :d I was thinking about multiple things at one time and got that mix up. ofc you need to user integral divison or round down.
>>
>>8289973
i guess not "integral div" but "integer div" ? idk, not my language :D simply whole number divison!
>>
>>8289096
On the topic of "into math", just pick up some used textbooks on ebay and go through them cover to cover. start with basic shit (algebra) then intermediate (trig) then advanced (calc) and so on.
>>
>>8289096
So, are we past the "do my homework" posts to "do my job" posts? At least, I hope it's for something important, anon.

Also, I guess you should have payed more attention to those math classes back then...
Thread posts: 14
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.