Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 26 27 [28] 29 30 ... 47  All

Author Topic: Maths thread.  (Read 307294 times)

0 Members and 2 Guests are viewing this topic.

ConMan

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1400
  • Respect: +1705
    • View Profile
Re: Maths thread.
« Reply #675 on: August 03, 2016, 02:58:41 am »
0

The very fact that it's got a y'^y' kind of term in it means it's not going to be anywhere amenable to most kinds of nice analysis. Best you could probably do is maybe try an infinite series approach, but even that's going to be hideous and prone to weird errors.
Logged

Witherweaver

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6476
  • Shuffle iT Username: Witherweaver
  • Respect: +7861
    • View Profile
Re: Maths thread.
« Reply #676 on: August 03, 2016, 12:17:17 pm »
+1

So, I saw this equation as (I think) a joke somewhere online:

y'' = y'^(y'*sin(x*y)) + (e^x)*tan(1/x)

It's way too advanced for me, and I can tell the solution is probably really nasty.  Can any of you solve it?  Wolframalpha wasn't giving it.

One thing you can do is cast it in to an easier problem to solve numerically.  Maybe something like the following

Let u = y, v=y'.  Then the equation becomes

v' = v^(v*sin(x*u)) + (e^x)tan(1/x),
u' = v.

Then you can take the initial point (u_0, v_0) and expand the derivatives as finite-differences to get an Euler scheme:

v_{n+1} =v_n+h_n*(v_n^(v_n*sin(x_n*u_n))+(e^(x_n))tan(1/x_n)),
u_{n+1}= u_n + h_n*v_n,

where h_n = x_{n+1}-x_n.  We almost know there is a region where we can find a solution.  (ODEs are well behaved like this, but I don't have the theorems off the top of my head.)  We obviously need to be away from x=0, and also there are going to be regions (1/x = (n+1/2)*Pi) where the solution blows up.  So you'd probably have to stick to strips between these points.  Inside of there I'd guess you could converge to a solution, though.

You don't need to reduce the order, you could also directly discretize the original problem

(y_{n+1} - 2y_n+y_{n-1})/(2h_n^2) = ((y_n-y_{n-1})/h)^((y_n-y_{n-1})/h)*sin(x_n*y_n)) + (e^x_n)*tan(1/x_n)

with an initial y_0, y_1.  Basically the same as before.


Edit: I shouldn't have said initial guess; the point (u_0,v_0) = (y_0, y'_0) must be provided for the problem to have a chance of being well defined. 
« Last Edit: August 03, 2016, 12:22:57 pm by Witherweaver »
Logged

pacovf

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3499
  • Multiediting poster
  • Respect: +3838
    • View Profile
Re: Maths thread.
« Reply #677 on: August 09, 2016, 03:48:03 am »
0

Dominion opening probability question:
What is the probabilities of hitting 5 first shuffle if you open silver/wedding and wedding/(pay off debt)

