Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4

Author Topic: A Math Challenge  (Read 3795 times)

Christes

  • Bay Watcher
    • View Profile
Re: A Math Challenge
« Reply #30 on: August 15, 2010, 11:28:00 pm »

Yep.  Just finished my first year.
Logged

Vector

  • Bay Watcher
    • View Profile
Re: A Math Challenge
« Reply #31 on: August 15, 2010, 11:59:09 pm »

Yep.  Just finished my first year.

Another lucky guess for the Vector-bot!  Which area?
Logged
"The question of the usefulness of poetry arises only in periods of its decline, while in periods of its flowering, no one doubts its total uselessness." - Boris Pasternak

nonbinary/genderfluid/genderqueer renegade mathematician and mafia subforum limpet. please avoid quoting me.

pronouns: prefer neutral ones, others are fine. height: 5'3".

Christes

  • Bay Watcher
    • View Profile
Re: A Math Challenge
« Reply #32 on: August 16, 2010, 01:11:49 am »

I assume you mean of math...

I haven't decided yet.  I'm liking Algebraic Topology, though.
Logged

Vector

  • Bay Watcher
    • View Profile
Re: A Math Challenge
« Reply #33 on: August 16, 2010, 01:15:46 am »

I assume you mean of math...

I haven't decided yet.  I'm liking Algebraic Topology, though.

Yes.  I'm not an internet-stalker unless you divulge too much personal information about yourself, in which case I'll inform you that you might want to make a few choice edits.

Erm, anyway.  I have almost no experience with that, but Albert's Theorem is pretty nice ._.  I'll, uh, say hi again in a couple years or something.
Logged
"The question of the usefulness of poetry arises only in periods of its decline, while in periods of its flowering, no one doubts its total uselessness." - Boris Pasternak

nonbinary/genderfluid/genderqueer renegade mathematician and mafia subforum limpet. please avoid quoting me.

pronouns: prefer neutral ones, others are fine. height: 5'3".

Muz

  • Bay Watcher
    • View Profile
Re: A Math Challenge
« Reply #34 on: August 17, 2010, 04:31:16 pm »

Um, IMO, that solution wasn't all that elegant. Not from a practical perspective... converting your dice into binary works, but it's too time consuming to be a good solution. I can't see a less complex solution out of it, though. Other than to just use digital dice.
Logged
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Vector

  • Bay Watcher
    • View Profile
Re: A Math Challenge
« Reply #35 on: August 17, 2010, 05:02:05 pm »

Um, IMO, that solution wasn't all that elegant. Not from a practical perspective... converting your dice into binary works, but it's too time consuming to be a good solution. I can't see a less complex solution out of it, though. Other than to just use digital dice.

Practicality?  Why cares about practicality, when you have binary?
Logged
"The question of the usefulness of poetry arises only in periods of its decline, while in periods of its flowering, no one doubts its total uselessness." - Boris Pasternak

nonbinary/genderfluid/genderqueer renegade mathematician and mafia subforum limpet. please avoid quoting me.

pronouns: prefer neutral ones, others are fine. height: 5'3".

Muz

  • Bay Watcher
    • View Profile
Re: A Math Challenge
« Reply #36 on: August 17, 2010, 06:08:51 pm »

I don't know if you've ever rolled a 10d6, but rolling a 10d6 with 4-sided dice would slow the game to a crawl every time someone casts a fireball :P
Logged
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Neonivek

  • Bay Watcher
    • View Profile
Re: A Math Challenge
« Reply #37 on: August 17, 2010, 07:18:55 pm »

Quote
Hint: If I roll two d6, the probablity of getting a 12 would be the lowest, but getting a score of 6 would be highest

Actually that is a poor hint if you want to do it properly. Scaling down is easier then scaling up

You see a d20 has only 20 possibilities and a d6 has 6

Two dice have 21 possibilities and so on. (1/1, 1/2, 1/3, 1/4, 1/5, 1/6, 2/2, 2/3, 2/4, 2/5, 2/6, 3/)

Eliminate 1/1 or 6/6 and then create your rolls based on the results

Here we will eliminate 6/6... That will be a reroll.

