Wikipedia:Reference desk/Archives/Science/2013 September 12

= September 12 =

attraction of two masses
two particles of masses 4kg and 6kg are at rest separated by 20m.if they move towards each other under mutual force of attraction the position of the point were they meet is. — Preceding unsigned comment added by 117.213.217.180 (talk) 05:51, 12 September 2013 (UTC)
 * I added what I assume is an appropriate title to your question. Please change it if I'm wrong.  BTW, we don't do people's homework for them Rojomoke (talk) 06:47, 12 September 2013 (UTC)
 * F = ma. d = t(υ0 + Δυ/2), υ = υ0 + at. Both masses will accelerate as they approach the common coordinate. Combine these formulae for each mass, remembering that force and time are equal in magnitude for both masses, and substitute into the other. using the constraint that both masses must travel a total distance of 20 m. Plasmic Physics (talk) 07:35, 12 September 2013 (UTC)
 * You should find that, this procedure of combining the formulae should yield a simple ratio. Plasmic Physics (talk) 07:46, 12 September 2013 (UTC)


 * ... or you can use the fact that in the absence of external forces the centre of mass of the two particle system will remain at rest (since it is initially at rest). Gandalf61 (talk) 09:06, 12 September 2013 (UTC)


 * ... yes, Gandalf61's method is much easier! (If you want to do it the algerbaic way, you can choose any force you wish [F>0] between the two masses and you will get the same answer in the end.)  Let is know how you get on and if you need further help.    D b f i r s   11:54, 12 September 2013 (UTC)


 * Eh? If you follow my method, you don't even need to find value of Ft2. It cancels out under the substitution part. Plasmic Physics (talk) 12:23, 12 September 2013 (UTC)
 * Since υ0 = 0, υ = at, and d = tυ/2. Thus υ = Ft/m, and thus d1 = Ft2/(2m1), d2 = Ft2/(2m2). Get the idea now? Plasmic Physics (talk) 12:30, 12 September 2013 (UTC)
 * OK, only a bit easier if you do the cancelling first in your method. I've striken my "much".  It all depends on what the OP knows and whether their algebra is as good as yours.    D b f i r s   12:40, 12 September 2013 (UTC)


 * I would not consider myself "good" at algebra, I am merely using it to the standard level required when one wishes to study the sciences in secondary school in New Zealand, which is not to say that I have not surpassed that level in mathematics as an university undergraduate. Anyways, I chose the long way around, because algebra is a natural fallback point for anyone who doesn't remember the derived formulae such as the centre of mass. Plasmic Physics (talk) 21:37, 12 September 2013 (UTC)

