Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 166 167 [168] 169 170 ... 173

Author Topic: Mathematics Help Thread  (Read 227739 times)

askovdk

  • Bay Watcher
    • View Profile
Re: Mathematics Help Thread
« Reply #2505 on: September 05, 2017, 04:20:46 am »

There's a math thread?
WOOT WOOT
Also, I've found a proof to askovdk's problem, I'm writing it up now.
EDIT: Found unexpected contingency. Will have to work on it some more.
EDIT 2: Contingency solved. Writing it up again.
Interesting  :D
Logged
My HMoM forts :
 Kindletours - A flying silver city.
 Boardstrap - Thermal borehole HoMM5 style.

hops

  • Bay Watcher
  • Secretary of Antifa
    • View Profile
Re: Mathematics Help Thread
« Reply #2506 on: October 11, 2017, 11:28:50 pm »

Here's a heavily generalized version of a question I encountered:

I have N types of objects, and M total number of objects, and I want to put them in a line of M objects where M > N. The function f(X) returns the number of objects in the pile of M objects that is of type X. How many unique combinations can I get by arranging the objects in the line, where objects of the same type are considered identical?
Logged
she/her. (Pronouns vary over time.) The artist formerly known as Objective/Cinder.

One True Polycule with flame99 <3

Avatar by makowka

bloop_bleep

  • Bay Watcher
    • View Profile
Re: Mathematics Help Thread
« Reply #2507 on: October 11, 2017, 11:40:51 pm »

Oh, that's easy combinatorics.

M!/(f(1)!*f(2)!*...*f(N)!)

M! ways to order with overcounting. To correct for overcount, for every type X, divide by f(X)!, because there are f(X)! ways to order all the objects of type X, and all these orderings are considered the same.

An example of this is how many distinct permutations there are of the word COFFEE. 6!/(1!*1!*2!*2!)=180.
« Last Edit: October 11, 2017, 11:45:40 pm by bloop_bleep »
Logged
Quote from: KittyTac
The closest thing Bay12 has to a flamewar is an argument over philosophy that slowly transitioned to an argument about quantum mechanics.
Quote from: thefriendlyhacker
The trick is to only make predictions semi-seriously.  That way, I don't have a 98% failure rate. I have a 98% sarcasm rate.

hops

  • Bay Watcher
  • Secretary of Antifa
    • View Profile
Re: Mathematics Help Thread
« Reply #2508 on: October 12, 2017, 12:17:32 am »

Ah, I understand the principle behind the answer now, thanks!
Logged
she/her. (Pronouns vary over time.) The artist formerly known as Objective/Cinder.

One True Polycule with flame99 <3

Avatar by makowka

Parsely

  • Bay Watcher
    • View Profile
    • My games!
Re: Mathematics Help Thread
« Reply #2509 on: March 31, 2018, 12:17:25 pm »

Say I have an attack that does 50 damage every 1.4 seconds, how do I convert that to damage per 1 second? What if the attack does 50 damage every 0.4 seconds?

Context: I'm in Calculus 2 right now and I've been struggling a lot with conversions in my engineering 101 class.
Logged

McTraveller

  • Bay Watcher
  • This text isn't very personal.
    • View Profile
Re: Mathematics Help Thread
« Reply #2510 on: March 31, 2018, 12:26:26 pm »

Say I have an attack that does 50 damage every 1.4 seconds, how do I convert that to damage per 1 second? What if the attack does 50 damage every 0.4 seconds?

Context: I'm in Calculus 2 right now and I've been struggling a lot with conversions in my engineering 101 class.
You want damage per second...  what mathematical operation gives you something per something else?  It really is just as simple as that...

EDIT dang ninja. I was trying to be more hint-ful than answer-ful.
Logged
This product contains deoxyribonucleic acid which is known to the State of California to cause cancer, reproductive harm, and other health issues.

Magistrum

  • Bay Watcher
  • Skilled Fortresser
    • View Profile
Re: Mathematics Help Thread
« Reply #2511 on: March 31, 2018, 12:38:52 pm »

Use that proportion thing I don't know the name of in english, maybe rule of 3?
It goes: value1 / value2 = unknown value / value desired.
So:
50 / 1.4 = x / 1
50 / 1.4 * 1 = x
50 / 1.4 = x
35.71 ≈ x //It goes far after the decimal point.

