Wikipedia:Reference desk/Mathematics
of the Wikipedia reference desk.
Main page: Help searching Wikipedia
How can I get my question answered?
- Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
- Post your question to only one section, providing a short header that gives the topic of your question.
- Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
- Don't post personal contact information – it will be removed. Any answers will be provided here.
- Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
- Note:
- We don't answer (and may remove) questions that require medical diagnosis or legal advice.
- We don't answer requests for opinions, predictions or debate.
- We don't do your homework for you, though we'll help you past the stuck point.
- We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.
How do I answer a question?
Main page: Wikipedia:Reference desk/Guidelines
- The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
January 22
Bra-ket notation in LaTeX
\left and \right are great, and work just as I expect for and . But when I put them together in a bracket, I'm at a loss what to do. Using an unadorned | gives me . Logically there should be something like \middle or \center, but the first doesn't exist and the second does something totally different. How do I tell LaTeX to automatically adjust the middle line to the correct size? —Keenan Pepper 04:17, 22 January 2008 (UTC)
- Do it manually with \bigm|, \Bigm|, \biggm|, or \Biggm| (whichever gives you the correct size). —Bkell (talk) 04:30, 22 January 2008 (UTC)
- Note that that's \bigm followed by a vertical line, not \bigml. Same for the others. —Bkell (talk) 04:31, 22 January 2008 (UTC)
- Unfortunately, it looks like Wikipedia's LaTeX renderer doesn't know \bigm and friends, so you have to leave off the m and just use \big or \Bigg or whatever: . —Bkell (talk) 04:34, 22 January 2008 (UTC)
- For non-wikipedia use, \vphantom is useful for making sure heights are done correctly.
\newcommand{\braket}[2]{\left\langle{#1}\vphantom{#2}\right|\left.\vphantom{#1}{#2}\right\rangle}
- Used like
\braket{\frac{tall}{side}}{wide~side}
- The short style file braket.sty can also be used, then the syntax is
\Braket{\frac{tall}{side}|wide~side}
JackSchmidt (talk) 06:08, 22 January 2008 (UTC)
- This \vphantom trick has a couple of shortcomings: It renders both halves twice (this can be solved with some clever box manipulation), and it doesn't get the spacing quite right around the middle bar. —Bkell (talk) 08:50, 22 January 2008 (UTC)
I just found out that my LaTeX distribution (TeX Live for Ubuntu) does have \middle and it works exactly as I expect! So, since these other solutions are unacceptable (the first doesn't actually do anything automatically, and the second sounds like a horrible kludge), my new question is: Why doesn't Wikipedia's TeX engine have this irreplaceable command \middle, and when is it going to get it? —Keenan Pepper 13:37, 22 January 2008 (UTC)
- The \middle that you have probably works in a similar but more complicated way as the "kludge" above, just behind the scenes. ;-) As for why Wikipedia's TeX engine doesn't have it, I don't know; there are other useful things that it doesn't do (like \textstyle). You can file a bug report if you like, and see if anyone picks it up. —Bkell (talk) 15:14, 22 January 2008 (UTC)
- The trick that Mathematica uses for similar notations is to write
\left\langle\left.foo\right|bar\right\rangle
. This sizes the vertical bar based on "foo"; you can of course move the fake "." delimiter to the right end if "bar" is (expected to be) bigger. --Tardis (talk) 17:31, 23 January 2008 (UTC)
- One time I needed a LaTeX command, put it on the talk page (leaving it a compile error) and it was there a few days later. No idea how it happened. I could guess someone came along, noticed the compile error and bumped it along to the right spot where the command was added. Pdbailey (talk) 20:24, 25 January 2008 (UTC)
can this diff eq be solved?
Does anyone have any suggestions on how to solve this non-linear second-order differential equation: where a and b are positive constants, and y is a function of x. Thanks. --131.215.166.106 (talk) 04:20, 22 January 2008 (UTC)
- Any constant will work, y=c. Black Carrot (talk) 08:31, 22 January 2008 (UTC)
- I'm trying to solve for when a=0, and I don't think it can be done in elementary functions. I have that y' = ce^(-b/2y^2) (please check), and the List_of_integrals_of_exponential_functions doesn't have anything good to say about that. Black Carrot (talk) 08:52, 22 January 2008 (UTC)
- When b=0, it's linear. y=cx^(a+1)+d, for constants c and d. Black Carrot (talk) 08:56, 22 January 2008 (UTC)
- Hey, I found another case. y=(a+2)/(bx). Black Carrot (talk) 09:35, 22 January 2008 (UTC)
- y=2/(bx+c) is good when a=0. Black Carrot (talk) 10:05, 22 January 2008 (UTC)
- I got my earlier formula for when a=0 wrong. It wouldn't be y' = ce^(-b/2y^2), it'd be y' = (-b/2)y^2+c, which is a lot easier to solve. Still hard, but easier. If you want to solve it yourself, it'll help to know trigonometric integrals, partial fractions, and separation of variables. Black Carrot (talk) 04:52, 23 January 2008 (UTC)
- You might find this helpful: [1] Black Carrot (talk) 05:03, 23 January 2008 (UTC)
- y' = f(y) is solved by x = ∫ dy / f(y). --Lambiam 08:49, 23 January 2008 (UTC)
Finding a definite integral
It's the night before my calculus final and I'm about to go to bed, but I'm just really bugged by this problem from a past final that I have no idea how to do:
∫0π/6 sec 2θ tan θ dθ
I know how to take definite integrals of polynomials and indefinite integrals of trigonometric functions, but this! We never learned this ... could anyone please show me at least how to set it up? Thanks so much in advance. —Preceding unsigned comment added by 70.19.20.251 (talk) 04:37, 22 January 2008 (UTC)
Could you do if it were indefinite?72.219.143.150 (talk) 04:40, 22 January 2008 (UTC)
- Yes, but when you're trying to evaluate a definite integral, other stuff comes into play, like a, b, ∆x, and ci, and I don't know how to "integrate" all that (terrible pun) with taking the antiderivative of trigonometric functions ... —Preceding unsigned comment added by 70.19.20.251 (talk) 04:44, 22 January 2008 (UTC)
Well, yes, but if you know the antiderivative of the function it is a small step to definite integration...I guess what I'm asking is if the disconnect is just evaluating it. Do you know the antiderivative of the function? Show me that. (oops, forgot to ask---is the tangent's argument 2θ as well? Try a u-substitution. 72.219.143.150 (talk) 04:49, 22 January 2008 (UTC)
- Is the problem or actually ? The latter would make more sense on an exam (at least, one I would write :P) and is easier to solve (i.e., it's ). Requiring the knowledge of some identity to rewrite in terms of a function of seems not so fun, I would think. Could you clarify this please? --Kinu t/c 04:51, 22 January 2008 (UTC)
Er, oops. Kinu, you got it. Lapse in my identities. I think the secant should be squared for this integration to be plausible on an exam.72.219.143.150 (talk) 04:53, 22 January 2008 (UTC)
- Yes, I know that the antiderivative of sec x tan x is sec x, so the disconnect is indeed just computing it. And yes, it's sec 2θ tan 2θ, my mistake. Unfortunately, we haven't learned how to use u-substitution in integration ... —Preceding unsigned comment added by 70.19.20.251 (talk) 04:54, 22 January 2008 (UTC)
(after making a silly mistake) Hm, the arguments are going to present a problem if you can't do u-subs. Your antiderivative is sec(2θ)/2. You'd plug the limits of integration into it and solve it like you would a polynomial expression, ending up with the value sec(/3)/2-sec(0)/2. Since I forget how to parse math stuff, you can calculate those values.72.219.143.150 (talk) 05:07, 22 January 2008 (UTC)
- If it helps, we have an entire article on U-substitution. Black Carrot (talk) 08:01, 22 January 2008 (UTC)
- Consider this, if you know how to find the antiderivative (indefinite integral) then you should be able to evaluate a definite integral. Just find the antiderivative like it was an indefinite integral, (be sure to back substitute if you used a u-substitution to get your antiderivative) then if we call the antiderivative F, find F(b)-F(a) (that result comes from the Fundamental theorem of calculus read the "Second part" in that article) (b is the upper bound and a is the lower bound of the original integral.) A math-wiki (talk) 09:30, 22 January 2008 (UTC)
- I get the impression that 70.19.20.251's class ran out of time for the semester before they got around to the fundamental theorem. (Look at all the recent questions that involve evaluating definite integrals the hard way, using a Riemann sum directly.) In that case, one would hope that the teacher won't put such complicated trig integrals on the exam. The past year's test could have more advanced material just because the class went faster that time. --tcsetattr (talk / contribs) 09:38, 22 January 2008 (UTC)
Tetrahedron in Sphere
What is the largest volume of a tetrahedron that can be inscribed in a sphere? I can do it with a triangle and a circle, but I don't know where to begin when in 3 dimensions. Give me a hint. :) HYENASTE 05:39, 22 January 2008 (UTC)
- Consider a tetrahedron of fixed size and therefore known volume, and determine the volume of the circumscribed sphere. For reasons of symmetry, the centre of that sphere is the centre of the tetrahedron, which is its centroid. From that you can determine the radius of the sphere. --Lambiam 06:33, 22 January 2008 (UTC)
- I think you're making the assumption that the tetrahedron of largest volume is regular, which does seem like it should be true; how do you show this? —Bkell (talk) 06:37, 22 January 2008 (UTC)
- I could give a sloppy argument that I find convincing. Take a sphere of the chosen size and inscribe any tetrahedron in it. Choose one face of the tetrahedron as the base, oriented as low as possible and horizontal. If the apex is below the base now, the volume can be made at least as big by moving it to a similar position above the base. From there, letting the apex roam freely, the volume is maximized uniquely when the apex is at the very top of the sphere. In other words, if on the tetrahedron you've chosen there's a face where the associated apex is not at the top of the sphere from its frame of reference, that tetrahedron has less volume than some other tetrahedron. The only tetrahedron where each apex is at the top from the point of view of its base, is the regular one. Black Carrot (talk) 07:47, 22 January 2008 (UTC)
- A similar argument, building up from the two-dimensional case: having chosen a base, maximize its area. That would be an equilateral triangle, as can be proven. The only tetrahedron with all equilateral triangles for faces is the regular one. Black Carrot (talk) 07:52, 22 January 2008 (UTC)
Inverse color
How do I calculate the inverse color for a color? i.e. if I'm given a color, I want the color best suited for the background color, i.e. most readable.
I have seen many many online inverse color tools that simply assume it's the 256 complement (if I am using that term correctly), so (to use decimal), 10's inverse is 245. But of course then you get the color #808080 (i.e. 128 128 128), and the inverse is not correct at all.
Does anyone have a better formula? I'm thinking perhaps the color such that new minus old color has the maximum absolute magnitude. Any ideas? Ariel. (talk) 10:48, 22 January 2008 (UTC)
- I'm not sure how exactly you're calculating the inverse, but you want to be breaking the colour down into its red green and blue components. For a given colour , your inverse will be . Readro (talk) 11:21, 22 January 2008 (UTC)
- The answer depends on definition of 'inverse' , that is what color model you use. It's quite safe to assume that black and white should be 'inverse' to each other. But what do you mean by inverse of, say, bright yellow? Should it be dark brown (light–dark inversion, i.e. lightness inversion in HSL color space) or rather intense blue (RGB inversion, proposed by Readro above)? --CiaPan (talk) 12:30, 22 January 2008 (UTC)
- If what you're after is a color which is as different as possible from the given color, then yes, you want each of the RGB components to have the maximum distance between them. This will always be a color with RGB components of 0 or 255. So for (192, 140, 60), for example, the most distant color will be (0, 0, 255). Of course, I am assuming here that in terms of perception, the components are completely unrelated and 128 is midway between 0 and 255. Also, this will not be bijective - the same color will be the "inverse" of many colors. If you want a bijection which guarantees that the colors will be quite different, you can take each RGB component and add 128 modulo 256. -- Meni Rosenfeld (talk) 12:39, 22 January 2008 (UTC)
- Readro's inversion, and 128 modulo 256 both don't handle gray - they produce gray as the result. Meni's idea - is I guess, for each component - if it's greater than 127 make it 0, if it's less or equal, make it 255. I think that should work. CiaPan: you ask which type of inversion - I would answer: both. Because otherwise you don't handle gray (the opposite color to gray is still gray), so you need lightness change, but light yellow on dark yellow is also hard to read, so you also want a color inversion. Would Meni's idea do that? Ariel. (talk) 13:30, 22 January 2008 (UTC)
- Ok, now I understand (I hope). :) Well, yes, Meni's idea is best for you: it will give most contrast color possible, approximately inversing the hue of a given color and choosing its maximum or minimum value. For example for yellow and similar colors you'll get intense blue; for any bright gray color, including white, you'll get black; for all very dark colors you'll get white, an so on. --CiaPan (talk) 13:41, 22 January 2008 (UTC)
- [ec] Adding 128 modulo 256 does handle gray - it produces black or white for the result (for dark grey it will give light grey, which works but is perhaps suboptimal). My other suggestion will turn light yellow to light blue and dark yellow to white. -- Meni Rosenfeld (talk) 13:56, 22 January 2008 (UTC)
- Sorry, I miss-understood what you wrote (misread the modulo). I tried it - it handles some colors better then others. It doesn't produce the opposite color (from a color wheel) for all colors like this color for example, on the other hand this seems OK. The other method you posted works nicely, except cyan is not a very easy color to read. Ariel. (talk) 15:38, 22 January 2008 (UTC)
- Readro's inversion, and 128 modulo 256 both don't handle gray - they produce gray as the result. Meni's idea - is I guess, for each component - if it's greater than 127 make it 0, if it's less or equal, make it 255. I think that should work. CiaPan: you ask which type of inversion - I would answer: both. Because otherwise you don't handle gray (the opposite color to gray is still gray), so you need lightness change, but light yellow on dark yellow is also hard to read, so you also want a color inversion. Would Meni's idea do that? Ariel. (talk) 13:30, 22 January 2008 (UTC)
- You've asked two completely different questions here. A perceptually "opposite" color is not generally a good background color for maximum readability. The most-distant-in-RGB strategy will get you cyan on red, which is a terrible combination for readability even though these are perceptually very different colors. The add-128-modulo-256 strategy will give you such horrors as red on grey. In these cases cyan on black and red on white would have been far better. You should also take into account that you may have colorblind users, and what looks good to you may be unreadable to some of them. I think your best bet is to use a black background for all bright colors and a white background for all dark colors. To judge the brightness of an RGB color you could use the sRGB formula in the Luminance (relative) article. If it isn't obvious by now, your question really belongs on the science desk; human color perception is complicated and weird, and there's no simple mathematical answer to the questions of what looks most different or best. -- BenRG (talk) 15:24, 22 January 2008 (UTC)
- The color is actually the background color, and I just want something readable for the text label on top of the color (the color blind person would read that - I think contrasting colors and brightness simultaneously should be readable to a color blind person, just changing the color would not be). I tried making all the text either black or white, it worked for many colors, but not for all of them. The ones that were mid-way in luminosity were hard to read. So far the most-distant method worked best, but some colors look terrible, as you mentioned. There has to be a better way - your cyan on red are both full luminosity colors, I want to also invert the luminosity. So solid red should become black (the cyan at 0 darkness). (Well, I think I want that - I don't really know what I want :) Ariel. (talk) 15:49, 22 January 2008 (UTC)
- Can you give examples of colours for which neither a white nor a black label worked well? --Lambiam 18:02, 22 January 2008 (UTC)
- For example: this color in white and this one and in white. I mean it's not terrible, but a color instead of black or white would be better. Ariel. (talk) 15:47, 23 January 2008 (UTC)
- Hmm... what color would you prefer on them? At a glance, I can't think of any color that would obviously look more readable on those backgrounds than black or white (which do about equally well, as one might expect on a medium-brightness background). —Ilmari Karonen (talk) 02:49, 25 January 2008 (UTC)
- For example: this color in white and this one and in white. I mean it's not terrible, but a color instead of black or white would be better. Ariel. (talk) 15:47, 23 January 2008 (UTC)
- Can you give examples of colours for which neither a white nor a black label worked well? --Lambiam 18:02, 22 January 2008 (UTC)
- The color is actually the background color, and I just want something readable for the text label on top of the color (the color blind person would read that - I think contrasting colors and brightness simultaneously should be readable to a color blind person, just changing the color would not be). I tried making all the text either black or white, it worked for many colors, but not for all of them. The ones that were mid-way in luminosity were hard to read. So far the most-distant method worked best, but some colors look terrible, as you mentioned. There has to be a better way - your cyan on red are both full luminosity colors, I want to also invert the luminosity. So solid red should become black (the cyan at 0 darkness). (Well, I think I want that - I don't really know what I want :) Ariel. (talk) 15:49, 22 January 2008 (UTC)
- Note that properly converting RGB colors to grayscale isn't quite as simple as just adding the components together. In fact, the precise conversion formula will depend on the specific RGB color space used, but a quick and dirty rule is to weigh the red channel by 30%, the green by 60% and the blue by 10%. Thus, to pick the maximally contrasting color from the set {black, white}, given the background color (r, g, b) ∈ [0,1]3, one might use the formula:
- —Ilmari Karonen (talk) 04:31, 23 January 2008 (UTC)
- I particular, the rule I give above produces, for extremal backgrounds choices, black on green, yellow, cyan and white, and white on black, red, blue and magenta. Simply using the unweighted mean would yield the opposite choice on green and magenta, which I think you'll agree would not look optimal. —Ilmari Karonen (talk) 04:38, 23 January 2008 (UTC)
- You could also perhaps experiment with lowering the threshold a bit, say from 5 to 4.5, since the human eye seems to be somewhat more comfortable with black on a dark background than with white on a bright one. But the 50% threshold ought to work well enough. —Ilmari Karonen (talk) 04:48, 23 January 2008 (UTC)
- Note that properly converting RGB colors to grayscale isn't quite as simple as just adding the components together. In fact, the precise conversion formula will depend on the specific RGB color space used, but a quick and dirty rule is to weigh the red channel by 30%, the green by 60% and the blue by 10%. Thus, to pick the maximally contrasting color from the set {black, white}, given the background color (r, g, b) ∈ [0,1]3, one might use the formula:
Is the Ariel asking about complimentary colors as in art and design? Complimentary are the exact opposite of each other and shows the best contrast. It is based on RYB not RGB. 2 complimentary colored paints when mixed will always be black. See http://www.faceters.com/askjeff/answer52.shtml NYCDA (talk) 23:58, 22 January 2008 (UTC)
- Two complimentary colors, as it says in the article you linked, usually mix to a muddy brownish color. Black and white have to be produced separately, essentially as two more primary colors. Black Carrot (talk) 04:16, 23 January 2008 (UTC)
- That would be Complementary colors. AndrewWTaylor (talk) —Preceding comment was added at 08:45, 23 January 2008 (UTC)
- I know what they are, I was asking how to calculate them. And if they are a good choice. Ariel. (talk) 15:47, 23 January 2008 (UTC)
- That would be Complementary colors. AndrewWTaylor (talk) —Preceding comment was added at 08:45, 23 January 2008 (UTC)
(See above for 2 colors that didn't work great with black or white.) All the ideas posted worked pretty well, but I think it can be better. I like the most distant color rule, but I'd like to remove cyan, magenta, and yellow from the options, since those colors aren't the easiest to read. Any ideas? Ariel. (talk) 15:54, 23 January 2008 (UTC)
- Mathmatically the opposite of "all" is "some", not "none". Opposite of gray is white or black depending on your prespective. You might be better of if you add 128 to the component if the value is less then 128, substract 128 if the value is greater then 128. For 128 itself, you can set it to 0 or 255. Using this rule, you get
- sample sample sample sample
NYCDA (talk) 19:11, 23 January 2008 (UTC)
Alot of people seem to be trying to invert colour mathematically. What is needed here is to invert for the eye. Itensity is not equally effected by the colours. Intensity is generally: (0.299*r) + (0.587*g) + (0.114*b). Opposite intensity = (0.368*r) + (0.080*g) + (0.552*b). So for grey of 128,128,128, the opposite is 47 (0.368*128), 10 (0.080*128), 70(0.552*128), you then invert that to get 208, 245, 185. For gray 32,32,32 the opposite colour is 12,3,17 -> 243,252,238. For red (255,0,0), the opposite itensity is 94,0,0 -> 161,255,255. Opposite of blue (0,0,255) is 0,0,140 -> 255,255,115. Opposite of dark green (0,128,0) is 0,10,0 -> 255,254,255. This is the TRUE opposite. The value I use (0.386,0.080,0.552) are beacuse of the sensitivity of the eye, we see green the most and blue the poorest. Samples: Grey Grey Blue Blue Darkgreen Darkgeen Red Red D.Yellow D.Yellow Green Green I think you will find that no matter what colour you put in, you will get the most pleasing 'opposite' colour for human vision. Note that there is another set of values for computer screens. With these values red and green will be to bright. I know that these are the values for print (newspapers etc) but for computer screens I don't know. I think the green 0.08 is alot higher.--155.144.251.120 (talk) 01:10, 24 January 2008 (UTC)
- How did you calculate the opposite factors? I can see that they add to .666 but why is that what you choose? Also the Luminance (relative) has different factors. That article has very different numbers, and different from Ilmari's 30/60/10 rule as well. Edit: found it, the Luma (video) has your numbers. Ariel. (talk) 01:41, 24 January 2008 (UTC)
- Never mind, I just figured it out. The sums each add to 1. Two set of them add to 2, and 2/6=.666. Ariel. (talk) 01:43, 24 January 2008 (UTC)
- I take back my never mind - for the values in the Luminance (relative) what do I do for .7152? Take the absolute? I tried that, but the new factors: 0.4541, 0.0485, 0.5945 don't add up to 1 anymore. Ariel. (talk) 01:55, 24 January 2008 (UTC)
- This inverse doesn't seem right. For white you get Light green, and I think you should get black. Ariel. (talk) 02:04, 24 January 2008 (UTC)
- Some of 155's observations are good, but his method for inverting is completely bogus. For the color (186, 236, 164), the inverse he proposes is the color itself. -- Meni Rosenfeld (talk) 23:11, 24 January 2008 (UTC)
- This inverse doesn't seem right. For white you get Light green, and I think you should get black. Ariel. (talk) 02:04, 24 January 2008 (UTC)
- Perhaps we need to look at this from a different angle, there are two things that seem to really matter to our eye, pigment and luminosity. So if we describe the standard RGB values in terms of these two. Thing of it like this, the pigment is the actual color, (direction of a vector onto the color wheel) and luminosity is the intensity of this pigment (length of said vector). There's also the issue of the grey scale, which could be thought of as a z-component of that vector which gives it depth. To avoid the issue of grey on grey, one could argue that the length of the vector should always be maximized to get the resulting color to be as different as possible from the first color. A math-wiki (talk) 07:43, 24 January 2008 (UTC)
- I take back my never mind - for the values in the Luminance (relative) what do I do for .7152? Take the absolute? I tried that, but the new factors: 0.4541, 0.0485, 0.5945 don't add up to 1 anymore. Ariel. (talk) 01:55, 24 January 2008 (UTC)
- Never mind, I just figured it out. The sums each add to 1. Two set of them add to 2, and 2/6=.666. Ariel. (talk) 01:43, 24 January 2008 (UTC)
- After some further thought, I'll clarify my describtion a bit. On the XY plane, the direction the vector takes is the pigment (coloration), the length on the planes describes the intensity of the pigmentation, and the change in height over the length of vector is the luminosity with the brightest white being the highest positive value allowed, and the darkest black the lowest negative value allowed. A math-wiki (talk) 07:53, 24 January 2008 (UTC)
- You might want to try somethjing like just inverting (red = 255 - red) then factor by the weighting of the lumanance: r = r/1.567889620, g = g/0.466070096; b=b/4.616805170; This takes care of greys because they go to greens:
blackblackwhitewhitegreygreydgreydgreylgreylgreyredredlredlredgreengreenlgreenlgreenbluebluelbluelblueyellowyellowlyellowlyellowindegoindegolindegolindegovioletvioletlvioletlviolet--Dacium (talk) 00:24, 25 January 2008 (UTC)
- I don't know how you guys end up with these oddities. With your system, what will be the result if the original has 0 green? -- Meni Rosenfeld (talk) 12:07, 25 January 2008 (UTC)
- A-math wiki, there are three parameters for the type of system you describe, chrominance (what you call pigment), luminance, and (the one you missed) saturation. A fully saturated colour is, for instance, bright red and a de-saturated colour is, for instance pink. ie, desaturating adds white. In any abstract representation of colour there must be (at least) three parameters, at least when we are describing human vision. SpinningSpark 18:37, 27 January 2008 (UTC)
- A-math wiki's description sounds a lot like HSL and HSV... - SigmaEpsilon → ΣΕ
- A-math wiki, there are three parameters for the type of system you describe, chrominance (what you call pigment), luminance, and (the one you missed) saturation. A fully saturated colour is, for instance, bright red and a de-saturated colour is, for instance pink. ie, desaturating adds white. In any abstract representation of colour there must be (at least) three parameters, at least when we are describing human vision. SpinningSpark 18:37, 27 January 2008 (UTC)
January 24
Greatest number which cannot be expressed as a sum of 3m + 20n, where m and n are whole numbers?
As title - I can't quite recall the name of this type of problem, which makes it hard to look up information on. Any help appreciated, thanks! --131.111.135.84 (talk) 11:37, 24 January 2008 (UTC)
- Any whole number N can be represented by 3·m+20·n, because 3·7+20·(−1) = 21−20 = 1 and so 3·(7·N)+20·(−N) = 1·N = N. Bo Jacoby (talk) 12:06, 24 January 2008 (UTC).
- If you replace whole numbers for naturals, the same is true again. No such greatest number could exist, because if it existed (let's call it x), x+23 couldn't be expressed as such sum either. Pallida Mors 12:34, 24 January 2008 (UTC)
- Huh? 1 cannot be expressed in this way but 24 can (or, if you don't allow 0, 24 vs. 47). The largest number for which this is impossible is 37, because for any number , either or is divisible by 3. -- Meni Rosenfeld (talk) 12:47, 24 January 2008 (UTC)
- You're of course right, Meni. I thought that, if
- Then, . Absurd.
- But this is not absurd, as (m-1) could then perfectly be 0 (or -1). Pallida Mors 13:23, 24 January 2008 (UTC)
- Huh? 1 cannot be expressed in this way but 24 can (or, if you don't allow 0, 24 vs. 47). The largest number for which this is impossible is 37, because for any number , either or is divisible by 3. -- Meni Rosenfeld (talk) 12:47, 24 January 2008 (UTC)
- If you replace whole numbers for naturals, the same is true again. No such greatest number could exist, because if it existed (let's call it x), x+23 couldn't be expressed as such sum either. Pallida Mors 12:34, 24 January 2008 (UTC)
- More generally, for a and b whole numbers, the numbers which can be expressed as am + bn are the numbers divisible by gcd(a,b) (i.e. the numbers {gcd(a,b)k | k in Z}) where gcd is the greatest common divisor. This follows since by the extended Euclidean algorithm there exists whole numbers m and n such that gcd(a,b) = am+bn. In particular, if gcd(a,b) = 1 (which is the case, when a=3 and b=20) all whole numbers can be expressed as am+bn Aenar (talk) 12:58, 24 January 2008 (UTC)
- The case where m and n are restricted to natural numbers is an example of a Frobenius coin problem. Gandalf61 (talk) 13:04, 24 January 2008 (UTC)
Sorry, I meant m and n were positive whole numbers... so the answer is 37? Thanks. --131.111.8.97 (talk) 15:47, 24 January 2008 (UTC)
- That's the answer if you allow m and n to be zero. If they have to be whole numbers >0, the answer becomes 60. Algebraist 15:53, 24 January 2008 (UTC)
Is it just me, or does this look more like a homework problem than anything else? Pdbailey (talk) 18:14, 25 January 2008 (UTC)
- I hope not. I can't think of any class for which this would be good homework. Black Carrot (talk) 19:00, 25 January 2008 (UTC)
- It was the second post that looked homeworky to me. But both question posts are from University of Cambridge, it's an awfully sad question for a college class. Pdbailey (talk) 19:41, 25 January 2008 (UTC)
- This question is not a set problem for any Cambridge maths course at present. I can't speak for other subjects. Algebraist 20:15, 25 January 2008 (UTC)
- It was the second post that looked homeworky to me. But both question posts are from University of Cambridge, it's an awfully sad question for a college class. Pdbailey (talk) 19:41, 25 January 2008 (UTC)
POUNDS
WHY IS LBS USED AS AN ABBREVIATION FOR POUNDS? —Preceding unsigned comment added by 69.19.14.33 (talk) 21:38, 24 January 2008 (UTC)
- Blame in on the Romans. And please don't post in all-CAPS. --LarryMac | Talk 21:41, 24 January 2008 (UTC)
The romans would do that because they had a system but I forgot--Kop the man (talk) 03:00, 25 January 2008 (UTC)loperman2510
- LBS is an abbreviation for Pound-Mass. I cannot find the long world for lbs on googles anywhere. Daniel5127 (talk) 05:45, 25 January 2008 (UTC)
- No, "lb." is an abbreviation for "pound", and "lbs." is an abbreviation for "pounds", which come from the Latin word "libra", as LarryMac said. It was used as an abbreviation for pound long before people learned to distinguish between weight and mass. In situations where it is important to distinguish between the two, I have seen "lbf" used as an abbreviation for "pound (of) force". —Bkell (talk) 06:48, 25 January 2008 (UTC)
- More precisely, "lb." means "pound" or "pounds", and "lbs." is another abbreviation for "pounds". Both styles are commonly used for the plural. --Anonymous, 02:23 UTC, January 26, 2008.
- "Libra" is also the Latin word for scales or balance, hence the name of the constellation and the astrological sign. The connection between a weight and scales should be readily apparent. -- JackofOz (talk) 04:58, 26 January 2008 (UTC)
January 25
Math
I dont like math it is not too helpful but on the same token I want to work for NASA! —Preceding unsigned comment added by Kop the man (talk • contribs) 03:01, 25 January 2008 (UTC) Can some one please at least help me like math? —Preceding unsigned comment added by Kop the man (talk • contribs) 03:07, 25 January 2008 (UTC)
- What kind of things do you like? Only things that are helpful? --Lambiam 04:31, 25 January 2008 (UTC)
- I don't know what kind of things do you like. Daniel5127 (talk) 05:43, 25 January 2008 (UTC)
- Mathematics requires one do a lot of careful work to get useful results, but those results need only be derived once, so if your the type that willing to do work now for benefit later then you *should* like math. I also enjoy challenges, which is probably part of the reason I like math. I can find some aspects of it to be very tedious, but I most enjoy being able to pose and sometimes answer my own questions :). I would say my favortie kind of mathematical work is what I like to call; Exploratory analysis. I have "explored" Polynomials, Polyhedra, Polygons, Graph Theory type graphs, Trignonmetric Identities, and more, basically I look for patterns and explore the different possibilities within the fields described above. A math-wiki (talk) 11:38, 25 January 2008 (UTC)
- Also, what mathematics courses have you taken? I could recommend some good explorations based on your mathematical knowledge level. A math-wiki (talk) 12:10, 25 January 2008 (UTC)
- Why do you dislike math? Do you have trouble understanding it? Is it boring/usually boring/sometimes boring? Does it seem useless? Do you usually get the wrong answer to problems, or the right one? Answering any of these questions would help. I've always been good at math, and rarely bored by it, so I've always liked it by default. Black Carrot (talk) 18:57, 25 January 2008 (UTC)
- Also, what do you want to do at NASA? Different jobs require different mathematical backgrounds. Black Carrot (talk) 18:58, 25 January 2008 (UTC)
- NASA must have janitors ... —Tamfang (talk) 01:13, 26 January 2008 (UTC)
- There are books that may convey some of the beauty that makes mathematicians do what they do; I have in mind Mathematical Snapshots by Hugo Steinhaus and The Penguin Dictionary of Curious and Interesting Geometry by David Wells. Since I was already a math freak for many years before reading these books, my opinion of them may be skewed. —Tamfang (talk) 01:13, 26 January 2008 (UTC)
Stochastic matrix (few questions)
I am trying to understand Stochastic matrix.
The article has an example of the cat and mouse:
1. You have a timer and a row of five adjacent boxes.
2. The cat is in the first box.
3. The mouse is in the fifth box.
4. The cat and the mouse both jump to a random adjacent box when the timer advances.
5. If the cat is in the second box and the mouse in the fourth one, the probability is one fourth that the cat will be in the first box and the mouse in the fifth after the timer advances.
- 1. Shouldn't the probability be 1/2, because the mouse can only move in either the 1st box or the 3rd box? --Obsolete.fax (talk) 04:51, 25 January 2008 (UTC)
- Why is it not 1/2? From State 3 there are four possibilities: the mouse can go either left or right, and so can the cat, giving 2 × 2 = 4 possible next states. --Lambiam 09:16, 25 January 2008 (UTC)
So in the above example the article generates some jargon:
- 2. What does above mean in simple mathematics? --Obsolete.fax (talk) 04:54, 25 January 2008 (UTC)
- 3. What does P stand for? --Obsolete.fax (talk) 04:55, 25 January 2008 (UTC)
- 4. If State 1: cat in the first box, mouse in the third box: (1, 3); then why is there 1/2 represented on the 3rd and 5th segment of the first line in the above? --Obsolete.fax (talk) 04:58, 25 January 2008 (UTC)
- 5. Is State 1 represented on the first line in the above? --Obsolete.fax (talk) 04:59, 25 January 2008 (UTC)
- P is a matrix that shows, for each pair of states before and after, what the probability is of going at the clock tick to the state after as the next state, coming from the before state. The numbering is given in the article. That is why there are entries 1/2 in row 1, 3rd and 5th. --Lambiam 09:16, 25 January 2008 (UTC)
- I have moved part of your answer in question 1. I hope you won't mind. --Obsolete.fax (talk) 07:38, 26 January 2008 (UTC)
- Ok so P is a matrix that shows, for each pair of states the before and after. Would the word "matrix" mean the visual mathematic diagram? And thus "P" stands for the "matrix"? --Obsolete.fax (talk) 07:31, 26 January 2008 (UTC)
- Yes, but it is more than just a "diagram". In mathematics, a matrix is a rectangular array of numbers or other entries. Before you can understand stochastic matrix, you need to understand how a matrix is defined, and how two matrices can be added or multiplied together. All this is explained in our article matrix (mathematics). Gandalf61 (talk) 09:56, 26 January 2008 (UTC)
- A matrix is a kind of mathematical object, just like number, vector, etcetera. (There are also mathematical objects called diagrams, but they do not include matrices.) The presentation of a matrix as a rectangular table is a traditional convenient way of representing them on paper, but it is just a representation of the matrix and not the mathematical object itself, just like the sequence of digits "144" represents a number but is not that number. In the article Stochastic matrix the variable P stands indeed for the matrix displayed as the right-hand side in the definition
. --Lambiam 10:12, 26 January 2008 (UTC)
- A matrix is a kind of mathematical object, just like number, vector, etcetera. (There are also mathematical objects called diagrams, but they do not include matrices.) The presentation of a matrix as a rectangular table is a traditional convenient way of representing them on paper, but it is just a representation of the matrix and not the mathematical object itself, just like the sequence of digits "144" represents a number but is not that number. In the article Stochastic matrix the variable P stands indeed for the matrix displayed as the right-hand side in the definition
- —Preceding unsigned comment added by Obsolete.fax (talk • contribs) 13:10, 26 January 2008 (UTC)
- State 1: cat in the first box, mouse in the third box: (1, 3)
- State 2: cat in the first box, mouse in the fifth box: (1, 5)
- State 3: cat in the second box, mouse in the fourth box: (2, 4)
- State 4: cat in the third box, mouse in the fifth box: (3, 5)
- State 5: the cat ate the mouse and the game ended: F.
The before state with the cat in the second box and the mouse in the fourth box is State 3. The after state with the cat in the first box and the mouse in the fifth box is State 2. The probability of transitioning, given that the system is in State 3, to State 2, is the entry found in row 3, column 2, of P, which is 1/4. From State 3 the system can go into each of States 1, 2, 4 and 5, and these four possible transitions all have equal probability. From State 1 the system can only transition to States 3 and 5, because the cat must move to the second box; depending on whether the mouse goes right or left it survives (State 3) or is eaten (State 5). --Lambiam 09:16, 25 January 2008 (UTC)
Can you elaborate, please? I don't understand where State 1 is in your explanation? --Obsolete.fax (talk) 13:07, 26 January 2008 (UTC)
- Okay, let's go over this again. In State 1, the cat is in box 1 and the mouse is in box 3. From State 1, two alternatives can happen. The cat can go to box 2 and the mouse can go to box 4 - this takes us to State 3. Or the cat can go to box 2 and the mouse can also go to box 2 - this takes us to State 5. These two alternatives have equal probability. Is that clear ? Do you see why the entries in the first row of the matrix P are 0, 0, 1/2, 0, 1/2 ? Gandalf61 (talk) 18:13, 27 January 2008 (UTC)
- I followed you so far Gandalf61. Please could you explain the following:
- Is it true that entries in the first row, represent what will happen after the corresponding State, in this case, State 1?
- Is it true that State 2 and State 4 which is mentioned earlier cannot happen after State 1?
Point in Polygon
I am currently implementing a GIS system and in this process I have encountered a few problems from computational geometry that may be interesting. Here is the first one.
I have a simple polygon with a few million vertices and some tenthousand points. I want to know for each point whether it is inside or outside the polygon. This is the Point in polygon problem.
So far, I am doing a bounding box intersection, which cuts away most of the points. After that I do a full test using raycasting on the remaining points. Naturally, each test takes quite some time for such a large polygon. I am looking for some additional method to instantly classify most of the points, so that only a tiny fraction of the original points have to go through the full raycasting test.
The tricky algorithms that I have found so far (grids and similar) seem to require too much preprocessing (remember, millions of vertices but only thousands of points). I was thinking about computing a maximum inscribing box, but some of the polygons are oddly shaped and would yield useless boxes.
What I really want is to find a way to compute a polygon that reasonably resembles the form of the original polygon with only a few dozen points, but remains completely inside the original polygon. Any ideas? Thorbadil (talk) 20:28, 25 January 2008 (UTC)
- I had a similar problem with a GIS system once and I started by dropping all the points that, when removed, did not change the polygon (sounds stupid, but this got rid of lots of them) I then removed points that "almost" didn't change the shape of the polygon (i.e. angle changes that were small). I also considered the size of the line segment between two points, and if it was a small fraction of a pixel, I dropped it (you can adapt this for every zoom level).
- But maybe you won't like that. If the shapes are convex, you could just drop points. If they have concavities, (which I assume they must for the bounding box to be less useful) you have a much harder problem. I'll enjoy seeing any more insightful ideas on this page! Pdbailey (talk) 20:56, 25 January 2008 (UTC)
- I considered using a Douglas Peucker compressor (btw. why is there no article?) which is a bit more clever way to remove the points which almost do not change the polygon when left out. The problem is, that I need 100% accurate results, so the simplified line must be either completely outside or inside the polygon to be of any use for me. Thorbadil (talk) 21:15, 25 January 2008 (UTC)
- The reason there's no article regarding the compressor is that you haven't added one yet :) ... w/o much thought, the best I can do is to generate random points, find those that are on the inside, and then (and this requires angled rays) find those where the line segment that connects them does not cross a boundary. All of these triangles (w/ interior points and interior line segments connecting them) are on the interior and this should save you some time, but isn't exactly what you were hoping for. Pdbailey (talk) 21:24, 25 January 2008 (UTC)
Why do you want to do this? i.e. what's the bigger picture? And if the points are on a regular grid (say 100x100 = 10,000 points), isn't it actually rather easy (well, as easy as solving the point in polygon problem 100 times) with some record keeping along the way? Pdbailey (talk) 21:55, 25 January 2008 (UTC)
- I want to automatically assign geocoded addresses to administrative or postal regions. I will throw the polygons representing the regions in an rtree and then fetch candidate polygons for each point from it. I am only worried about the case where I have few, very large polygons, like countries. Thorbadil (talk) 22:23, 25 January 2008 (UTC)
- Can't you just cut your large regions into a number of smaller regions, say by intersecting with a grid of horizontal and vertical lines. That should reduce the number of points in each region tested dramatically.
- I'm sure this is a know problem, some of the systems in mentioned in Spatial database may do it for you and there is bound to be an extensive literature on the subject.
- Anyway my off the top of my head solution.
- Divide your region up using a quadtree. Start with the bounding box, divide it into 4 rectangles along the midlines. For each rectangle create a polygon consisting of the country boundary inside the rectangle and appropriate internal edges of the rectangle.
- Now recurse. For each rectangle which the polygon intersects dividing it into 4 and repeat. For rectangles when the polygon does not intersect label them as inside (I) or outside (O).
- Stop when you just have 1 point on the country boundary in the box. Label as cut (C).
- When you want to test a point test whether it in the bounding box, if so find which of the four it lies in. Test against that rectangle and repeat. For the leaves (C) you will have at most 7 points so the polygon intersection test is simple.
- I've used quadtree here as its simpler to implement, but most probably not as efficient as a good rtree. Somehow I think the above is similar to what your proposing.--Salix alba (talk) 23:50, 25 January 2008 (UTC)
- Anyway my off the top of my head solution.
I solved the Point in polygon problem some years ago in connection with determining which ambulance station was responsible for a specific adress. The region of each ambulance station was a polygon specified by the coordinates of its vertices. I used the winding number algorithm. Your problem is that the polygon is too complicated for this solution to be fast. However, describe your complicated polygon as the common limit of a decreasing finite sequence of simpler outer polygons, and an increasing finite sequence of simpler inner polygons. Most points is outside one of the outer polygons, or inside one of the inner polygons, and then you are done. Only when the point is very close to the limit polygon do you have to compute the complicated case. Am I clear? Bo Jacoby (talk) 14:00, 27 January 2008 (UTC).
Inverse of sinc(x)
Dear Wikipedians:
What is the inverse function of ?
In other words, is it possible to find an explicit expression for ?
If not, why not?
Thanks.
76.68.9.132 (talk) 23:04, 25 January 2008 (UTC)
- I'm no expert, but wouldn't it be , or am I just thinking to simplistically? Paragon12321 (talk) 01:26, 26 January 2008 (UTC)
- No, he is not talking about the multiplicative inverse. The word inverse here (used with functions) has another meaning. Wikipedia has an article on inverse functions. And to answer the question, in order to find the inverse, you need to be able to solve for x but that is not possible (at least in terms of elementary functions). Furthermore, this function is not one-to-one (because of sin(x)) so its inverse wouldn't even be a function (if we found it). We need to first restrict the domain and the range before we try to find the inverse.A Real Kaiser (talk) 01:56, 26 January 2008 (UTC)
- A graph of the original function can be seen in the article on the sinc function. Its inverse (on some restricted part) cannot be expressed as a closed expression in terms of elementary functions. One could invent a name for it, like has been done for the Lambert W function, but I've never seen this discussed. --Lambiam 10:23, 26 January 2008 (UTC)
- Thanks. Now I know 76.65.12.133 (talk) 15:00, 26 January 2008 (UTC)
January 26
tiling a hypersaddle
The smallest figure that tiles the hyperbolic plane (H2) is the "237" triangle, whose angles are π/2, π/3, π/7. What is the smallest tile in H3? —Tamfang (talk) 01:14, 26 January 2008 (UTC)
Does this answer your question: List of regular polytopes#Tessellations of Hyperbolic 3-space SpinningSpark 12:35, 27 January 2008 (UTC)
Most beautiful/interesting/elegant mathematical expression/function/other
Just curious about interesting maths. Those of you who are most passionate about math should be able to put forth your favorite(s). What is, in your opinion, the most beautiful, interesting, or elegant mathematical thing that you have found? HYENASTE 03:18, 26 January 2008 (UTC)
- Euler's identity, is oftenly mentioned as the most beautiful mathematical expression (check the article for more information.)
- But, personally, I also like the series expansion of cosine: . We do have an article on mathematical beauty too, in case you're interested. — Kieff | Talk 03:31, 26 January 2008 (UTC)
- I rather like . It's the simplest (that is, having the smallest positive integral coeffecients possible) odd function that satisfies
- and
- - SigmaEpsilon → ΣΕ 04:34, 26 January 2008 (UTC)
Mine is this "Genetic complementary learning autonomously generates fuzzy rule." I am still learning on Wikipedia how it all comes together. My first step is understanding Stochastic matrix. I just want to understand Stochastic matrix as fast as possible, so I can grasp some cool formulas published regarding GCL. :) --Obsolete.fax (talk) 07:44, 26 January 2008 (UTC)
Mine is Immerman-Szelepcsényi theorem. It is a genuinely suprising result and the proof is in some sense an elaborate mathematical joke. I also like Gödel's incompleteness theorems for similar reasons. Third mention is the proof that Hex (board game) is won by the first player to move. What I want to say - mathematical beauty is not related much to the importance underlying problems or to the simplicity of the result. It works more like jokes. You hear a story and in the end you get an additional surprising information, that completely changes the way you view the story. Take a look at the last link, the "Strategy" paragraph - anybody can understand it. Thorbadil (talk) 11:52, 26 January 2008 (UTC)
Nice challenge! My favorite is the formula
It is not quite trivial, it has a some symmetry, and it is useful for converting between gamma distribution and poisson distribution. It is applicable when computing the probability that the best soccer team won, given only information on the outcome of a particular match. The beauty is entirely in the eyes of the beholder. Bo Jacoby (talk) 12:11, 26 January 2008 (UTC).
- Picard's Theorem - any entire function must take every complex value infinitely often with at most ONE exception which is taken finitely. -mattbuck 00:14, 27 January 2008 (UTC)
My favorite would a result in probability theory regarding supermartingales. Which basically says that if you are in an unfavorable game (where you will loose money on the average) then there is no betting strategy that will make the game fair or favorable. There are strategies to make the game "less unfair" but it will still be unfair. Furthermore, the optimum betting strategy, in any game, is actually the bold strategy in which you bet all or nothing. These results might sound obvious, but what is interesting is that they have been mathematically proven. A Real Kaiser (talk) 05:35, 27 January 2008 (UTC)
- As my favourite is Eulers formula mentioned above, I will give you me second favourite. It is the proof that there are only five regular polyhedra in 3-space. Not only is the proof elegantly simple, but it leads to a stunningly surprising result. The infinite number of regular polygons in 2-space would suggest the opposite conclusion before working through the maths. Possibly my third favourite is the same in 4-space, the number of polytopes now surprisingly increases again (but still a little way short of infinity) to six and includes one that has no analogue in any other number of dimensions. SpinningSpark 13:00, 27 January 2008 (UTC)
- Cantor's twin daughters, the Ordinals and Cardinals. The first-ever consistent, convincing study of the absolute infinite is simple enough (at the beginning) that you could teach it to a kid along with arithmetic, and they probably wouldn't know what the big deal was about. A runner up would be fractals - not just the pretty colors, but the math behind them. Black Carrot (talk) 20:51, 27 January 2008 (UTC)
real numbers set
as amatter of fact ,i asked this before but i got no answer.i just want here to say it could be something,it could be important after study it.you can also go to my talk and see the pdf file that contains this discussion. the purpose of this theory is an attempt to show that real numbers can be generated or counted randomly and intensively .
Consider we express the tow positive real numbers ,A&B as,
A=Σam[(10)^(n-m)] B=Σbm[(10)^(n-m)] Where,( n,m=0,1.2,……) am,bm,positive integer Now if, am+bm=pm+10,pm<10 pm,positive integer Then we define the relationship R, ARB={pm*(10)^(n)}+{(pm+1)*(10)^(n-1)+..... Obviously, R; looks like adding backwards.e.g, 341R283=525 =(3+2)=5,(4+8)=12,(1+1+3)=5 Lets now pick up arbitrarily the infinite sequence
S0=Σn\(10)^(n),+Σn\(10)^(n+1) + Σn\(10)^(n+2)+.....
Where n=1to9 ,10to99,100to999 ,...etc.respectively
i.e, S0=0.123456789101112131415161718192021222324.... n ,is apositive integer. In order to generate or count* the real numbers within the interval,e.g. (0,1),
We define ,F;
F:N→IR
Where ,
F(n)=SnR0.1
Where, Sn, the set of sequences
S1=s0 R 0.1
S2=s1 R 0.1
etc.
hypothesis
There are an infinite sequences,s1,s2 that we can make S1RS2 Close enough to any real number.
now in order to solve the equation xR0.1 =1,x got to approach 1.9999....but how to solve xRx =1?obviousely,R,is an equevalence relation on positive real numbers set,natural numbers set and positive rational number set.
209.8.244.39 (talk) 12:31, 26 January 2008 (UTC)husseinshimaljasimdini
- Your post is very hard to read. Please learn LaTeX (Help:Formula can help you with the Wikipedia version), write more clearly and format the post to be more readable (correct punctuation and capitalization will help). -- Meni Rosenfeld (talk) 14:07, 27 January 2008 (UTC)
- Oh come on, it's not that hard. He's describing an adjustment of addition. Instead of carrying to the left, you carry to the right. So, 16(+)4=10.1, instead of 20. The decimal system remains the same, and is still intended to represent the real numbers. He describes a sequence of numbers in which each is the previous "plus" 0.1, and says that the "sums" of pairs of consecutive members of the sequence are dense in an interval. In the case of the number he started with, the unit interval. He says he's now trying to solve equations involving this operation, including x(+)0.1=1 and x(+)x=1. He doesn't seem to completely understand the words he's using, but he's still got an interesting question. Off the top of my head, 0.99999...(+)0.1=1, assuming normal rules of carrying to infinity, and there's no solution to the other question because the first digit will have to be 5 (0.5), and the second will have to be a digit n so that 2n+1=10m for some m, which is impossible. The article P-adics might be of interest. Black Carrot (talk) 20:42, 27 January 2008 (UTC)
- Corrections. The first digit could be zero, so either x=0 or the same problem. Also, I meant 1.9999... for the other, which I see he has. Problem, though. If 1.99999....=2, and 2(+)0.1=2.1, and 1.999...(+)0.1=1, then 1=2.1, which is an odd system. May have to be careful with the infinite decimals. Black Carrot (talk) 20:46, 27 January 2008 (UTC)
- I don't know what I was thinking. 50(+)50=1, of course. Black Carrot (talk) 20:57, 27 January 2008 (UTC)
Calculus in Computer Science
I am a highschool senior, and I am looking at attending college with a CS major. I looked over the course requirements, and I saw that I will have to take Calculus I, II, and III. I was wondering, what on earth would you use calculus for while writing computer programs?
Thanks.
J.delanoygabsadds 23:50, 26 January 2008 (UTC)
- Well, it could simply be analytical thinking that is required, or maybe just to show that you can work effectively without using actual numbers. -mattbuck 00:12, 27 January 2008 (UTC)
- There are quite a few concepts covered in calculus that are very important in computer science and applied computer programming. Off the top of my head, there's optimization, asymptotic behavior of functions, limits and continuity of functions, vector operations, mathematical descriptions of shapes and surfaces, numerical methods for computing integrals and finding roots of polynomials, and a little bit of physics. —Bkell (talk) 03:55, 27 January 2008 (UTC)
- Regardless of what's the use, please, don't be discouraged of taking CS because of calculus or mathematics. For one, mathematics is a great tool used frequently in any science, and you shouldn't dislike it. Secondly, picking an area of study based on "the less math the better" is a horrible way to make any important decisions in life.
- I don't know if you have any of these thoughts, but I just wanted to point these out. Sadly, that sort of thinking happens a lot. :( — Kieff | Talk 05:45, 27 January 2008 (UTC)
- Computer science is not about writing computer programs. --Lambiam 10:20, 27 January 2008 (UTC)
- I was going to say the same, but then realized that I couldn't coherently explain what CS is about - especially since the distinction can be blurry at times (a big part of CS is finding algorithms, which is only a step away from writing an actual program). Now that you've broken the ice, I'll say that CS is considered by many (most?) to be a branch of mathematics, so there should be no surprise in having to learn calculus for what is essentially a math major. Additionally, asymptotic behavior of functions is of key importance in definitions of computational complexity, and some definitions in, say, cryptography, use δ's and ε's in a way reminiscent of that found in limits. -- Meni Rosenfeld (talk) 12:22, 27 January 2008 (UTC)
- And depending on what you intend on doing with that Computer Science, you may need to use calculus, or at least know a little bit about it, in some applications - for example, video game design would require physics (if you plan on making a game with a realistic physics engine), which in turn requires knowledge of the basics of calculus. That said, a friend of mine once specifically chose a university degree in "Design Computing" (which, for some reason, was housed in the Faculty of Architecture), over "Computer Science" or a similarly science-related stream, because it meant she didn't have to do any mathematics. Confusing Manifestation(Say hi!) 12:59, 27 January 2008 (UTC)
- Also remember that “Computer Science” does not mean “Programming.” There is a lot more in the field than just programming. And while nearly all of the core courses in a typical computer science degree involve programming, probably less than a third to a half of them are about programming. GromXXVII (talk) 13:00, 27 January 2008 (UTC)
January 27
Inverse Trigonometric Function or Arc...
Hello. In the math world, can arcsine, arccosine, arctangent, etc. or sin-1, cos-1, tan-1, etc. be officially called inverse trigonometric functions? My teacher says that inverse means one over something (e.g. x-2 = ). Can inverse sine be confused for when arcsine A is meant? Thanks in advance. --Mayfare (talk) 00:51, 27 January 2008 (UTC)
- sin-1 can be confused for by someone who is unfamiliar with the notation. Your teacher is talking about the multiplicative inverse, also called the reciprocal, whereas sin-1 is an inverse function, a different meaning of inverse. --Evan Seeds (talk)(contrib.) 00:55, 27 January 2008 (UTC)
- Yes, You're correct. But One thing I want to explain to you is the differences between Cosine and cosine which is capitalized one and non-capitalized one. Capitalized one Cosine equals to Inverse of Cosine = Arc Cosine. Daniel5127 (talk) 06:48, 27 January 2008 (UTC)
- I have never heard of this distinction being used to differentiate between and ; in fact, the only reference I can find for this assertion is that next to no one uses this convention. Indeed, it would make title-casing in trigonometry textbooks, literature, etc. almost impossible. There are, however, non-standard symbolic distinctions between arccos vs. Arccos (in terms of principal values vs. multivalues) that are discussed in the first paragraph here. --Kinu t/c 08:28, 27 January 2008 (UTC)
- Yes, You're correct. But One thing I want to explain to you is the differences between Cosine and cosine which is capitalized one and non-capitalized one. Capitalized one Cosine equals to Inverse of Cosine = Arc Cosine. Daniel5127 (talk) 06:48, 27 January 2008 (UTC)
- When learning trig, I was taught that always meant as stated above. There is never any doubt that arcsin is meant since can always be written as (cosecant function) and similarly, the reciprocal of any other trig function has a specifically named function also. —Preceding unsigned comment added by Spinningspark (talk • contribs) 13:26, 27 January 2008 (UTC)
Famous mathematician
Do you know of any famous mathematician whose surname starts with a Q or a X? Thanks. Randomblue (talk) 01:56, 27 January 2008 (UTC)
- I personnally can't think of any, but maybe this can help. -- Xedi (talk) 02:10, 27 January 2008 (UTC)
- (edit conflict) There's Daniel Quillen, for a start. Michael Slone (talk) 02:11, 27 January 2008 (UTC)
- Not really a surname, but Xenocrates starts with an X. —Keenan Pepper 08:29, 27 January 2008 (UTC)
Thanks! Randomblue (talk) 11:51, 27 January 2008 (UTC)
- The page List of mathematicians has mathematicians by letter. kfgauss (talk) 19:37, 27 January 2008 (UTC)
Finding a PRNG's formula , according to numbers
is it possible to finding a PRNG serie's formula according to 100 (or more) numbers ? here is the example that i would like do : 30,24,10,21,3,25,17,16,34,0,31,26,32,20,3,32,16,9,8,33,20,12,19,20,22 these numbers are in the 0-36 and they created by a random number generator C++ program. i would like to find how it create numbers ( what's the this PRNG's formula ) ? is it possible ? can you share your ideas and formulas please ? thank you, best regards... Adam McCansey —Preceding unsigned comment added by 81.215.240.54 (talk) 12:08, 27 January 2008 (UTC)
- If the PRNG is any good, you shouldn't be able to find the formula based on a few numbers (or even many numbers). Of course, this still leaves the possibility that the PRNG isn't good and then it just might be possible, but probably not easy. -- Meni Rosenfeld (talk) 12:15, 27 January 2008 (UTC)
- It depends what the intended use of the PRNG is for whether or not this will be easy. A PRNG I used for many years to test data transmission lines repeated the pattern after only 1023 bits. Obviously, this would be very easy to crack and would be useless in cryptography. However, it was fine for my purposes, all I really needed was a pattern other than 00000, 11111 or 10101 and that it throws in an isolated 1 or 0 occasionally. It might help you to solve this if you have an understanding of how the generator is physically implemented. My one used a shift register whose outputs were combined through some simple logic gates and then fed back into the shift register input. A knowledge of the length of the shift register and the boolean function of the gates will yield the PR pattern. Working back the other way you would need to trial various logic gates to see if they yielded the measured pattern. If you know the repeat length Log2 will yield the shift register size. Apologies to all mathematicians for drifting slightly off-topic. SpinningSpark 13:48, 27 January 2008 (UTC)
i think need a usefull formula or math ideas instead of words - Adam McCansey —Preceding unsigned comment added by 81.215.240.54 (talk) 14:21, 27 January 2008 (UTC)
- Okay, here's a forumla that will give you the nth number in the series:
- -- Meni Rosenfeld (talk) 14:43, 27 January 2008 (UTC)
- I remember way back in school, someone wrote a program to print a dot on a dot matix printer to according to successive values of a PRNG. The cyclic nature of the PRNG soon became visually apparent. So that would be the first check: what is the period of the sequence? For modern algorithms this wont work as the period will be very big. You may want to Decompile the code, which may be easier than trying to find the sequence. --Salix alba (talk) 14:39, 27 January 2008 (UTC)
- The idea behind a PRNG is that is produces a sequence of numbers that look like randomly chosen numbers. If you find the formula, then the numbers become predictable unlike randomly chosen numbers. So you are not expected to crack the code. From any finite sequence of numbers you can create many algorithms that reproduces this sequence, for example by starting with this sequence and proceeding with the result of any PRNG of your choice, or simply with zeroes. This works, even if it is cheating. Bo Jacoby (talk) 14:48, 27 January 2008 (UTC).
does anyone have an idea about Meni Rosenfeld's formula ? —Preceding unsigned comment added by 81.215.240.54 (talk) 14:57, 27 January 2008 (UTC)
- It was sarcastic. It does give the correct values for those elements in the sequence you have provided (n from 1 to 25), but not for the subsequent values. It was inspired by my annoyance from you ignoring our advice that for a good general-purpose PRNG this is impossible at worst, and depends on additional information about the program and its implementation at best, and insisting on a simple "cookie-cutter" formula. -- Meni Rosenfeld (talk) 15:06, 27 January 2008 (UTC)
It is a polynomial in the number of terms in your sequence, whose roots are your original sequence. I think Meni might be having a gentle joke with you. SpinningSpark 15:07, 27 January 2008 (UTC) Oops, sorry, I had not noticed Meni had already replied. SpinningSpark —Preceding comment was added at 15:08, 27 January 2008 (UTC)
- I don't think you didn't notice it, rather that I have posted it while you were typing. You didn't get an ec because you added a blank line. -- Meni Rosenfeld (talk) 15:28, 27 January 2008 (UTC)
- Basically if you are lucky they might be using a linear congruential generator with formula: , if you are unlucky they are using a cryptographically secure pseudorandom number generator which are designed so that you can't predict the next term from those previously. --Salix alba (talk) 15:23, 27 January 2008 (UTC)
- It can't be that simple, since 20 occurs thrice, each time with a different successor. --Lambiam 01:33, 28 January 2008 (UTC)
Just to say it explicitly - if your random numbers start to repeat over 36 values then you can find the formula using those 36 values (as shown above) - if the formula repeats over more than 36 values and you only have 36 values then you can't get the formula.. Obviously this applies for values other than 36. So if you want to find the formula - write a program to search for the point at which the random numbers repeat - assuming this ever happens (it's not neccessary that they will but I'd guess that most common (fast) methods will)77.86.108.68 (talk) 18:49, 27 January 2008 (UTC)
Utility of money
What type of formula for total utility of income or net worth is most popular or most theoretically sound? An nth root? A logarithm? A bounded function? Or something else? NeonMerlin 13:33, 27 January 2008 (UTC)
- I haven't seen many treatments of this, and I don't recall any particular function being proposed as a candidate. I'd say the function should be bounded. If you have an arbitrarily large amount of usable money, at best this means that you can decide what every person on earth will do - and this has a finite utility. -- Meni Rosenfeld (talk) 14:02, 27 January 2008 (UTC)
- As the actual amount of money is finite, the utility function does not have to be theoretically bounded for infinite amount of money. A resonable model is f(x)=xa, where a<1 when money is less valuable to the rich than to the poor. Bo Jacoby (talk) 14:09, 27 January 2008 (UTC).
- Utility#Utility of Money has some pointers, apparently bounded and asymmetric about the origin, concave in the positive region. --Salix alba (talk) 14:19, 27 January 2008 (UTC)
- I think governments can create new money how they see fit. In normal circumstances this will create inflation and cause all sorts of problems, but the point remains that the US government can decide to create dollars and give them to some person.
- Disregarding all of this, a logarithmic model makes much more sense. If a person's entire net worth is 100$ and he gains another 100$, the increase in his utility is comparable to a person whose worth is 1M$ when he gains another 1M$. -- Meni Rosenfeld (talk) 14:24, 27 January 2008 (UTC)
- James Heckman has a paper where he uses a Box-Cox transformation to answer this question for some particular data. Log comes out best. Plus, as Meni Rosenfeld points out, it has a much stronger theoretical framework. Pdbailey (talk) 16:20, 27 January 2008 (UTC)
- The use of y=log(x) for utility function has the following unpleasant consequences. The utility of one dollar is zero, and the utility of zero dollars is minus infinity. The use of the power function y=xa has the following pleasant consequences. The utility of zero dollars is zero, and the special case y=x, appearing for a=1, means that the utility of money equals the amount of money, and a small perturbation, a=0.95, means that the marginal utility of extra money, dy/dx, is 5% less than the average utility, y/x. Bo Jacoby (talk) 23:02, 27 January 2008 (UTC).
- As the actual amount of money is finite, the utility function does not have to be theoretically bounded for infinite amount of money. A resonable model is f(x)=xa, where a<1 when money is less valuable to the rich than to the poor. Bo Jacoby (talk) 14:09, 27 January 2008 (UTC).
Factorising programs
I usually spend several days a week away from home in hotels and need something to amuse myself in between drinking at the bar. I have been using my laptop to search for large primes. I use uBasic to find factors of (n-1) or (n+1) and then use these factors in a helper file fed in to PrimeForm/GW. Unfortunately, some of the numbers I am currently trying to get a solution for will not factorise in the time I have available (I need to stop the program when it is time to go and do some work). Does anyone know where I can get a factorising program that is faster than uBasic, or alternatively, is able to store its interim results and pick up the calculation later. SpinningSpark 15:31, 27 January 2008 (UTC)
- This will depend on what you mean by a large prime. If you mean really large, you could join the Great Internet Mersenne Prime Search, but that'll take several months per prime on most computers. Algebraist 16:17, 27 January 2008 (UTC)
- You can try Yves Gallot's Proth.exe, which you can stop and resume later, but it only handles numbers of certain forms. There's a list of programs for finding primes at The Prime Pages from the University of Tennessee at Martin. —Bkell (talk) 16:48, 27 January 2008 (UTC)
- Thanks Algebraist, but I am already in GIMPS and have every intention of being the first to a 10,000,000 digit number (actually it will be 11,000,000 judging by the numbers primenet is currently allocating to me). I run it 24/7 on a computer at home. I was really looking for something that could be run in brief periods on my laptop. For various reasons, I need my laptop clear of everything else while I am working, so I would not want Prime95 permanently loaded. Besides, as it practically runs itself it is not exactly going to provide any entertainment value for me.
- I was looking for something like uBasic that is very general purpose but a bit faster. The specific numbers I was attempting recently are of the form 3n-2. I had in mind attempting (wildly ambitious I know) the probable primes of this form listed at Henri & Renaud Lifchitz's website. I have been working my way through the known primes of this form listed in the OLEIS to verify my method but got stuck on the very largest ones because I could not give uBasic sufficient time to get some factors. SpinningSpark 17:36, 27 January 2008 (UTC)
- And just to clarify, I don't need a program to test for primality, PrimeForm/GW does Lucas-Lehmer tests etc and is very general purpose. What it cannot do is find factors of (n-1) over a certain size but if I know the factors I can tell PrimeForm about them in a helper file. That is why I need a factorising program. SpinningSpark 17:54, 27 January 2008 (UTC)
Machine-learning databases in Euclidean form
Hi. I am currently working on Semi-supervised learning, and in my framework the data is assumed to be points in an Euclidean space. I am interested in finding out if there are datasets originating from real-world applications that have a certain feature I am exploring.
I'm having trouble finding a dataset to even test this. The most commonly used data is images, and one would think their pixel values could be used as Euclidean coordinates, but the truth is that Euclidean distance is usually pretty meaningless when it comes to images, and this is thus not suitable for my purporses.
So my questions are - does anyone know of a way to turn an image into a point in an Euclidean space such that the Euclidean distance is a meaningful indication of the difference between the images? And, does anyone know where I could find datasets (based on images or anything else) for which this processing has already been made and they are meaningfully Euclidean "out of the box"?
Thanks. -- Meni Rosenfeld (talk) 16:39, 27 January 2008 (UTC)
- Have a look at Eigenface which is one method for getting meaningful euclidean cordinates out of images. The key idea hear is first register the images, then perform Principal components analysis of the set of images. This reduces the dimension of the problem and you can use the coeficients as you euclidean coordinates. --Salix alba (talk) 17:14, 27 January 2008 (UTC)
- That's a good start, but it seems to me that the PCA already assumes that the original data is Euclidean. It might be able to "amplify" the "Euclideanity" of a dataset in which there is already some (such as faces in consistent conditions), but I suspect that it will fail miserably if applied to a set such as Caltech 101. I'll try this out, but I'll be happy to hear other suggestions. -- Meni Rosenfeld (talk) 17:42, 27 January 2008 (UTC)
- Now wait just a minute here... The PCA is an orthogonal transformation, thus the distances between the PCA coordinates vector of a point (if all components are kept) is exactly equal to the Euclidean distance of the points themselves. So this doesn't help. -- Meni Rosenfeld (talk) 19:17, 27 January 2008 (UTC)
- Ah I didn't pick up on the euclidean distance, this is likely to make some learning tasks harder, you probably can do some form of clustering but you are going to loose a lot of information. With PCA typically the first 10 or so components will be kept and the rests discarded. You could then use 10D vectors as input to the training phase. Is there a reason you need to use euclidean distance? --Salix alba (talk) 23:20, 27 January 2008 (UTC)
January 28
measurements
What is 15 Spiritual Cubits in measurement?