Body weight
I have heard that, if you weigh yourself daily, it is best to do so in the morning (since a person's weight will be lowest in the morning). Is this true or just a myth? If true, why would it be the case that you weigh less in the morning? Thanks. Joseph A. Spadaro (talk) 15:16, 12 September 2013 (UTC)
 * Mostly because you haven't drank anything in eight hours. But you've still lost moisture to sweat, breath, etc. APL (talk) 15:45, 12 September 2013 (UTC)


 * I don't have my sources on hand right now. But one of the reasons people record lower weights in the morning is that it's typically done after urinating and before eating. Also, it's about 9 - 10 hours since your last meal so you would have lost some weight due to perspiration and the fast since yesterday's cup of tea. Btw, I think the reason the morning is the best time to weigh yourself is due to the morning weight being the least volatile from day to day. Your weight at say 13:00 may vary from day to day due to your eating / expulsion habits changing each day. Zain Ebrahim (talk) 15:49, 12 September 2013 (UTC)

Thanks. That all makes sense. On a related note, what would be the expected variation in weight that one would see from a morning weighing versus another time of day or night? Perhaps a pound or two? The variation will not be particularly high, correct? Thanks. Joseph A. Spadaro (talk) 19:03, 12 September 2013 (UTC)


 * It can be quite a bit. That's why you should weigh yourself daily - but calculate about a ten day "moving average" to see what the trends are.  But yeah - morning weights (after first pee - before first drink) are the most reliable - particularly if you're someone who poops on a fairly regular schedule (ie once per day).  I strongly recommend The Hacker's Diet - which goes into this in the kind of detail that only a geek could love!
 * For an average human, each day, 2.5 lbs of food, 9.2 lbs of water and 1.8 lbs of oxygen enter your body and 0.3lbs of poop, 11 lbs of water (pee, sweat, etc) and 2.2 lbs of CO2 leave your body. So, as you  can see, to get consistency, you need to have not drunk a lot recently and have just emptied your bladder.  Hence first thing in the morning is the best time.  It's not just that your weight is the lowest - but it's definitely when it's at it's most consistent from one day to the next.
 * SteveBaker (talk) 20:30, 12 September 2013 (UTC)
 * The figures given above for daily consumption and expulsion are those given in The Hacker's Diet, which can be read online and which is worth reading if you are interested in weight fluctuation (though it is somewhat verbose). The author attributes the in/out figures to a paper given at a NASA conference on human exploration of Mars (Mars Mission Life Support, by Dr. Penelope J. Boston, National Center for Atmospheric Research, in The NASA Mars Conference, Duke B. Reiber, ed., Volume 71, Science and Technology Series, American Astronautical Society, San Diego, 1988. ISBN 0-877703-294-7.). The figure given for feces seems rather low (from a casual observation of volume and tendency to sink in water). Given this and the likelihood that Martian explorers might want to recycle water, I wonder if the 0.3 lbs could refer to dried weight. Could anybody confirm or deny this? --catslash (talk) 10:20, 13 September 2013 (UTC)
 * Yes, that seems to make sense. The sums must balance. It's 13.5 lbs in, 13.5 lbs out. The 2.5 lbs of food breaks down into 0.3 lbs of poo, 0.4 lbs of carbon bound to oxygen to make CO2, and 1.8 lbs of water. --Stephan Schulz (talk) 12:28, 13 September 2013 (UTC)
 * Stupid of me not to think of applying stoichiometry. However your breakdown seems to be based on 2.2 lb of CO2 minus 1.8 lb of O2 = 0.4 lb of C, whereas in fact 2.2 lb of CO2 = 1.6 lb of O2 + 0.6 lb of C, which means that 0.2 lb of O2 must go somewhere else. I can only assume that in addition to C, we also burn 0.025 lb of H from the food to make some of the water? Still, this doesn't change the final conclusion much: the figure for food includes nearly 1.6 lb of water, whereas the figure for poo is dried weight. --catslash (talk) 23:42, 14 September 2013 (UTC)
 * Probably the figure for water excretion includes water in the poop...but yes, I found that data in The Hackers' Diet - and they got it from NASA (sorry, I should have made that clear!). It's also not clear whether the 2.5 lbs of food includes water inside the food - or whether that's also a dry weight.  I would imagine that from the perspective of the original source, both food intake and poop are dried weights because that's what would interest Mars Mission life support.  You'd quite likely want to supply dried foods wherever possible in order to save weight on launch from Earth and you'd certainly have to recycle water from everywhere - so in the absence of other information, I would definitely assume that these are both dry weights.


 * However, even if both food and poop are 50% water - that only accounts for a pound or two of variation. The dominating factor in daily weight fluctuations has to be the water that you drink and pee.  They still totally dominate the potential daily fluctuations.  So weighing yourself just after peeing - and as long as possible after the last time you drank anything gives you both the lowest weight of the day - and more importantly, the most consistent weight from one day to the next.  Weighing yourself first thing in the morning after your first trip to the bathroom is clearly the best way to assure that.


 * Despite that though, my morning weight bounces around by three to five pounds one one day to the next - so calculating a moving average is essential to getting the best estimate for your progress when dieting. A "sensible" diet plan should allow you to comfortably lose around 1 lb per week - but that loss rate is hard to see in data that's bouncing around by between three and five pounds every day because of water imbalance.


 * Many dieting books tell you to only weigh yourself once a week because of this fluctuation - but that's ridiculous advice because if you happen to hit a low value one week, then a high one another, you'll imagine that you're gaining or losing weight at an alarming rate! Any decision you take about dieting based on such useless data is guaranteed to be wrong.  Sadly, most people are mathematically-challenged, so telling them to calculate moving averages is kinda useless advice too.  What we really need are bathroom scales that do the calculation for you - displaying a daily weight and a moving average weight.


 * SteveBaker (talk) 14:19, 13 September 2013 (UTC)


 * Steve, please read my reply above. The sums work out fine if food is "wet weight", poo is "dry weight", up the the stoichiometry of Carbon oxidization. As for the moving average, what you really want to do is use a Kalman filter (or a similar filter with the error model of the scales build in, and with a non-linear basic model if you want to be uber-pedantic). Use of a Kalman filter will result in the optimal estimate for the current weight, while the moving average will always trail behind your true weight. --Stephan Schulz (talk) 14:33, 13 September 2013 (UTC)


 * You could also try to use pressure sensors in your shoes and write some app to let your i-phone record and process the data. Then you could detect the rapid weight changes every time you go to the toilet and every time you eat and drink or lose weight due to sweating when exercising. The app will obviously detect whether you are sitting or walking, when you are walking it can calculate the weight by averaging over the pressure. Count Iblis (talk) 15:41, 13 September 2013 (UTC)


 * Yes, you're right. The Hacker's diet does explain how to compensate for the lag in the results from a simple moving average - and it also tweaks the approach by putting more weight on the more recent samples.  I forget the details.  If you care, read the book - it's a very quick read.


 * Personally, I use a moving average just because I can calculate it in my head at 6:30am! I chose to use a 10 day moving average simply because I can subtract my weight today from what I wrote down 10 days ago, divide by 10 and subtract the result from yesterday's moving average.  That approach accumulates rounding error - so once in a while, I'll add up the last 10 days "for real" and use that number from then on.  I'm aware of the lag - but I don't particularly care about it.
 * When I'm trying to lose weight (and I'm already down about 50 lbs after a year of doing it), I do hit the 1 lb/week target fairly accurately and I could probably go several months without even bothering to weigh myself and still be on target to within a pound or two. I don't count calories in any precise manner either - once you get into the groove, you pretty much know the calorie values of the most common things you eat and choosing "round numbers" for snacks and such is sufficient.  The occasional meal out simply gets ignored because I don't do it often enough to affect the overall trend.  The main reason to weigh myself at all is to keep track of changes due to the fact that as my weight decreases, my calorie intake has to get gradually smaller - and there are differences between summer and winter too.


 * The trick here is to rely on long term trends and to take the long view. Uber-careful tracking of weight is only important during the 'calibration phase' when you're figuring out what your daily food intake has to be to achieve the 1 lb per week loss rate...using fancier math at that point is probably justified.  Once you know what you can eat, you'll lose weight at the predicted rate so long as you stick to the approximate number of calories that you found will work. SteveBaker (talk) 15:54, 13 September 2013 (UTC)