It does in average 35.71 damage per second.

Edit: I stopped midway to fix a phone real quick and got assalted by a pack of slow-moving ninjas.
« Last Edit: March 31, 2018, 12:40:35 pm by Magistrum »
Logged
In a time before time, I had a name.

Parsely

  • Bay Watcher
    • View Profile
    • My games!
Re: Mathematics Help Thread
« Reply #2512 on: March 31, 2018, 01:20:01 pm »

Thanks for all the responses everyone!

Say I have an attack that does 50 damage every 1.4 seconds, how do I convert that to damage per 1 second? What if the attack does 50 damage every 0.4 seconds?

Context: I'm in Calculus 2 right now and I've been struggling a lot with conversions in my engineering 101 class.

For unit conversions in general, there was a technique I was taught in high school chem class. Not sure if it's standard or not, but it works perfectly. Say I have something that has a velocity measured in feet/day, and I want that in meters/second. What I end up doing is setting up a table:

feet:0.3048 meters1 day1 hour1 minute
day:1 foot24 hours60 minutes60 seconds

Multiply together all the values on the top and bottom: all the units cancel out, leaving you with 0.3048 meters / 86400 seconds, or 3.527e-6 meters/second, your conversion factor. Works for converting any unit to any other unit, no matter how ugly they get.
Yes! This is what I've been wanting, some kind of clear cut rule or method.
Logged

Rockeater

  • Bay Watcher
    • View Profile
Re: Mathematics Help Thread
« Reply #2513 on: April 04, 2018, 07:32:17 am »

PTW
Logged
Damnit people, this is why I said to keep the truce. Because now everyone's ganging up on the cats.
Also, don't forget to contact your local Eldritch Being(s), so that they can help with our mission to destroy the universe.

Reelya

  • Bay Watcher
    • View Profile
Re: Mathematics Help Thread
« Reply #2514 on: April 05, 2018, 07:34:38 am »

I'm writing a function to simulate the Ricardian Law of Rent for part of an EU4 mod (something for fun), and think I've reached an acceptable solution but am not positive that all the steps I took are sound. The units of the final rent function seem to check out and it exhibits the properties that I would expect, but I still have doubts if it's conceptually correct.


You might be interested in some research that was done a while ago:

http://www.edstephan.org/Book/chap1/1.html
http://www.edstephan.org/Book/chap2/2.html
http://www.edstephan.org/Book/chap3/3.html
http://www.edstephan.org/Book/chap4/4.html
http://www.edstephan.org/Book/chap5/5.html
http://www.edstephan.org/Book/chap6/6.html
http://www.edstephan.org/Book/chap7/7.html
http://www.edstephan.org/Book/chap8/8.html

You'll need to find some of these pages in archive.org to get all the graphs and equations however. It's to do with optimal size of administrative regions, basically there's a specific log relationship between population density and optimal county/state/nation/etc size, and this holds true for both real world data and from a theoretical basis, on the assumption that things get optimized towards minimizing administrative effort/time.

McTraveller

  • Bay Watcher
  • This text isn't very personal.
    • View Profile
Re: Mathematics Help Thread
« Reply #2515 on: April 05, 2018, 09:09:47 am »

Quote
Ricardo noticed that the bargaining power of laborers can never dip below the produce obtainable on the best available rent-free land, because whenever rent leaves them with less than they could get on that free land, they can simply move to the new location
Oh, to live in the 1800s when there was such a thing as "free land".

That said, Ricardian rent is a pretty cool theory.  Just make sure you adhere to its assumptions when applying it...
Logged
This product contains deoxyribonucleic acid which is known to the State of California to cause cancer, reproductive harm, and other health issues.

WealthyRadish

  • Bay Watcher
    • View Profile
Re: Mathematics Help Thread
« Reply #2516 on: April 05, 2018, 01:23:39 pm »

I later went through the process more rigorously to make sure that formula I arrived at actually makes sense. I came up with the same result, but the process is interesting.

- Assume the quantity of labor-power required for full production of a unit of land is a function of that land's "rank" from best to worst (i.e., best land is used first and required work increases for inferior land)
- Assume quantity of goods produced is constant per unit land area (just a computational simplification)
- Assume rent is the difference in production between two equal areas of land given equal applied labor (Ricardo)

