Math: Fleeting Thoughts

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

User avatar
Eebster the Great
Posts: 3257
Joined: Mon Nov 10, 2008 12:58 am UTC
Location: Cleveland, Ohio

Re: Math: Fleeting Thoughts

Postby Eebster the Great » Tue Aug 30, 2016 5:18 pm UTC

I was thinking of the MLB, where even slow curves typically exceed 30 m/s and cut fastballs can get close to 40.

According to Alam et al., flow starts to become turbulent around 40 km/h and becomes fully turbulent by 120 km/h, or about 75 mph. In the MLB, the average curveball is travelling at 76.4 mph after leaving the pitcher's hand and reaches a minimum speed of 70.4 mph before reaching the catcher's glove, easily within the turbulent regime. Other breaking balls like sliders of course travel faster, and fastballs average 90.9 mph off the glove and 83.2 at the plate (which is actually slower than I would have expected).

User avatar
Carlington
Posts: 1588
Joined: Sun Mar 22, 2009 8:46 am UTC
Location: Sydney, Australia.

Re: Math: Fleeting Thoughts

Postby Carlington » Fri Sep 02, 2016 1:20 pm UTC

I've been playing Euclidea lately, which has been doing a fine job of how much compass and straight-edge construction I've forgotten since geometry. It's been good fun to muddle my way through, and I plan to get some of the dev's other apps and to improve my solutions once I've finished.
I've reached an impasse, though, which I haven't been able to conquer after a weeks' worth of trying. I've been given a circle, with centre marked, and a point outside the circle. I need to construct a secant line through that point, such that the circle bisects the secant line, i.e the distance from the point to the first intersection with the circle should equal the distance from the first to the second intersection with the circle.

As it's a game and I'm enjoying it, I still want to get the warm fuzzy dopamine hit from the reward centre of my brain, so I don't want the solution out and out spoiled - that said, it would save me some sleep if I could be prodded with something that points in the direction of the solution.
My main serious attempts (not counting just drawing lines and circles and connecting their intersections and hoping) have been:
- construct the diameter of the circle through the point, and the tangent of the circle through the point, then bisect the angle so formed
- as above, but instead connect the centre to the tangent point, then bisect that line segment and connect the midpoint to the point given
- construct the midpoint of the point and the circle's centre, and then construct a tangent from that midpoint (this was impossible, as the midpoint fell within the circle)
- construct the diameter, and any other secant line through the point. Construct a line through the centre (midpoint of the diameter) and the midpoint of the other secant line. Continue this line until it intersects with the circle, and then construct the secant from the point through this point of intersection.
Kewangji: Posdy zwei tosdy osdy oady. Bork bork bork, hoppity syphilis bork.

Eebster the Great: What specifically is moving faster than light in these examples?
doogly: Hands waving furiously.

Please use he/him/his pronouns when referring to me.

User avatar
phlip
Restorer of Worlds
Posts: 7565
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Re: Math: Fleeting Thoughts

Postby phlip » Fri Sep 02, 2016 5:03 pm UTC

I'm not sure how spoilery this suggestion is compared to what you want, so I've broken it up into two...
Spoiler:
When I'm working on this sort of thing, I'll usually work backwards from the solution, rather than forward from the question... asking not "what can I construct from what I have?" but "what would be useful to construct what I need?"

So I'll start with the diagram with the solution already drawn in, and add lines/etc built off that until I've found something that I can construct from the initial givens, then adapt that whole thing in reverse into an actual construction.