First one is annoying to calculate (I'd say ~70%, probably less, without writing it out), second one is 61/66 (92.4%).
« Last Edit: August 09, 2016, 03:56:27 am by pacovf »
Logged
pacovf has a neopets account.  It has 999 hours logged.  All his neopets are named "Jessica".  I guess that must be his ex.

Witherweaver

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6476
  • Shuffle iT Username: Witherweaver
  • Respect: +7861
    • View Profile
Re: Maths thread.
« Reply #678 on: August 09, 2016, 10:15:40 am »
0

Dominion opening probability question:
What is the probabilities of hitting 5 first shuffle if you open silver/wedding and wedding/(pay off debt)

First one is annoying to calculate (I'd say ~70%, probably less, without writing it out), second one is 61/66 (92.4%).

Hitting five your first shuffle if you open wedding/(pay off debt) is far more probable than people think!
Logged

Tables

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2816
  • Build more Bridges in the King's Court!
  • Respect: +3347
    • View Profile
Re: Maths thread.
« Reply #679 on: August 12, 2016, 07:06:20 pm »
0

00=1. I vaguely understand the arguments for why, but can someone try and clarify it?
Logged
...spin-offs are still better for all of the previously cited reasons.
But not strictly better, because the spinoff can have a different cost than the expansion.

Watno

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2745
  • Shuffle iT Username: Watno
  • Respect: +2982
    • View Profile
Re: Maths thread.
« Reply #680 on: August 12, 2016, 07:19:44 pm »
+1

Exponentiation with positive integer exponent n is defined as taking the product of the base with itself n times. Extending this definition to an exponent of 0 leads to nice properties and therefore theres no reason not to do it.
Logged

math

  • Explorer
  • *****
  • Offline Offline
  • Posts: 318
  • Shuffle iT Username: math
  • Respect: +191
    • View Profile
Re: Maths thread.
« Reply #681 on: August 12, 2016, 08:11:38 pm »
+2

00=1. I vaguely understand the arguments for why, but can someone try and clarify it?

If my understanding is correct, 00 is an indeterminate form.  x0=1 for all x not equal to zero, and 0x=0 for all x not equal to zero.
Logged

Watno

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2745
  • Shuffle iT Username: Watno
  • Respect: +2982
    • View Profile
Re: Maths thread.
« Reply #682 on: August 12, 2016, 09:06:27 pm »
+3

This outlines good reasons to define 0^0 as 1: https://www.quora.com/What-is-0-0-the-zeroth-power-of-zero-1
Logged

Jack Rudd

  • Saboteur
  • *****
  • Online Online
  • Posts: 1323
  • Shuffle iT Username: Jack Rudd
  • Respect: +1379
    • View Profile
Re: Maths thread.
« Reply #683 on: August 13, 2016, 09:02:03 am »
+3

0x=0 for all x not equal to zero.
No, 0x=0 for all x greater than zero. 0x is undefined for x less than zero.
Logged
Centuries later, archaeologists discover the remains of your ancient civilization.

Evidence of thriving towns, Pottery, roads, and a centralized government amaze the startled scientists.

Finally, they come upon a stone tablet, which contains but one mysterious phrase!

'ISOTROPIC WILL RETURN!'

schadd

  • Jester
  • *****
  • Offline Offline
  • Posts: 892
  • Shuffle iT Username: schadd
  • Respect: +1266
    • View Profile
Re: Maths thread.
« Reply #684 on: August 14, 2016, 10:18:46 pm »
0

   10 people are alone in rooms, and none of them have ever communicated. all of them are equipped with a button and a device that can generate and display a completely random real number within some selected interval. the goal of these 10 people is to collectively press their buttons 20 times, as soon as possible, but if any of them press their button within one second of another person, then they have to start again from 0 presses and everyone is alerted as such. everyone has perfect reaction times, everything happens instantly (e.g. the button press and the number generation) and they are all capable of evaluating the generated numbers into a time interval (e.g. seconds) and adding/subtracting from it and stuff. however, no one is alerted when someone else presses a button, only when the count is reset.
 
   what is the optimal strategy for this game? does it get easier to determine with fewer people and fewer necessary button presses? can you adapt to what other people are doing by noting when the count is reset?
Logged
I thought you thought it was a slip because I said 'Jake's partners' instead of 'Roadrunner7671.'

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2210
  • Respect: +2854
    • View Profile
Re: Maths thread.
« Reply #685 on: August 15, 2016, 01:22:20 am »
+1

   10 people are alone in rooms, and none of them have ever communicated. all of them are equipped with a button and a device that can generate and display a completely random real number within some selected interval. the goal of these 10 people is to collectively press their buttons 20 times, as soon as possible, but if any of them press their button within one second of another person, then they have to start again from 0 presses and everyone is alerted as such. everyone has perfect reaction times, everything happens instantly (e.g. the button press and the number generation) and they are all capable of evaluating the generated numbers into a time interval (e.g. seconds) and adding/subtracting from it and stuff. however, no one is alerted when someone else presses a button, only when the count is reset.
 
   what is the optimal strategy for this game? does it get easier to determine with fewer people and fewer necessary button presses? can you adapt to what other people are doing by noting when the count is reset?

Is this a puzzle with a known solution, or a problem you made up that you're curious about? In either case, I think you need more information to make a good answer.

What do you mean by "completely random real number"? Do the participants know anything about how the numbers are generated, like bounds on the number, or whether the distribution is uniform or normal or <insert favorite probability distribution here>? Or do they only know they're samples from some probability distribution? If you mean the second, I don't see how you can identify an optimal strategy - my intuition says there are good strategies that work no matter how the numbers are generated, but the optimal strategy (the one that finishes in least expected time) is going to depend on the probability distribution.
Logged
I have a blog! It's called Sorta Insightful. Check it out?

schadd

  • Jester
  • *****
  • Offline Offline
  • Posts: 892
  • Shuffle iT Username: schadd
  • Respect: +1266
    • View Profile
Re: Maths thread.
« Reply #686 on: August 15, 2016, 01:57:48 am »
0

Is this a puzzle with a known solution, or a problem you made up that you're curious about?
the latter


What do you mean by "completely random real number"? Do the participants know anything about how the numbers are generated, like bounds on the number, or whether the distribution is uniform or normal or <insert favorite probability distribution here>? Or do they only know they're samples from some probability distribution?
it's uniform distribution i think (all values are equally likely, ??, the wikipedia page for that has too many links to longer pages in the synopsis) and the folks choose the bounds when they decide to generate the number
Logged
I thought you thought it was a slip because I said 'Jake's partners' instead of 'Roadrunner7671.'

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2210
  • Respect: +2854
    • View Profile
Re: Maths thread.
« Reply #687 on: August 15, 2016, 03:05:10 am »
0

Are they allowed to press the device infinitely many times? Does everyone's device work the same way?

If everything's instant, and a person triggers the alert if they press the button within 1 second of themselves, I have a solution that guarantees the expected time is as close to 20 seconds as you want. Ignore the button entirely. Each player mentally flips a coin that lands heads with probability 1 - epsilon, where epsilon is some small constant > 0. Everyone whose coin landed heads presses the button. If two or more people press the button, everyone is alerted, and they try again immediately, losing no time. If 1 person pressed the button, they press the button every second until they're done. If 0 people pressed the button, in 20 seconds everyone will know, and they try again.

The probability 0 people press the button is epsilon^10. The first time this doesn't happen, they win. The expected value is 20 / (1 - epsilon^10), now make epsilon as small as you want to get this arbitrarily close to 20.

This works for an arbitrary number of people and an arbitrary number of button presses; making failures instant lets you get away with retrying in the vast majority of cases.
« Last Edit: August 15, 2016, 03:12:26 am by Titandrake »
Logged
I have a blog! It's called Sorta Insightful. Check it out?

schadd

  • Jester
  • *****
  • Offline Offline
  • Posts: 892
  • Shuffle iT Username: schadd
  • Respect: +1266
    • View Profile
Re: Maths thread.
« Reply #688 on: August 15, 2016, 03:24:01 am »
0

Are they allowed to press the device infinitely many times? Does everyone's device work the same way?
yes.
the other stuff
so that sort of confirms my initial suspicion which is that they shouldn't be alerted when the thing restarts
Logged
I thought you thought it was a slip because I said 'Jake's partners' instead of 'Roadrunner7671.'

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2210
  • Respect: +2854
    • View Profile
Re: Maths thread.
« Reply #689 on: August 15, 2016, 04:00:36 am »
0

Are they allowed to press the device infinitely many times? Does everyone's device work the same way?
yes.

For the record, I don't think the button adds anything to the problem. If you assume magic people who can do everything instantly, what stops these people from simulating arbitrary probability distributions in their head by doing tons of instantaneous mental calculation? Why should they use the button at all?

the other stuff
so that sort of confirms my initial suspicion which is that they shouldn't be alerted when the thing restarts

I think there's a way to get a similar result if people aren't notified of a restart, but haven't worked out the details yet.

Edit: nvm, I'm probably wrong and you get a worse bound. Since everyone gets identical information, everyone must decide on the same probabilistic strategy. Let's further assume everyone's strategy boils down to "press the button 20 times with probability p". They don't get any feedback until the end of 20 seconds, so I believe there's no better class of strategies, but I haven't thought about it formally yet.

Let the number of people be N. The number of button presses K doesn't matter if they don't get alerted. All it does is change how long they have to wait before learning if they succeeded or not.

Then, we want the p such that the probability exactly one person presses the button is maximized. With some combinatorics we get

max_{p} (N choose 1) * p * (1-p)^{N-1}

Use a common trick: maximizing this is equivalent to maximizing the log.

max_{p} \log{N} + \log{p} + (N-1) * \log{1-p}

This is maximized when p = 1/N. (You could either explicitly find where the derivative is 0 and verify the 2nd derivative is always negative, or cheat like I did by noticing this is the MLE for estimating a binomial distribution.)

For p = 1/N, the probability of success is N * (1/N) * (1-1/N)^{N-1} = (1-1/N)^{N-1}, which approaches 1/e for large N. So, in the limit, if they need K button presses, you can get expected time K*e.
« Last Edit: August 15, 2016, 04:18:06 am by Titandrake »
Logged
I have a blog! It's called Sorta Insightful. Check it out?

schadd

  • Jester
  • *****
  • Offline Offline
  • Posts: 892
  • Shuffle iT Username: schadd
  • Respect: +1266
    • View Profile
Re: Maths thread.
« Reply #690 on: August 15, 2016, 11:04:02 am »
0

For the record, I don't think the button adds anything to the problem. If you assume magic people who can do everything instantly, what stops these people from simulating arbitrary probability distributions in their head by doing tons of instantaneous mental calculation? Why should they use the button at all?
they have to use it at least once, else we have to assume that they'll all come up with the same thing. but yeah, perhaps the people shouldn't be able to do math after they come up with a strategy. also, i thought of it as the random number isn't a probability to press the button, rather an amount of time to wait before pressing the button, though the former seems to work. also thank you for answering


the amount of revisions that i have to do should make it clear that this is not an elegant problem some professor came up with
Logged
I thought you thought it was a slip because I said 'Jake's partners' instead of 'Roadrunner7671.'

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2210
  • Respect: +2854
    • View Profile
Re: Maths thread.
« Reply #691 on: August 16, 2016, 12:27:28 am »
0

It seems to me that you were looking for a very specific kind of strategy, in a world where people aren't infinitely smart, and then made the error of removing too much of reality when trying to turn it into a math problem.

If everyone's random number generator works the same way, they'll all come up with the same strategy anyways. Yes, maybe different people will do something different because they got different random numbers, but by same strategy, I mean that if you had everyone generate a random number, then switched two people right before they saw the number and decided what to do, the same thing would happen.
Logged
I have a blog! It's called Sorta Insightful. Check it out?

ehunt

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1528
  • Shuffle iT Username: ehunt
  • Respect: +1855
    • View Profile
Re: Maths thread.
« Reply #692 on: August 18, 2016, 06:42:45 pm »
+2

For a and b positive natural numbers, the quantity a^b counts the number of functions from a set of size b to a set of size a. We wish to extend the definition to cases where a and b are 0. In set theory we identify a function with its graph, so a function from S to T is just a subset G of the cartesian product S x T such that

"for all s in S there is exactly one t in T with (s, t) an element of G."

If S is empty, then "for all s in S" is a vacuous condition, and so any subset of S \times T is a function. However, S \times T is empty, so it has only one subset. Therefore a^0 = 1 for all a, including a = 0.

If T is empty, then unless S is empty, it's not possible that for all s in S there is exactly one t in T with (s, t) an element of G, so there are no functions from S to T. So 0^b = 1 for b > 0.
Logged

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3431
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
  • Respect: +2706
    • View Profile
Re: Maths thread.
« Reply #693 on: November 04, 2016, 01:14:37 am »
0

This was a problem my math teacher just gave the class:

What is the derivative of (sin(tan(x))*(sec2(ex)-tan2(ex)-1))/((ln(tan(x)))2)?  (For anyone who feels like turning this into an image, please do, because this looks nasty right now.)

I don't know if anybody really got it, but to a person who's just learning things it's one of the most evil questions ever.
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

Kirian

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 7096
  • Shuffle iT Username: Kirian
  • An Unbalanced Equation
  • Respect: +9411
    • View Profile
Re: Maths thread.
« Reply #694 on: November 04, 2016, 01:25:38 am »
+1

This was a problem my math teacher just gave the class:

What is the derivative of (sin(tan(x))*(sec2(ex)-tan2(ex)-1))/((ln(tan(x)))2)?  (For anyone who feels like turning this into an image, please do, because this looks nasty right now.)

I don't know if anybody really got it, but to a person who's just learning things it's one of the most evil questions ever.

I was going to say that was really tough, and is the answer Moat, and then I realized what the trick is supposed to be, and simply decided your teacher is a dick, unless they then went on to explain said dickery.
Logged
Kirian's Law of f.DS jokes:  Any sufficiently unexplained joke is indistinguishable from serious conversation.

ConMan

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1400
  • Respect: +1705
    • View Profile
Re: Maths thread.
« Reply #695 on: November 04, 2016, 01:26:17 am »
0

This was a problem my math teacher just gave the class:

What is the derivative of (sin(tan(x))*(sec2(ex)-tan2(ex)-1))/((ln(tan(x)))2)?  (For anyone who feels like turning this into an image, please do, because this looks nasty right now.)

I don't know if anybody really got it, but to a person who's just learning things it's one of the most evil questions ever.
sec^2(x) - tan^2(x) = 1, by rearrangement of the normal cos^2 + sin^2 identity, thus the whole thing is equal to 0.
Logged

ConMan

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1400
  • Respect: +1705
    • View Profile
Re: Maths thread.
« Reply #696 on: November 04, 2016, 01:26:43 am »
0

This was a problem my math teacher just gave the class:

What is the derivative of (sin(tan(x))*(sec2(ex)-tan2(ex)-1))/((ln(tan(x)))2)?  (For anyone who feels like turning this into an image, please do, because this looks nasty right now.)

I don't know if anybody really got it, but to a person who's just learning things it's one of the most evil questions ever.

I was going to say that was really tough, and is the answer Moat, and then I realized what the trick is supposed to be, and simply decided your teacher is a dick, unless they then went on to explain said dickery.
I assumed that something so nasty-looking would have a trick to it, and it didn't take long to spot it.
Logged

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3431
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
  • Respect: +2706
    • View Profile
Re: Maths thread.
« Reply #697 on: November 04, 2016, 01:29:23 am »
0

This was a problem my math teacher just gave the class:

What is the derivative of (sin(tan(x))*(sec2(ex)-tan2(ex)-1))/((ln(tan(x)))2)?  (For anyone who feels like turning this into an image, please do, because this looks nasty right now.)

I don't know if anybody really got it, but to a person who's just learning things it's one of the most evil questions ever.

I was going to say that was really tough, and is the answer Moat, and then I realized what the trick is supposed to be, and simply decided your teacher is a dick, unless they then went on to explain said dickery.

He explained it pretty quickly.
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

Kirian

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 7096
  • Shuffle iT Username: Kirian
  • An Unbalanced Equation
  • Respect: +9411
    • View Profile
Re: Maths thread.
« Reply #698 on: November 04, 2016, 01:31:30 am »
0

This was a problem my math teacher just gave the class:

What is the derivative of (sin(tan(x))*(sec2(ex)-tan2(ex)-1))/((ln(tan(x)))2)?  (For anyone who feels like turning this into an image, please do, because this looks nasty right now.)

I don't know if anybody really got it, but to a person who's just learning things it's one of the most evil questions ever.

I was going to say that was really tough, and is the answer Moat, and then I realized what the trick is supposed to be, and simply decided your teacher is a dick, unless they then went on to explain said dickery.
I assumed that something so nasty-looking would have a trick to it, and it didn't take long to spot it.

Sure, but springing that sort of thing on high school students is a dick move, but if he rapidly explained it, then it's a good lesson:  look for ways to simplify things.
Logged
Kirian's Law of f.DS jokes:  Any sufficiently unexplained joke is indistinguishable from serious conversation.

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3431
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
  • Respect: +2706
    • View Profile
Re: Maths thread.
« Reply #699 on: November 04, 2016, 01:46:53 am »
0

This was a problem my math teacher just gave the class:

What is the derivative of (sin(tan(x))*(sec2(ex)-tan2(ex)-1))/((ln(tan(x)))2)?  (For anyone who feels like turning this into an image, please do, because this looks nasty right now.)

I don't know if anybody really got it, but to a person who's just learning things it's one of the most evil questions ever.

I was going to say that was really tough, and is the answer Moat, and then I realized what the trick is supposed to be, and simply decided your teacher is a dick, unless they then went on to explain said dickery.
I assumed that something so nasty-looking would have a trick to it, and it didn't take long to spot it.

Sure, but springing that sort of thing on high school students is a dick move, but if he rapidly explained it, then it's a good lesson:  look for ways to simplify things.

...I'm in college (granted, it's my first term).
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm
Pages: 1 ... 26 27 [28] 29 30 ... 47  All
 

Page created in 0.06 seconds with 21 queries.