Using agriculture as an example and looking at two plots of land that require the same labor power to fully cultivate the same produce, we'd find that the area of the superior land would be greater than the area of the inferior land (i.e., more labor is required to cultivate each unit of the inferior land, so the same labor cultivates less inferior land than superior).


But this isn't very useful for writing rent as a function of land, as doing so would require understanding the difference in production over equal areas of land (or some other metric, but area is most useful here).

To get a view for that, we can look at equal areas and equal labor, where the superior land has exactly enough labor for full cultivation:


This can thus give a general formula for rent of any given unit of land, knowing the constant production per area, the required labor function of land, and the total amount of land in cultivation. This can arrive at a similar but slightly more complicated formula for other land uses (e.g. calculating rent on urban land used in manufacturing or something compared to agriculture).

There are other assumptions here that make it imperfect (such as how far the land "market" extends given a reference point) but for the purposes of a game simulation where performance and other restrictions are serious limitations it does the trick.

It's also worth remembering that this function doesn't define landowner behavior, it's more a description of tenant behavior; landowners just raise rents continuously until they experience vacancies, it's their tenants that are theoretically doing this calculation when they decide whether to stay or leave.
« Last Edit: April 05, 2018, 01:31:06 pm by UrbanGiraffe »
Logged

Parsely

  • Bay Watcher
    • View Profile
    • My games!
Re: Mathematics Help Thread
« Reply #2517 on: April 06, 2018, 06:29:51 pm »

Working on some homework review, struggling with this problem:
Spoiler (click to show/hide)

The answer is n = 4, but I have no idea how to arrive at that.

This is a similar problem I worked:
Spoiler (click to show/hide)

I'm not really certain why this works, but I just tried making this pattern fit the new problem hoping I'd figure it out.

I think an is:
(-1)n(0.5)2n/(2n!)

It does seem to fit the pattern but this doesn't include the first term, though I don't think I'm supposed to include the first term? Since most of the alternating series we've been working have been in the form:
(-1)nnk/(n+k)   [where k is some positive integer]

So I would be surprised to see a series that starts with a positive number, so I've just been thinking of it as:
S = 1 + an

I tried working this out a few times algebraically but my answers have been nowhere close to the intended n = 4. Am I even on the right track here?
« Last Edit: April 06, 2018, 06:32:13 pm by Parsely »
Logged

McTraveller

  • Bay Watcher
  • This text isn't very personal.
    • View Profile
Re: Mathematics Help Thread
« Reply #2518 on: April 06, 2018, 06:58:27 pm »

Pretty sure you are close, just look for things involving (n-1) instead of just n.
Logged
This product contains deoxyribonucleic acid which is known to the State of California to cause cancer, reproductive harm, and other health issues.

bloop_bleep

  • Bay Watcher
    • View Profile
Re: Mathematics Help Thread
« Reply #2519 on: April 06, 2018, 07:47:32 pm »

Don't try to find the convergent value, if your only purpose is to solve the problem. What I immediately notice when I see the formula for a_n, is an exponential expression with a power of n and a base with a magnitude less than 1 in the numerator, and the factorial of 2n in the denominator; this tells me a_n is going to get very, very, small very, very quickly. In fact, using a Python script I can see a_4 is 1/10321920, which is already smaller than the error difference. I can also see that a_5 will be -1/360 of a_4, and that furthermore the ratio between consecutive terms will only continue to decrease. That means that the sum of the rest of the sequence is in fact less than the sum of an infinite geometric sequence with initial term 1/10321920 and common ratio -1/360, which happens to be 361/360*1/10321920, that being still less than 10^(-7). Because the sum of the rest of the sequence is less than the error value, we can safely say that a_4 is the last term you need in order to accurately approximate the value of the sequence.

EDIT: Oops, just realized that there might be some complications in my proof due to the fact that the common ratio is negative... still, just a little tweaking and I think you can get it to work.
« Last Edit: April 06, 2018, 07:52:42 pm by bloop_bleep »
Logged
Quote from: KittyTac
The closest thing Bay12 has to a flamewar is an argument over philosophy that slowly transitioned to an argument about quantum mechanics.
Quote from: thefriendlyhacker
The trick is to only make predictions semi-seriously.  That way, I don't have a 98% failure rate. I have a 98% sarcasm rate.
Pages: 1 ... 166 167 [168] 169 170 ... 173