Thanks for the useful and helpful information, especially for pointing out The Hacker's Diet. Much appreciated! Thanks! Joseph A. Spadaro (talk) 13:05, 15 September 2013 (UTC)

Cats and Dogs
Can someone please tell me why, in nature, varieties of cat, like lions and tigers, are so much larger than varieties of dog like wolves. Is there an inherent limit, I wonder, to how large a 'wild' dog can be? I was also thinking of the various monsters, say in 18th Century France, that turned out to be enormous wolves. — Preceding unsigned comment added by 109.12.64.88 (talk) 15:18, 12 September 2013 (UTC)
 * Well, the simple answer is that all dogs and wolves are basically the same species. A species with a surprisingly diverse number of breeds, but still one species.
 * Cats actually show less variation if you only consider the ones that are the same species as a house-cat.
 * For example, a house-cat and a lion share the same family (Felidae), but not the same species.
 * So where are the giant, more fearsome members of the Canidae (dog-like) family? Extinct mostly. Check out the Dire Wolf. APL (talk) 15:40, 12 September 2013 (UTC)
 * Still, as far as I know, the largest Canids are smaller than the largest Felids, even counting all known extinct species. As for "inherent limits" -- I think not. I think the size difference has more to do with adaptive radiation and ecological niches, perhaps influenced by other factors, such as how sociality tends to be a little different between the Felid and Canid clades. SemanticMantis (talk) 16:12, 12 September 2013 (UTC)
 * yeah, from our Dire wolf article, "weighed between 50 kg (110 lb) and 79 kg (174 lb)." while our Saber-toothed_cat article lists several species from 190 kg up to 400 kg, which seem to more or less overlap the dire wolf in time and geography. Gzuckier (talk) 03:08, 14 September 2013 (UTC)
 * From the evolutionary standpoint, the largest "dogs" are seals and bears. Indeed, the split between Feliformia and Caniformia occurred earlier than the split between Canidae and Arctoidea. Large size of largest seals, bears, and cats is almost certainly an adaptation to being a solitary apex predator, as SemanticMantis has already noted. --Dr Dima (talk) 18:54, 12 September 2013 (UTC)
 * Another factor contributing to the large size, at least in some of these, is a Sexual selection. Species in which solitary dominant males fight for reproductive rights, tend to have much larger males than females. However, the trend towards progressively larger males can drive the average female size up, as well (both because of the shared genes and because of the evolutionary pressure to produce and care for larger offsprings). --Dr Dima (talk) 20:46, 12 September 2013 (UTC)
 * from a handwaving evolutionary viewpoint, it's related to the observed cycle that with lots of food, species evolve to larger size which makes them more successful at killing prey, avoiding predators, and fighting off competitors of the same species for territory, reproduction, etc., while when times get tough species evolve smaller, since the ability to survive on less food trumps the above when food is the limiting factor.
 * the theory would therefore suggest that, while felines are subject to this rule and will therefore grow as large as possible consistent with the food supply in their niche, canines have an escape clause in that if a pack of medium size canines would be at least as efficient as the same mass of large individual canines in hunting, protecting against predators, and guarding territory, they would also keep the advantage of being less sensitive to temporary food shortages. Note that this would seem to apply to humans, also...Gzuckier (talk) 02:52, 14 September 2013 (UTC)