1/1 = 1
1/2 = 2
1/3 = 3
1/4 = 4
1/5 = 5
1/6 = 6
2/2 = 7
2/3 = 8
2/4 = 9
2/5 = 10
2/6 = 11
3/3 = 12
3/4 = 13
3/5 = 14
3/6 = 15
4/4 = 16
4/5 = 17
4/6 = 18
5/5 = 19
5/6 = 20
6/6 = Reroll

and so on. The order of the dice don't matter

I am not sure this works, something about my knowledge or probability says to me that all numbers in my example are not equal.

Now there is a type of math that does this easily but I forgot what it is called.

"How would you approach the problem of generating a range of any numbers from any die?"

Well with a dice that is lower then the dice you want the result with you want to make a combination of sets that can equal the sets of the larger dice.

The problem can come when you add more then two dice. I believe if I used three 6s... a 1/1/1 has less of a chance then 1/1/2. (Which is why I dislike probability).
« Last Edit: August 17, 2010, 07:25:53 pm by Neonivek »
Logged

ed boy

  • Bay Watcher
    • View Profile
Re: A Math Challenge
« Reply #38 on: August 17, 2010, 07:25:15 pm »

That wouldn't work properly. For example, there are two ways to get 2/3 (dice A is 2 and dice B is 3 or dice B is 2 and dice A is 3), but only one way to get 1/1.

You would need to tell the dice apart (by marking them or by rolling them one at a time) or have a random way of selecting the dice once they are rolled. This would give you 36 possibilities.
Logged

Neonivek

  • Bay Watcher
    • View Profile
Re: A Math Challenge
« Reply #39 on: August 17, 2010, 07:33:11 pm »

That wouldn't work properly. For example, there are two ways to get 2/3 (dice A is 2 and dice B is 3 or dice B is 2 and dice A is 3), but only one way to get 1/1.

You would need to tell the dice apart (by marking them or by rolling them one at a time) or have a random way of selecting the dice once they are rolled. This would give you 36 possibilities.

Yep because dice sets, now that I remember, have 2/3 and 3/2. Thanks.

HOWEVER! I am not beaten yet

1/1, or 6/6 = 1
1/2 = 2
1/3 = 3
1/4 = 4
1/5 = 5
1/6 = 6
2/2 = 7
2/3 = 8
2/4 = 9
2/5 = 10
2/6 = 11
3/3 = 12
3/4 = 13
3/5 = 14
3/6 = 15
4/4 = 16
4/5 = 17
4/6 = 18
5/5 = 19
5/6 = 20

Dang that doesn't work either because of 2/2, 3/3, 4/4, or 5/5. They just do split up or eliminate into the number. However between 1/1, 2/2, 3/3, 4/4, 5/5, 6/6 we get 6 or the equivilant of 3 different numbers.

Ignoring them and taking all the sets from 1-15.

Any combination of double numbers gets a special rule.

1/2 = 1
1/3 = 2
1/4 = 3
1/5 = 4
1/6 = 5
2/3 = 6
2/4 = 7
2/5 = 8
2/6 = 9
3/4 = 10
3/5 = 11
3/6 = 12
4/5 = 13
4/6 = 14
5/6 = 15

From here we get 5 numbers missing

Any combination that are doubles gets you ONE more roll of dice. a 6 is a reroll
1= 16
2= 17
3= 18
4= 19
5= 20

There we go!

no wait I don't I am braindead.

You could use the 36 combinations but I wanted to see if I could do it with only 2 rolls while ignoring the order. Apperantly not...

Either way we got the way to do it with d6s to get a d20. Not too tough if you remember that you can eliminate combinations.

Alright so here we go!

Roll one die! Any roll above 4 and you reroll! You also ignore any doubles

1/2 = 1
1/3 = 2
1/4 = 3
1/5 = 4
1/6 = 5
2/1 = 6
2/3 = 7
2/4 = 8
2/5 = 9
2/6 = 10
3/1 = 11
3/2 = 12
3/4 = 13
3/5 = 14
3/6 = 15
4/1 = 16
4/2 = 17
4/3 = 18
4/5 = 19
4/6 = 20

There we go!

So what combination should I do next?
« Last Edit: August 17, 2010, 07:42:50 pm by Neonivek »
Logged

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: A Math Challenge
« Reply #40 on: August 17, 2010, 09:41:53 pm »