(The next spoiler has what I would try as the first step of this reverse-construction. Now what is necessarily the right choice, but just what I'd try.)
Spoiler:
In particular in this case, the whole bisected-inside-and-outside thing makes me want to mirror everything so that the two halves of the secant line match. Have a perpendicular bisector of the secant line, which we use as an axis of symmetry. A reflection of the circle on that axis.

So that if P is our original point, and the secant cuts the original circle at A and then ends at B (so that PA = AB)... we draw our perpendicular at A, have B as a reflection of P, and have a circle that goes through P and A, as a reflection of our original circle that goes through A and B.

Of course, we still don't know how to figure out where that circle or axis need to be, but that's where I'd start.

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

User avatar
bentheimmigrant
Dotcor Good Poster
Posts: 1365
Joined: Fri Apr 25, 2008 9:01 pm UTC
Location: UK

Re: Math: Fleeting Thoughts

Postby bentheimmigrant » Sat Dec 10, 2016 11:28 pm UTC

So, I've essentially got a simplified version of the sofa problem... I just want to get a piece of wood through into a gap behind a fake wall. What is the longest piece I can get through, assuming that it is touching the floor, top of the opening, and the real wall at the back simultaneously at the tightest point?

The real wall is 0.9m behind the fake wall, and the opening is 0.3m tall.

I tried coming up with an equation for length wrt the angle of the wood against the floor, and came up with L = (0.9 - (0.3/tanx))/cosx

Which I suspect is wrong, but I'm not sure how...

Anyways, if memory serves, I should find dL/dx, which should be 0 at the point where the length is a minimum. But this is hard, and Wolfram Alpha gave me a fairly complicated solution, and I couldn't get anything to work.

But all the while this seems much simpler than I've made it... Halp?

Edit: So apparently (and not surprisingly), this is a specific problem other people have addressed. Amazing what a good night's sleep and some fresh googling can do.
https://ckrao.wordpress.com/2010/11/07/ ... r-problem/

Would still be interesting to see if anyone can resolve the trigonometric approach.
"Comment is free, but facts are sacred" - C.P. Scott

User avatar
liberonscien
-ce
Posts: 121
Joined: Thu Jan 21, 2016 7:04 pm UTC

Re: Math: Fleeting Thoughts

Postby liberonscien » Sat Jan 07, 2017 7:03 am UTC

I think the term for taking something to the fourth power should be "hypercube".

User avatar
Thesh
Made to Fuck Dinosaurs
Posts: 6439
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: Colorado

Re: Math: Fleeting Thoughts

Postby Thesh » Sat Jan 07, 2017 7:11 am UTC

Shouldn't that be "tesseract"?
Summum ius, summa iniuria.

User avatar
Eebster the Great
Posts: 3257
Joined: Mon Nov 10, 2008 12:58 am UTC
Location: Cleveland, Ohio

Re: Math: Fleeting Thoughts

Postby Eebster the Great » Sat Jan 07, 2017 10:44 am UTC

I remember some sci fi short story using the term "quartic femtometer" in casual conversation as an exaggeration to refer to an extremely tiny region of spacetime. Personally, I thought "quartic femtosecond" (or better yet, yoctosecond) would be superior in that it is much smaller, but I'm sure the author felt this would be understood by almost nobody.

Thesh wrote:Shouldn't that be "tesseract"?

Or 4-cube? Or 4-regular-orthotope? Doesn't really have the same ring to it.

User avatar
Carlington
Posts: 1588
Joined: Sun Mar 22, 2009 8:46 am UTC
Location: Sydney, Australia.

Re: Math: Fleeting Thoughts

Postby Carlington » Tue Jan 10, 2017 9:36 pm UTC

Hypercube should be pronounced with the same stress pattern as hyperbola.
Kewangji: Posdy zwei tosdy osdy oady. Bork bork bork, hoppity syphilis bork.

Eebster the Great: What specifically is moving faster than light in these examples?
doogly: Hands waving furiously.

Please use he/him/his pronouns when referring to me.

User avatar
Zohar
COMMANDER PORN
Posts: 8418
Joined: Fri Apr 27, 2007 8:45 pm UTC
Location: Denver

Re: Math: Fleeting Thoughts

Postby Zohar » Wed Jan 11, 2017 1:58 pm UTC

high-PER-queue-BEH?
Mighty Jalapeno: "See, Zohar agrees, and he's nice to people."
SecondTalon: "Still better looking than Jesus."

Not how I say my name

User avatar
Carlington
Posts: 1588
Joined: Sun Mar 22, 2009 8:46 am UTC
Location: Sydney, Australia.

Re: Math: Fleeting Thoughts

Postby Carlington » Wed Jan 11, 2017 11:31 pm UTC

Yes, exactly that.
Kewangji: Posdy zwei tosdy osdy oady. Bork bork bork, hoppity syphilis bork.

Eebster the Great: What specifically is moving faster than light in these examples?
doogly: Hands waving furiously.

Please use he/him/his pronouns when referring to me.

User avatar
WibblyWobbly
Can't Get No
Posts: 506
Joined: Fri Apr 05, 2013 1:03 pm UTC

Re: Math: Fleeting Thoughts

Postby WibblyWobbly » Thu Jan 12, 2017 2:05 pm UTC

Eebster the Great wrote:I remember some sci fi short story using the term "quartic femtometer" in casual conversation as an exaggeration to refer to an extremely tiny region of spacetime. Personally, I thought "quartic femtosecond" (or better yet, yoctosecond) would be superior in that it is much smaller, but I'm sure the author felt this would be understood by almost nobody.

Thesh wrote:Shouldn't that be "tesseract"?

Or 4-cube? Or 4-regular-orthotope? Doesn't really have the same ring to it.

I like how Wikipedia's entry on n-orthotopes begins with "In geometry, an n-orthotope (also called a hyperrectangle or a box) ...

Can't we at least call it a hyperbox? An n-box?

User avatar
Copper Bezel
Posts: 2426
Joined: Wed Oct 12, 2011 6:35 am UTC
Location: Web exclusive!

Re: Math: Fleeting Thoughts

Postby Copper Bezel » Thu Jan 12, 2017 7:33 pm UTC

That doesn't tell you that it has equal sides, though. Which could make for some strange exponent behavior and strange units of measure.
So much depends upon a red wheel barrow (>= XXII) but it is not going to be installed.

she / her / her

User avatar
Eebster the Great
Posts: 3257
Joined: Mon Nov 10, 2008 12:58 am UTC
Location: Cleveland, Ohio

Re: Math: Fleeting Thoughts

Postby Eebster the Great » Thu Jan 12, 2017 9:01 pm UTC

Copper Bezel wrote:That doesn't tell you that it has equal sides, though. Which could make for some strange exponent behavior and strange units of measure.

That's why I said "regular". But yeah, the simplest term would be "4-cubed," which is a rather silly way of doing things.

User avatar
Carlington
Posts: 1588
Joined: Sun Mar 22, 2009 8:46 am UTC
Location: Sydney, Australia.

Re: Math: Fleeting Thoughts

Postby Carlington » Sat Mar 11, 2017 11:43 pm UTC

I was watching this Numberphile video about Pascal's triangle, and learned yet more things about it. In particular, I really liked the section starting here. When she hadn't even started drawing the lines in yet I was starting to notice the pattern and was genuinely saying to my computer screen "If this is Sierpinski's Triangle, I swear to god..." and then it was! Is there anything this triangle can't do?
Kewangji: Posdy zwei tosdy osdy oady. Bork bork bork, hoppity syphilis bork.

Eebster the Great: What specifically is moving faster than light in these examples?
doogly: Hands waving furiously.

Please use he/him/his pronouns when referring to me.

User avatar
cyanyoshi
Posts: 394
Joined: Thu Sep 23, 2010 3:30 am UTC

Re: Math: Fleeting Thoughts

Postby cyanyoshi » Sun Mar 12, 2017 10:10 am UTC

Carlington wrote:I was watching this Numberphile video about Pascal's triangle, and learned yet more things about it. In particular, I really liked the section starting here. When she hadn't even started drawing the lines in yet I was starting to notice the pattern and was genuinely saying to my computer screen "If this is Sierpinski's Triangle, I swear to god..." and then it was! Is there anything this triangle can't do?

Ah yes, good old Rule 60.

User avatar
Xenomortis
Not actually a special flower.
Posts: 1441
Joined: Thu Oct 11, 2012 8:47 am UTC

Re: Math: Fleeting Thoughts

Postby Xenomortis » Sun Mar 12, 2017 10:25 am UTC

Carlington wrote:I was watching this Numberphile video about Pascal's triangle, and learned yet more things about it. In particular, I really liked the section starting here. When she hadn't even started drawing the lines in yet I was starting to notice the pattern and was genuinely saying to my computer screen "If this is Sierpinski's Triangle, I swear to god..." and then it was! Is there anything this triangle can't do?

You get similar patterns when considering modulus of any prime (Sierpinski's triangle with n(n+1)/2 duplicates instead of 2, for prime n).
Actually, it works for any number, not just primes, but it's a little more complicated then.
Image

User avatar
Qaanol
The Cheshirest Catamount
Posts: 3065
Joined: Sat May 09, 2009 11:55 pm UTC

Re: Math: Fleeting Thoughts

Postby Qaanol » Mon Mar 27, 2017 5:03 pm UTC

One degree is approximately 1.75 percent
wee free kings

User avatar
cyanyoshi
Posts: 394
Joined: Thu Sep 23, 2010 3:30 am UTC

Re: Math: Fleeting Thoughts

Postby cyanyoshi » Mon Mar 27, 2017 8:41 pm UTC

That reminds me of something. I was fiddling around with some geometry-based algorithm that works well when an angle is a rational multiple of 2*pi. As a test, I saw what would happen if the angle was 1 radian. Surprisingly, everything worked out as if the angle was (7/44)*2*pi instead, but then it hit me that 22/7 is a very well-known approximation for pi. I felt slightly dumb afterwards.

gd1
Posts: 302
Joined: Wed Nov 14, 2012 5:42 am UTC

Re: Math: Fleeting Thoughts

Postby gd1 » Wed Sep 13, 2017 10:42 pm UTC

Heh, peach vise functions.

piecewise :p
There is no emotion more useless in life than hate.

gd1
Posts: 302
Joined: Wed Nov 14, 2012 5:42 am UTC

Re: Math: Fleeting Thoughts

Postby gd1 » Wed Nov 29, 2017 7:46 pm UTC

With regards to which part of mathematics I enjoy most, I'm somewhat partial to fractions.
There is no emotion more useless in life than hate.

User avatar
Xanthir
My HERO!!!
Posts: 5378
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: Math: Fleeting Thoughts

Postby Xanthir » Thu Nov 30, 2017 12:27 am UTC

Qaanol wrote:
One degree is approximately 1.75 percent

In what way? It's not 1.75 percent of a circle, or even of a quarter-arc.

(Vaguely related, 1px in CSS is about 1.25 arcminutes - the CSS length units are technically angle units, since they scale by viewing distance to subtend the same fraction of your view. ^_^)

(I know this is responding to a many-month-old post, but Qaanol has to answer for themself, dammit!)
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

User avatar
doogly
Dr. The Juggernaut of Touching Himself
Posts: 5507
Joined: Mon Oct 23, 2006 2:31 am UTC
Location: Lexington, MA
Contact:

Re: Math: Fleeting Thoughts

Postby doogly » Thu Nov 30, 2017 2:42 am UTC

Of a radian. Not to steal Qaanol's thunder though.
LE4dGOLEM: What's a Doug?
Noc: A larval Doogly. They grow the tail and stinger upon reaching adulthood.

Keep waggling your butt brows Brothers.
Or; Is that your eye butthairs?

User avatar
Qaanol
The Cheshirest Catamount
Posts: 3065
Joined: Sat May 09, 2009 11:55 pm UTC

Re: Math: Fleeting Thoughts

Postby Qaanol » Thu Nov 30, 2017 6:35 am UTC

Xanthir wrote:
Qaanol wrote:
One degree is approximately 1.75 percent

In what way? It's not 1.75 percent of a circle, or even of a quarter-arc.

(Vaguely related, 1px in CSS is about 1.25 arcminutes - the CSS length units are technically angle units, since they scale by viewing distance to subtend the same fraction of your view. ^_^)

(I know this is responding to a many-month-old post, but Qaanol has to answer for themself, dammit!)


Doogly got it.

Being excessively pedantic, a radian is the ratio of arc length to radius length which is identically equal to 1, with no units. So a degree is just… the number π/180.
wee free kings

User avatar
Pfhorrest
Posts: 5171
Joined: Fri Oct 30, 2009 6:11 am UTC
Contact:

Re: Math: Fleeting Thoughts

Postby Pfhorrest » Wed Nov 28, 2018 2:58 am UTC

I need to get my suroctonions tetrated soon.
Forrest Cameranesi, Geek of All Trades
"I am Sam. Sam I am. I do not like trolls, flames, or spam."
The Codex Quaerendae (my philosophy) - The Chronicles of Quelouva (my fiction)

User avatar
Thesh
Made to Fuck Dinosaurs
Posts: 6439
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: Colorado

Re: Math: Fleeting Thoughts

Postby Thesh » Fri Jan 11, 2019 6:37 pm UTC

I think the round function is pretty poorly named:


Without rounding.


With rounding.
Summum ius, summa iniuria.

User avatar
Xanthir
My HERO!!!
Posts: 5378
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: Math: Fleeting Thoughts

Postby Xanthir » Fri Jan 11, 2019 6:56 pm UTC

Qaanol wrote:
Xanthir wrote:
Qaanol wrote:
One degree is approximately 1.75 percent

In what way? It's not 1.75 percent of a circle, or even of a quarter-arc.

(Vaguely related, 1px in CSS is about 1.25 arcminutes - the CSS length units are technically angle units, since they scale by viewing distance to subtend the same fraction of your view. ^_^)

(I know this is responding to a many-month-old post, but Qaanol has to answer for themself, dammit!)


Doogly got it.

Being excessively pedantic, a radian is the ratio of arc length to radius length which is identically equal to 1, with no units. So a degree is just… the number π/180.

This is good pedantry, but Qaanol's wasn't. You can't just take any number and say it's a percentage by multiplying it by 100; percentages *mean* something, dang it!

(In this case, the correct answer is "a degree is approximately 1.75% of a radian". The fact that a radian is just the unitless value 1 doesn't mean you can just ignore it when describing what a degree is a % of.)

Thesh wrote:
I think the round function is pretty poorly named:


Without rounding.


With rounding.

Looks rounded to me, I don't see the problem.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

Tub
Posts: 431
Joined: Wed Jul 27, 2011 3:13 pm UTC

Re: Math: Fleeting Thoughts

Postby Tub » Fri Jan 11, 2019 7:03 pm UTC


User avatar
Qaanol
The Cheshirest Catamount
Posts: 3065
Joined: Sat May 09, 2009 11:55 pm UTC

Re: Math: Fleeting Thoughts

Postby Qaanol » Sat Jan 12, 2019 8:05 am UTC

Xanthir wrote:This is good pedantry, but Qaanol's wasn't. You can't just take any number and say it's a percentage by multiplying it by 100; percentages *mean* something, dang it!

(In this case, the correct answer is "a degree is approximately 1.75% of a radian". The fact that a radian is just the unitless value 1 doesn't mean you can just ignore it when describing what a degree is a % of.)

“1 percent” is the unitless number 1/100
“1 degree” is the unitless number π/180

I stand by my pedantry.
wee free kings

User avatar
ucim
Posts: 6709
Joined: Fri Sep 28, 2012 3:23 pm UTC
Location: The One True Thread

Re: Math: Fleeting Thoughts

Postby ucim » Sun Jan 13, 2019 4:48 am UTC

Qaanol wrote:“1 percent” is the unitless number 1/100
“1 degree” is the unitless number π/180


“1 percent” literally means "one per hundred", which is a ratio, which is a (rational) number, and therefore is the unitless number 1/100.

“1 degree” literally means "one (specific) part of a(n understood) whole, that whole being (in math) the circumference of a unit circle in the plane, and the specific part being 1/360 of it. And while the circumference's length equals 2π, the circumference is not itself identical to that number. It is a circumference, not a number.

Therefore it is not the unitless number π/180, but rather, the unitted value 1/360 of a unit circle's circumference (and all that comes from that).

There is no case (at least known to me) in which "one percent" does not mean one one-hundreth. Sometimes the thing it's one one-hundredth of is understood, but it is separate from the percent (concept) itself.

However, there are many cases where "one degree" does not mean, or come from, the number π/180. Degrees of the (musical) scale come to mind, as do degrees Rankine and degrees Celsius. In both cases the meaning of "one degree" derives from the idea of a specific part of a (specified or understood) whole. Even the PhD degree ultimately derives from this, and it most certainly is not a unitless number equal to π/180 (or anything else).

Jose
Order of the Sillies, Honoris Causam - bestowed by charlie_grumbles on NP 859 * OTTscar winner: Wordsmith - bestowed by yappobiscuts and the OTT on NP 1832 * Ecclesiastical Calendar of the Order of the Holy Contradiction * Heartfelt thanks from addams and from me - you really made a difference.

User avatar
Eebster the Great
Posts: 3257
Joined: Mon Nov 10, 2008 12:58 am UTC
Location: Cleveland, Ohio

Re: Math: Fleeting Thoughts

Postby Eebster the Great » Sun Jan 13, 2019 6:06 am UTC

I think it is well accepted that 1% = 0.01. The question is the meaning of angle measure. The terse Complex Analysis text I just conveniently lost defined the radian measure according to the Taylor series that could most conveniently fit the desired properties. Clearly one measure is way more convenient than all others. But defining 1 rad = 1 is not a meaningless step and comes down to the chosen definition of the trig functions.

The geometric and calculus explanations of why radians are the best measure is very convincing, but if we insisted, we could still use any other measure if we really had to. The mathematical conclusions would not change. It would just be harder to explain weird angles to students.

Tub
Posts: 431
Joined: Wed Jul 27, 2011 3:13 pm UTC

Re: Math: Fleeting Thoughts

Postby Tub » Sun Jan 13, 2019 10:24 am UTC

1 degree is about -25.56 dB. The units check out.

User avatar
Flumble
Yes Man
Posts: 2162
Joined: Sun Aug 05, 2012 9:35 pm UTC

Re: Math: Fleeting Thoughts

Postby Flumble » Sun Jan 13, 2019 7:56 pm UTC

The degree is a unit of work, equal to about 3 years.

DavidSh
Posts: 182
Joined: Thu Feb 25, 2016 6:09 pm UTC

Re: Math: Fleeting Thoughts

Postby DavidSh » Sun Jan 13, 2019 9:38 pm UTC

I think it works better as "man-years" rather than just "years". (This is the gender-free meaning of "man", just meaning a worker.)

User avatar
Thesh
Made to Fuck Dinosaurs
Posts: 6439
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: Colorado

Re: Math: Fleeting Thoughts

Postby Thesh » Sun Jan 13, 2019 9:44 pm UTC

The gender-neutral term is "person-years".
Summum ius, summa iniuria.

User avatar
ucim
Posts: 6709
Joined: Fri Sep 28, 2012 3:23 pm UTC
Location: The One True Thread

Re: Math: Fleeting Thoughts

Postby ucim » Sun Jan 13, 2019 11:05 pm UTC

No. It's "persibling-years".

Jose
Order of the Sillies, Honoris Causam - bestowed by charlie_grumbles on NP 859 * OTTscar winner: Wordsmith - bestowed by yappobiscuts and the OTT on NP 1832 * Ecclesiastical Calendar of the Order of the Holy Contradiction * Heartfelt thanks from addams and from me - you really made a difference.

User avatar
gmalivuk
GNU Terry Pratchett
Posts: 26602
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

Re: Math: Fleeting Thoughts

Postby gmalivuk » Mon Jan 14, 2019 4:07 am UTC

One's son shouldn't be one's sibling...
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

User avatar
Flumble
Yes Man
Posts: 2162
Joined: Sun Aug 05, 2012 9:35 pm UTC

Re: Math: Fleeting Thoughts

Postby Flumble » Mon Jan 14, 2019 4:48 am UTC

In any case, let's not discount any non-human entities that may work for degrees. They're worker-years.


For some mathy thoughts: if you have a linear programming problem in k dimensions/properties and n variables, does your solution contain at most min{k,n} non-zero entries?
In particular, I have a large set of foodstuffs (vectors/variables) with a couple of nutrients (dimensions) in them, a minimum for each nutrient and I'm optimizing for price. I'd like to know beforehand if throwing LP at it will give a concise solution or tiny bits of everything. (My gut says it will, because for 3 foods and 2 nutrients, food C is a linear combination of A+B that is either cheaper or more expensive, so for any point in the feasible region, you can optimize by either removing A+B for more C until A/B runs out or adding more A+B until C runs out.)

User avatar
Xenomortis
Not actually a special flower.
Posts: 1441
Joined: Thu Oct 11, 2012 8:47 am UTC

Re: Math: Fleeting Thoughts

Postby Xenomortis » Mon Jan 14, 2019 12:41 pm UTC

gmalivuk wrote:One's son shouldn't be one's sibling...

I've got some friends that may argue against that.
Spoiler:
Said friends may or may not be Chocobos.
Image

User avatar
doogly
Dr. The Juggernaut of Touching Himself
Posts: 5507
Joined: Mon Oct 23, 2006 2:31 am UTC
Location: Lexington, MA
Contact:

Re: Math: Fleeting Thoughts

Postby doogly » Mon Jan 14, 2019 3:49 pm UTC

gmalivuk wrote:One's son shouldn't be one's sibling...

The moral injunctions of Exodus can really go take a hike. 2019, brah.
LE4dGOLEM: What's a Doug?
Noc: A larval Doogly. They grow the tail and stinger upon reaching adulthood.

Keep waggling your butt brows Brothers.
Or; Is that your eye butthairs?

DavidSh
Posts: 182
Joined: Thu Feb 25, 2016 6:09 pm UTC

Re: Math: Fleeting Thoughts

Postby DavidSh » Mon Jan 14, 2019 3:56 pm UTC

Flumble wrote:In any case, let's not discount any non-human entities that may work for degrees. They're worker-years.


For some mathy thoughts: if you have a linear programming problem in k dimensions/properties and n variables, does your solution contain at most min{k,n} non-zero entries?
In particular, I have a large set of foodstuffs (vectors/variables) with a couple of nutrients (dimensions) in them, a minimum for each nutrient and I'm optimizing for price. I'd like to know beforehand if throwing LP at it will give a concise solution or tiny bits of everything.

Yes, that is correct, with minor caveats.
For a problem like "Minimize c'x subject to Ax >= b, x >=0", such as your diet problem (sometimes called the Prisoner's Diet Problem), if the cost vector c is positive there will be an optimal solution where at least n of the inequality constraints are tight. This represents a corner of the feasible region. If this solution has m non-zeros, then only n-m of the non-negativity constraints are tight. So at least m of the nutrition constraints Ax >= b must be tight. This is only possible if m is at most k.

Caveats are:
(1) If the costs c have some negative values, an optimal solution might involve infinite amounts of some foodstuffs.
(2) If you have multiple optimal solutions, some might have more non-zeros. For example, if you have two foodstuffs with quantities x and y, and only 1 nutrient constraint x+y >= 1, and the foodstuffs also have equal costs, x=1,y=0 is an optimum, as is x=0,y=1, as is the entire line x=alpha,y=1-alpha for 0 <= alpha <= 1. So, while some optimal solutions have min(k,n)=1 non-zero, other optimal solutions have 2 non-zeros.


Return to “Mathematics”

Who is online

Users browsing this forum: No registered users and 13 guests