Polyhedron-polyhedron intersection?
Is there a simple algorithm for detecting whether or not two polyhedra intersect? I don't necessarily need to know HOW they intersect (ie: the resulting polyhedron of intersection) so much as THAT they intersect. Any tips or links would be much appreciated! 64.134.148.66 (talk) 19:29, 12 September 2013 (UTC)


 * This might be one for the math desk - but here goes anyway:


 * For convex polyhedra - it's relatively simple - for arbitrary concave ones - and especially the really nasty ones with holes and such, it's much harder. Generally, it's easier to try to split a non-convex polyhedron into a bunch of convex ones and to test the resulting debris.


 * The Hyperplane separation theorem is the key here. It says that if two (convex) polyhedra do not intersect then there is an infinite plane that lies between them.  In this case, such a plane can always be found fairly easily because it can always be the plane containing one of the faces of one of the two polyhedra.  So for two polyhedra, A and B, then naively:
 * Calculate the plane equations of every plane in polyhedron B.
 * Substitute all of the vertices of polyhedron A into all of the plane equations from polyhedron B to get the signed distance between each vertex of A and the planes running though each of the faces of B.
 * If any plane of B is positioned such that ALL of the vertices of A lie on the outside of it (ie have a positive distance from it) - then there is no intersection and you can stop testing.
 * If you didn't find any separation plane in B, swap A and B and repeat.
 * If neither polyhedron contains a separating plane - then they either intersect or one is entirely inside the other (you can test for the latter case separately by checking that all of the vertices of one of the polyhedrons lie inside all of the planes of the other).
 * You can save time by computing one plane and one set of distances at a time - and doing an "early out" if one of the vertices has a negative distance to that face. If you know the surface normals for each face then there are possible optimisations there too.
 * If performance matters to you, you'll want to compute the bounding sphere of each polyhedron and check to see if those overlap first - if they don't, then you're done.  That's a spectacularly fast test and allows you to only have to compute the more difficult algorithm when the two objects are relatively close to touching.
 * Another approach for concave polyhedra is to test whether any edge of one polyhedron penetrates any face of the other. Again, you calculate the plane equations for each face, but now you test the signed distance for the vertices at the ends of each edge of the other.  If the edge straddles the plane (one positive and one negative result) then you have to find the intersection point of plane and edge and determine whether it lies inside or outside of the face...which is easier if you first decimate your polygonal faces into triangles.  If any edge straddles any plane and intersects the face - then it's a collision.
 * In all of these algorithms, there are ikky special cases when two faces or two edges just touch and are parallel - when one object is entirely inside the other of if two polyhedra with the topology of a torus are linked into a chain...and so forth. Numerical rounding errors are also out there to bite you...so you have to take special care with how you decide things like "inside and outside" to be highly consistent.
 * SteveBaker (talk) 20:10, 12 September 2013 (UTC)


 * Doesn't the edge-penetrates-face test err if one polyhedron is totally inside the other, falsely reporting there's no intersection? -- Finlay McWalterჷTalk 20:16, 12 September 2013 (UTC)
 * Yes, it does...but are we testing the surfaces or the volumes? SteveBaker (talk) 20:18, 12 September 2013 (UTC)


 * (ec) This page lists various papers which give algorithms and/or code for calculating intersections of various objects, and gives several sources for polyhedron/polyhedron intersections. I'd imagine most real-world scenarios will first attempt to trivially reject cases with bounding-box intersection tests; many will also try to limit expensive tests using a more sophisticated spatial partitioning like octrees or binary space partitions. -- Finlay McWalterჷTalk 20:12, 12 September 2013 (UTC)
 * Yes - in something like a computer game - those are all good strategies. Also, things like "if A and B were X units apart last time we checked and neither of them has moved more than X units relative to the other - then they still don't touch." - temporal checks and caching plane equations and things like that can speed things up immensely.  Also, many of these calculations can be done on the GPU instead of the CPU - which speeds things up by at least one or two orders of magnitude.  This is a topic of study all to itself.  There are people who make careers out of nothing but collision detection tests! SteveBaker (talk) 20:22, 12 September 2013 (UTC)