With the roll order considered, for a dice of X sides to get a number from 1 to N:
Find Y in XY-1 < N ≤ XY.
Roll Y dice, noting the order.
Use the rolls, in the rolled order, as the digits in a base X number.
If that number exceeds XY - (XY mod N), repeat with a new set of rolls.
The result is the number mod N.

X, Y, and N should all be positive integers, and X and N should be at least two. It may work with non-integers and greater ranges, but I am not experienced enough to know at a glance nor determined enough to think about it.

Conversions between bases is reccomended wherever deemed easiest.


Without roll order, it becomes difficult if not impossible to achieve a proper unbiased distribution.

Finally, the easiest way: If N is a factor of X, simply roll a die, mod N.


Or, the internet user's way: Ignore the dice, go to random.org.
Logged
Eh?
Eh!

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: A Math Challenge
« Reply #41 on: August 20, 2010, 02:26:03 pm »

If your die has N sides and you want to generate a result R in a continuous range of 0 to M, only caring about integers, a simple way would be:


Convert M to base N, using whichever method is appropriate. Call this O
Roll for the most significant digit of R (the one with the highest value) and subtract 1. Assume the value of all other digits is 0. If you exceed the value of O, re-roll this die.
Repeat that step for every other digit of R.
When finished, convert R from base N to the required base (probably base 10).


To make the range go from 1 to M, do not subtract 1 from the final digit. To generate over a discontinuous range roll over a continuous range, then add to the result to account for the discontinuous. For example if you're rolling in range 1-4, 6-10, you would roll in range 5-9 and add 1 to all values exceeding 4. This can be used to roll over a range starting at an arbitrary number as well.


Note that this method is similar to other methods as well. The trick however is that by using base N and rolling once for every digit, you are guaranteed there is no interference between the different die rolls and thus you get an even distribution. You also need less re-rolls because you re-roll on a per-die base, but this does slightly alter the chances at the far edge of the range. To avoid this, use Qwerty's method and roll R at once, rerolling whenever it exceeds O. This is slower but better if accuracy is needed at the edges of the range.
« Last Edit: August 20, 2010, 02:30:35 pm by Virex »
Logged

Puck

  • Bay Watcher
    • View Profile
Re: A Math Challenge
« Reply #42 on: August 28, 2010, 07:39:57 am »

That might not be all that relevant... but I'm a little bit sick. Nothing major. Not even distracting.

I read the thread and didnt understand ANYTHING. But my IQ scores as well as math grades say it should be otherwise.

Soooo. Suddenly I had to vomit. So I went and worshipped the porcelain altar. Or I thoroughly reconsidered my breakfast, whichever you prefer.

Came back, read the thread again, et voila, I GET IT. I iz happy Puck. Not that I have anything meaningful to add, but there you have it.

FreakyCheeseMan

  • Bay Watcher
    • View Profile
Re: A Math Challenge
« Reply #43 on: August 28, 2010, 10:41:10 am »

I have a semi-general solution that's less computationally intensive, though requires more die rolls.

So, you can always "Cast" a die to a lower number, by saying any higher number is a reroll- so if you roll a 1-6 on a d20, you take the result, and if you roll anything higher, you roll again until you get 1-6. If this takes too long for you, you can mix and match by going with multiples- reroll on a 19 or 20, and assign 3 numbers to each, 1-6.

You can use this to make lower dice function as perfect divisors of higher dice. Example- trying to make a d20 out of d6s. Roll a d6 cast to a d4- so reroll on a 5 or 6. let this determine the range of answers- 1-5, 6-10, 11-15,  16-20. Then roll again, this time casting the d6 to a d5, to narrow it down.

The advantage to this system is that it requires no complicated arithmetic, besides factoring the higher die.
Logged
What do you really need to turn Elves into Dwarves? Mutation could make them grow a beard; insanity effects could make them evil-minded, aggressive, tree-hating cave dwellers, and instant, full necrosis of their lower legs could make them short.

Vertigon

  • Bay Watcher
    • View Profile
Re: A Math Challenge
« Reply #44 on: August 28, 2010, 11:32:40 am »

The one thing that bothers me here (sensitiveedit: this thread, not anyone's post) :

Singular: die

Plural: dice

LERN IT.
« Last Edit: August 28, 2010, 11:34:53 am by Vertigon »
Logged
Pages: 1 2 [3] 4