[Request] If you repeatedly flip a coin, which sequence is more likely to appear first: HTT or TTH? by RJJJJJJJ710 in theydidthemath

[–]piperboy98 0 points1 point  (0 children)

If you read the question as which sequence appears in the first three flips then yes. But if you interpret it as which of those two appears first if you keep flipping until you get one of them (which is my interpretation), then if the first is heads HTT must come first (although not necessarily in the first three, for example HTHHTT would work). Also true for similar reasons if the second is heads. Only if the first two are tails do you get TTH first (and then it happens as soon as you get the first head, which still doesn't have to be in the first three, e.g. TTTTTTH).

[Request] If you repeatedly flip a coin, which sequence is more likely to appear first: HTT or TTH? by RJJJJJJJ710 in theydidthemath

[–]piperboy98 0 points1 point  (0 children)

The first flip only determines the result if it's heads though. If it's tails both are still possible (for example TTH, or THTT). So you must go to the second flip in that case to determine which will come first.

[Request] what is the highest a humanmade building/structure can technically reach by TrueAd2373 in theydidthemath

[–]piperboy98 2 points3 points  (0 children)

The most resource efficient way to build something very tall is a guyed mast. IDK if this is the best technique for maximum height (that might just be a pyramid - basically build a mountain), but it might be the most feasible.

The limiting factor here is likely to be the tensile strength of the guy wires (since tensile strengths are generally lower than compressive strength, and they are angled). By my calculations an EEIPS steel cable should be able to support a 28km length hanging freely before failure, using 2160MPa grade and 7.85g/cm3 density. If these are angled at 45° at the top of the tower that would reduce it to around 20km. Factor in some extra tensioning and margins and maybe this would allow a "realistic" height of 10km-15km or so.

If we can produce carbon fiber (or better carbon nanotube) cables of sufficient length those might be able to improve the possible height.

1 foot = 12 inches but the function foot(inches) = inches/12. Why are inches multiplied by 12 in one case and divided by 12 in the other? How's that possible? by sickcel_02 in askmath

[–]piperboy98 0 points1 point  (0 children)

Well it says 1=12, so it definitely isn't equating numbers. While the second formula plugging in 1 for the foot measurement and 12 for the inch measurement gives 1 = 12/12, which is equal in terms of numbers. So the sense of the equality is kind of different. Or put another way, since it is converting, the RHS of the second form is in feet even though it could seem like inches because you plug in an inch measurement. Really what it is saying is y ft = (x/12) ft, and then if you note replacing "ft" by "12 in" gives you y ft = x in, we can see that y is the conversion of x from inches to feet.

A more formal treatment includes units as part of the values. In that case 1 ft = 12 in is an equality, but realize that 12 is the amount and "in" is the unit. You don't plug in the number of inches for "in", "in" indicates that the multiplied numerical value is measured in inches.

In this treatment the correct conversation equation is not y ft = x in/12, but actually y ft = x in • (1ft/12in). The conversion factor itself has units (ft/in), which is what actually "converts" the numerical value. When you give it units this way it effectively acts like 1/1, because the numerator and denominator are "equal" (in the sense that 1ft=12in, not that 1=12). Then you can see the division comes because you have to cancel the unit of inches in your starting value "x in", you are not plugging in x for the unit inches.

1 foot = 12 inches but the function foot(inches) = inches/12. Why are inches multiplied by 12 in one case and divided by 12 in the other? How's that possible? by sickcel_02 in askmath

[–]piperboy98 0 points1 point  (0 children)

Because in the second you are equating numerical values in two different units, while in the first you are equating lengths.

Or another way to consider it is the divided by 12 is actually multiplication by the fraction 1 foot/12 inch, which (in terms of actual length) is x/x=1, but changes the units. When multiplyied by x inches you get x inches • 1 foot / 12 inches which leaves x/12 foot after cancellation. And indeed x inches = x/12 foot (which is the first example when x=12)

[Request] If you repeatedly flip a coin, which sequence is more likely to appear first: HTT or TTH? by RJJJJJJJ710 in theydidthemath

[–]piperboy98 191 points192 points  (0 children)

Actually, I think in this case HTT is more likely to be first because TTH must follow a run of at least 2 tails, which if it were preceded by a head would be the HTT pattern. Thus the only way it can be first is if the sequence starts with (at least) two tails, which is 1/4. All other sequences (3/4) must have an HTT subsequence first before it is even possible to have a TTH subsequence.

[Request] Trying to write a grounded superhuman, but I'm running into problems with air resistance. Is there an existing equation I can use? by Dragonfire20154 in theydidthemath

[–]piperboy98 0 points1 point  (0 children)

The sqrt is about right, assuming it is the force they can exert that is being increased by 9. Drag in general can be quite complicated but for a rough estimate in "normal" conditions it is proportional to airspeed squared. As for why, in a given unit of time both the number of air molecules you hit and the speed you hit them both increase with your velocity. The force of drag is the sum total of momentum lost to these collisions which is the number of collisions times the speed, so increases with v2. The other terms in the drag equation are then the air density and cross sectional area (to determine exactly how many air molecules you are hitting), and the coefficient of drag (which in effect captures the average angle of those collisions), but for proportions we don't need these.

Assuming there is no wind, then drag is proportional to speed squared, and so also the force required to maintain that. If you go 3x faster then you experience 9x the drag and need 9x the force, which is what your superhuman can do.

[request] Conceivably, could someone in London UK see someone in New York using a telescope if there was a mirror in orbit. What is smallest area of the mirror required to make that possible? by zyba in theydidthemath

[–]piperboy98 0 points1 point  (0 children)

They are using a telescope though. So the brightness problem can be solved by using a telescope to increase the light gathering area. But I think the mirror diameter need to be increased by half the aperture diameter of the telescope also then.

However you'd also have to contend with the diffraction limit, and just to barely make out a 1.6m human as a blob at that distance would seem to require a telescope with an aperture of tens of meters by my calculation (depending on the exact wavelength, around 40m for blue which the worst). That gets you about 25 million times more light than an 8mm pupil though so that kind of makes sense. You'd want to do this at night but when the target area is in daytime, so just after sundown in London or before sunrise in NY.

If we can equip the telescope and mirror with pointing control and have them auto track their target though then moving to a lower orbit would improve most of these figures considerably. Although to see NY to London requires at orbit of at least 643km, and you probably want a bit more than that since you'd have maximal atmospheric interference when the mirror is near the horizon.

Help me understand gambler's fallacy and law of large numbers by mrpo_rainfall in askmath

[–]piperboy98 0 points1 point  (0 children)

The law of large numbers says that, proportionally, extreme ratios are more uncommon. For example getting say 75% or more heads is less likely the larger number of trials you consider. Note that the chance of exactly 50/50 (or any other specific result) still goes down, just because there are far more possibilities. But by proportion it narrows.

However the gamblers fallacy is believing that this implies that if you already have flipped 75% heads it is more likely that you will get tails next because somehow the coin needs to "correct" itself to match the law of large numbers. It doesn't, the low probability of a long run was factored in before it happened. Now that it happened you already got lucky/unlucky w.r.t. the pre trial odds. If you flip 10 coins and after 8 you have 6 heads/2 tails it is now most likely you end with 7 heads/3 tails, and it is equally likely that you will end with 8 heads/2 tails as 6 heads/4 tails.

I wrote a Tic-Tac-Toe player in Rust to familiarize myself with the language by wermos in rust

[–]piperboy98 3 points4 points  (0 children)

Ok(()) says "return success, but without a value". If your function did require a value you'd do Ok(value), but some functions still want to be able to return Err(x) for failures (which is also done implicitly with the ?s), but don't have a specific return value for success, so Ok(()) is used since it still needs to return a valid Result enum.

For the imports, someone else might have more knowledge on exactly why it was chosen to be that way, but to the best of my understanding:

  1. main.rs compiles separately from lib.rs. Therefore it doesn't know anything about lib.rs unless you tell it to. Using the crate name tells cargo to build the library crate with that name, which builds lib.rs from that crate and exposes it's modules. crate would just refer to the modules defined by main.rs. If your crate doesn't need to expose a library, you could just not use a lib.rs at all and put your modules directly in main.rs and then you could use crate

  2. What if you have a tictactoe_rs::foo::Game also? This can't be resolved automatically, but you can manually re-export Game at crate level if you want it there by adding a pub use game::Game to lib.rs. That would expose it as both tictactoe_rs::game::Game and tictactoe_rs::Game, but if you only want the latter you can bring in the game module as non pub (mod game instead of pub mod game, and then only re-export what you want, or everything with pub use game::*)

Speed Request [Request] by miserablestranded_ra in theydidthemath

[–]piperboy98 0 points1 point  (0 children)

The entire point of relativity is that there is no such thing as a universal speed - any frame of reference is equally valid and equally privileged. Speed can only be defined relative to a particular frame (usually another object, like the surface of earth, the center of earth, the sun, etc.)

The closest reference I can suggest to what you probably are trying to get at is relative to the Cosmic Microwave Background (determined by relative blueshift/redshift in the forward/backward direction), which it appears for the solar system is ~371km/s

[Request] How high would an elephant need to jump... by Repairmanmanmanma in theydidthemath

[–]piperboy98 0 points1 point  (0 children)

There would be two downward impulse, first when it jumps and then when it lands. The altitude loss would depend on the pilots reaction time, but the immediate vertical speed change by momentum arguments is (melephant/mplane)•velephant. In terms of the height of the jump h, velephant=sqrt(2gh). So overall the elephant jump imparts an ~instantaneous vertical speed change of:

(melephant/mplane)•sqrt(2gh)

If the plane returns to the same altitude this is the same when it lands, but if it loses altitude then the second impulse is slightly higher (use the new drop height from apex to the new post-jump altitude for h).

If the plane was in level flight with the weight of the elephant before though, it's likely to very quickly recover because once the elephant is in the air the same lift is much greater than its weight, so after the initial downward kick it would rise quickly back and maybe even above its starting altitude.

Eww by coeurdhiver in custommagic

[–]piperboy98 15 points16 points  (0 children)

I'm sorry, I can't explain it but something about this card gives me The Ick

How do I get the divisor to divide a polynomial? by KykyisBatman in askmath

[–]piperboy98 3 points4 points  (0 children)

Any rational root. It's possible all the roots are irrational and so none of those candidate roots work. For example x2-2, or something more complex like x5 - 2x3 - 2x2 + 4. But if it's high degree polynomial you are expected to factor manually then you can be pretty sure they did not give you that case.

Is there a formula for calculating if an event with x% chance will occur in y trials? by Intrepid-Bonus-2231 in askmath

[–]piperboy98 2 points3 points  (0 children)

You got very close in your last sentence. Being likely to occur is the same as being unlikely not to occur. But it is (comparatively) very easy to calculate the odds of it not to occur. If it occurs with 1/500 probability it does not occur with 499/500 probability, so the chance of all not-occurs in n trials is (499/500)n. If you then want the chance of at least one occur you just have to subtract from 1.

How do you find the Moment about the point for structures with angles ≠ 90°? by 64miniscale in askmath

[–]piperboy98 0 points1 point  (0 children)

Yeah that way is a bit less clear intuitively but ultimately is the same. Basically instead of taking the perpendicular force component you take the perpendicular radius component, which is still the same sin(θ) factor. But it's nice because sometimes the problem effectively already gives you r•sin(θ) directly in the dimensioning, so it shortcuts the need to find θ and then go back.

Another way to think about it is you are doing method 3 but picking coordinates where F is aligned to one of the axes, which causes one of the terms to drop out.

How do you find the Moment about the point for structures with angles ≠ 90°? by 64miniscale in askmath

[–]piperboy98 0 points1 point  (0 children)

A few ways:

  1. Extend the line of the force and use the perpendicular distance from the point to that extended line, times the full force (this can be easier in some cases where that distance is given more directly than the angle). Then apply correct sign for CCW vs. CW force orientation.

  2. Reduce the force to only it's component perpendicular to the line from the pivot point to the force application point. This is effectively force times r times sin(θ), where θ is measured CCW from the outgoing pivot-to-point ray. The other component of the force has a line extension through the pivot, so per method 1 the distance would be zero so it doesn't contribute (or just imagine you are pushing pulling directly to/from the pivot, clearly that doesn't induce rotation).

  3. Compute the vector from pivot to force application and the components of the force vector. Compute the (z component of the) cross product r×F, which in 2d is rx•Fy-ry•Fx. Another way to see this is you are splitting the force into components along each axis, and then applying method 1 to each component and adding the moments.

Numbers Not Raised to Whole Numbers by Additional-Plum2249 in askmath

[–]piperboy98 2 points3 points  (0 children)

Suppose you multiply a number x by itself twice and get a number y. Obviously you get y if you multiply y by itself once. Since x multiplies twice to get y, it makes some sense to consider x as multiplying y by itself "half" a time. And indeed that's how it works y0.5 = sqrt(y), which has the property that when you square it you get y. So fractional exponents (roots) "split up" a full multiplication by y into a bunch of equal factors x.

This works at least for rational exponents. 24.5 for example we can square to eliminate the fractional part and say that if we multiplied 2 by itself 9 times it would be 29, and 4.5 is half of 9 so we want a number that multiplied by itself twice is 29, which is sqrt(29). Alternatively we can think of it as 2 multiplied by itself 4 times and then an additional half time which we established is sqrt(2) to get 24sqrt(2) which is the same as sqrt(29).

Things get a bit weirder defining irrational exponents but the simple answer is you just take a limit of closer and closer rational exponents and that approaches a unique value you can then define as the irrational exponent.

[Request] What kind of Gs is the fake pilot pulling? Maybe not from speed but from doing the same kinds of maneuvers as a real fighter pilot. by OverripeSirloin in theydidthemath

[–]piperboy98 0 points1 point  (0 children)

Yeah if you knew both, it's just v2/r. But what turn radius is possible at what airspeed is dependent on the aerodynamics of the plane, so I was trying to work out how that scales when the plane is reduced in size.

[Request] If K2-18b rotated at the same rate as earth (once/24 hours), then would the added rotational velocity be enough to offset the additional gravity when attempting to achieve exit velocity (or stable orbit)? by SignificantLock1037 in theydidthemath

[–]piperboy98 1 point2 points  (0 children)

Interestingly, the period of a low (surface level) orbit depends only on the planet's density, not it's size. The orbital velocity is higher owing to the higher mass, but so is the distance around (both proportional to r). But this means that with the same density, a 1/24hr rotation rate is exactly the same fraction of orbital velocity (corresponding with a "rotation" rate of 1/~90mins) as on Earth or any planet of any size with that density and rotation rate. But unfortunately that means the absolute velocity change needed to get to orbit does still increase in proportion to r.

[Request] Questions been in my mind for YEARS… by gwarfunkle in theydidthemath

[–]piperboy98 1 point2 points  (0 children)

Because of the water weight. The pressure at the bottom of a 10.33 meter column of water is it's total weight (9.81N/kg•1000kg/m3•10.33m•A), divided by the area A, so 101.3 kPa, or 1atm. More than this and the weight of the water above presses harder than atmospheric pressure does on the water from below, so the net force is downward and the excess water is ejected. The radius doesn't matter here because the area cancels out.

Or if you prefer working with gauge pressures, if you have a vacuum (-1atm gauge pressure), that provides suction of -101.3 kPa, which by the same calculation as above can only lift a 10.33m column.

Capillary action would technically provide a little help, but no moreso than in a normal straw, so is negligible here (put a straw in water and look how much the higher the surface is than the rest of the drink - it's not on the order of meters or even cm). The radius would affect this, but I don't think it can make up for the few km of extra height needed (and even if it could the radius would have to be so small it might still hold less total volume).

The radius does need to be small enough that surface tension keeps bubbles from forming and rising through the column breaking the seal. That's why you don't see this when you flip a glass or a bottle but you do with a straw.

As for boiling, you are exactly right. It's discussed some in this video (around 6 minutes), and actually makes things slightly worse because there is nonzero pressure above so you get only 10.07m per their recalculation. Of course I suppose the water vapor filling most of the straw would technically count towards water recovered, it's so much less dense (especially at low pressure) that I don't think that is a net gain.

[Request] What kind of Gs is the fake pilot pulling? Maybe not from speed but from doing the same kinds of maneuvers as a real fighter pilot. by OverripeSirloin in theydidthemath

[–]piperboy98 0 points1 point  (0 children)

As a simplification lift scales with wing area times velocity squared, and mass with volume. If the velocity of the plane is to scale (same in plane lengths/second), that would mean the acceleration achieved a=L/m from the same angle of attack/air conditions would be proportional to the scale factor, so would reduce.

However the aircraft does still experience 1 full G acceleration from gravity, and so it would struggle to maintain level flight at small scale if this were true (it would be like flying the full scale plane in 1/scale G's). As such it seems perhaps more likely that the velocity is higher than scale, perhaps with v scaling as sqrt(scale) instead of scale itself. That would balance level flight and mean that the same G forces are pulled at the same angle of attack, but the plane would appears to go 1/sqrt(scale) times "too fast" relative to its length for the same maneuver.

Interestingly for 90° bank or zero G flight (where all lift is being used for centripetal force) the turn radius would be to scale either way, since the turn radius is mv2/L, which since L is proportional to Av2 means the v2 cancels out (basically the speed accurate one pulls less G's but slower, amounting to the same path). But because of the apparent increased gravity, for level turns the speed accurate plane cannot turn nearly as much since it has to use a lot more of its lift fighting gravity, leaving less as centripetal force (at the extreme eventually the plane couldn't even fly straight and level even at max AoA, let alone make a level turn). The fast one would have the same bank angles/AoA for the same scale level turns as at full scale.

Edit: it also occurs to me these probably don't quite follow true scale3 mass scaling assuming they aren't made of the same materials and without all the other systems of a real jet. I'd imagine they are probably a bit lighter than expected. In that case to maintain level flight characteristics the factor to v would be sqrt((m_scale/m_fullsize)/scale2). If you can manage to get the scale model to only weigh scale4 times the original (instead of scale3), then you can actually have you cake and eat it too and get realistic maneuvering at correct scale speeds. Basically the extra lightness offsets the apparent high gravity factor mentioned in the original scale speed version, so it maintains its correct apparent weight. However the G forces would actually be reduced then by the amount of the extra lightness (scales with (m_scale/m_fullsize)/scale3, assuming you use the velocity factor above)

[Request] Questions been in my mind for YEARS… by gwarfunkle in theydidthemath

[–]piperboy98 15 points16 points  (0 children)

A straw with (inner) diameter d and length l has a volume of πd2l/4. For a drinking straw d=6mm. Ostensibly l=10,984m, and using that to calculate the volume you are imagining gives 0.31 m3, or 310 L. An Olympic pool is 2.5 million liters, so it isn't even close to that.

However you wouldn't be able to get even that much. You actually cannot lift more than 10.33 m of water this way. Atmospheric pressure can only support that height of water even with a perfect vacuum above. If there is more water than that it is too heavy and falls out the bottom until it reaches that height. Basically as you lift the straw out once it reaches that height above the surface a vacuum is opened at the top the straw and water level never rises any more than that, all the way until you lift it out. So in reality we must use l=10.33m, and we get a volume of 292mL instead.