Hey, thanks everyone. Great info, I think I have enough to get started with now. Cheers! 24.153.183.22 (talk) 21:24, 12 September 2013 (UTC) (formerly known as 64.134.148.66)


 * For convex polyhedra it can be treated as a simple linear programming problem: each planar face gives rise to a linear constraint that a point must be on one side of the face (i.e., inside its polyhedron or on the face). Iff the polyhedra intersect, there will exist at least one point that is on or inside of both polyhedra. So one just needs to do Phase I of a linear programming problem -- find a feasible point or show that none exists. Duoduoduo (talk) 19:03, 13 September 2013 (UTC)

Transmission of blood groups
How is the heredity of blood group determined, is it matriarchal or patriarchal? If, for example, my mother's blood group was B positive, what would mine be? --TammyMoet (talk) 20:33, 12 September 2013 (UTC)
 * Like all normal genes, inheritance is from both parents, so it depends on the father as well. Neither A or B is dominant over the other (they are codominant), and can both be expressed. If the father is A or AB, any combination is possible. O or B in the father and only O or B are possible for the child. Rhesus inheritance (the 'positive' part) is simpler, rhesus factor in either parents will normally lead to the child being positive too. As another example, I myself am AB-, so any children I have can have any of the combinations of blood types, but can only be rhesus positive if their hypothetical mother is rhesus positive. Fgf10 (talk) 20:52, 12 September 2013 (UTC)
 * To expand on that, you have two genes for ABO blood type (one from each parent) and two genes for the Rh factor (again, one from each parent), neither of which is sex-linked. The Rh+ is dominant over Rh-. So a Rh+/Rh- person would be 'Rh+' phenotypically (as would a Rh+/Rh+ person). To be Rh-, you must have inherited one Rh- gene from each of your parents. (Your parents would have to be either Rh-/Rh- or Rh+/Rh-) ABO typing is a little more complicated. Each of the A and B genes is dominant over the O gene, but they're codominant with each other. So an A/O person is phenotypically A, but an A/B person has the AB bloodtype. - So to determine what possibilities there are from a given pairing, you simply have to enumerate the hidden gene possibilities, and their combinations (regardless of which parent they come from). For example, if your mother was B+ and your father was B-, your mother could be B/B or B/O and +/+ or +/-. Your father could be B/B or B/O and has to be -/-. If you take one allele from each group from each parent (each combines individually), their children could be B/B, B/O or O/O and either Rh+/Rh- or Rh-/Rh-, leaving you with the possible phenotypes of B+, B-, O+ or O-. Note that additional information could rule out possibilities. For example, if both maternal grandparents were AB+, then you know your mother couldn't be B/O, so you being O/O is ruled out. -- 205.175.124.72 (talk) 21:35, 12 September 2013 (UTC)
 * If you're AB than you cannot have children with blood type O. Dauto (talk) 21:13, 12 September 2013 (UTC)


 * Our article ABO blood group system may be of interest to you, especially the section on Distribution and evolutionary history. The table in the subsection "Pattern of blood group in ABO blood group" shows the possibilities based on parents' genotypes. If you're mother has type B, you may have any of the four groups (A, B, O or AB) because type B can result from either (BB) or (BO) genotypes. Knowing your father's blood type may help narrow it down, but it would still be impossible to determine without a blood test.--William Thweatt TalkContribs 21:16, 12 September 2013 (UTC)


 * (e/c) There is an error in Fgf10's answer: the statement "rhesus factor in either parents will normally lead to the child being positive too" is wrong, as two Rh(D) positive parents can have an Rh(D) negative child. First, to simplify matters, I'll limit the discussion to the common cases, as there are plenty of details and "weird" genes. The first thing to note is that the A and B antigens are made up of carbohydrate chains. There is no O antigen. However, a person of blood type O expresses the H antigen, which is also a carbohydrate (again ignoring rare variants). However, genes encode proteins, not carbohydrates. So the A and B genes encode glycosyl transferases, enzymes which couple new sugar residues onto carbohydrate chains. Both work on the H carbohydrate, and modify it in different ways, resulting in the A and B antigens. If you lack both the A gene product and the B gene product, the H-antigen is left unchanged. With the pluses and minuses, it's a different story. They refer to the presence or absence of a protein antigen called Rh(D), which sits in the erythrocyte cell membrane. The Rh(D) gene is missing or nonfunctional in Rh(D) negative individuals.
 * This results in the following possibilities for your ABO and Rh phenotypes: If your mother's blood group is B+ (B Rh(D) positive), she may be homozygous or heterozygous for the B allele, and homozygous or heterozygous for the Rh(D) allele. If she is homozygous for the B allele, you are certain to inherit a B allele, and if she is heterozygous, you may inherit either a B allele or an O allele (O = no functional A or B glycosyl transferase gene). In the case of Rh(D), if she is homozygous, you are certain to inherit an Rh(D) allele from her, and if she is heterozygous, you may inherit either an Rh(D) allele or no Rh(D) allele that is expressed. With no information about your father's genotype, and no information about whether your mother is homozygous or heterozygous, you may inherit any ABO phenotype and any Rh(D) phenotype from your parents. The only possibility we can exclude is you being homozygous for the A allele (i.e. if your phenotype is A, your genotype will be AO). --NorwegianBluetalk 22:37, 12 September 2013 (UTC)


 * Your mother could be BB or BO, but you could narrow down those possibilities if you know anything about her parents. For example, if one of her parents is type O or A, you know she's BO, and if both are type AB, you know she's BB.  (If both are B or one is B and one is AB you still don't know)
 * I should add that based on the ethnicity of your parents, you may be able to extract some information to make a fairly good guess of your blood type. Be sure to run the probabilities correctly with your mother since you know she is B positive -- for example, if an ethnic group's statistics are 50% O, 50% B as reported, the allele frequencies are actually sqrt(0.5)= 71% O alleles and 29% B alleles.  Knowing your mother is B would mean you know one allele is B, and the other could be either according to those probabilities (in the population there are 8% BB and 21% BO).
 * But yes, if she is BO and your father happened to be AO, you'd have an equal chance of being O, AB, A(O), and B(O). Wnt (talk) 00:01, 13 September 2013 (UTC)

Thank you all. This is fascinating. Unfortunately I have no living ascendants so can't ask anyone, and to my knowledge I have never been profiled. I shall follow the links too. --TammyMoet (talk) 09:31, 13 September 2013 (UTC)