Wikipedia:Reference desk/Archives/Mathematics/2017 December 23

Mathematics desk
< December 22 << Nov | December | Jan >> Current desk >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


December 23 edit

Union of half planes in linear programing edit

Hi all
Let P be a polygon in the XY grid. I would like to find some (or all) vector r going from a given vertex v of the polygon, such that its direction is towards the interior of the polygon, and I would like to do it using constrains of linear programming. When the vertex is convex it's easy. (I demand that v+r is inside both half planes defined by the edges that touch v. The problem in fact is intersection of two half planes). But how can i do it in case of non convex vertex? How can I, using linear constrains, demand that some point is in the union of two half planes?
Thanks in advance — Preceding unsigned comment added by 185.120.124.132 (talk) 09:03, 23 December 2017 (UTC)[reply]

Aren't you just talking about not( not one half plane AND not he other half plane) and you already know about AND'ing them? Dmcq (talk) 12:23, 23 December 2017 (UTC)[reply]
More generally, the intersection of half planes is always convex, so if your region of feasibility is not convex then you need to break it up in to convex regions if you want to use linear programming. In other words, LP only handles convex angles, so for nonconvex angles you need to use additional techniques. It's not as big of a limitation as you might think though, since there are plenty of practical optimization problems where the region of feasibility is convex. If you do have case where the region is nonconvex, then you might first find the optimum on the convex hull of the region, test if it's in the original region, and if it isn't then try to find an additional constraint which eliminates the solution; this idea is sometimes used in integer programming. --RDBury (talk) 16:18, 23 December 2017 (UTC)[reply]
If you can find some (or all) points p in your polygon, then for each p the vector pv is your desired r. And you can find all p e.g. by triangulation (see the Polygon triangulation article). --CiaPan (talk) 22:29, 23 December 2017 (UTC)[reply]

Number of correct decimal digits when evaluating   edit

I am using the arctan series—I'm aware of its many shortcomings, but this is for a teaching project: I have no ambitions to break records! How would I go about evaluating the number of correct decimal digits? I have no idea.--Leon (talk) 11:33, 23 December 2017 (UTC)[reply]

I suppose you are using the simplest series for arcttan then with 2n+1 in the denominator. Just assume that all he denominators are constant and you add all the remaining terms instead of having an alternating series and that will give an easy series to sum which gives an upper bound on the error. There's better approximations for Taylor's series but that's simple enough without going into all that. Dmcq (talk) 12:14, 23 December 2017 (UTC)[reply]
I'm using 1 - 1/3 + 1/5, so if all the denominators are the same all the terms are the same, so I can't sum that series.--Leon (talk) 12:22, 23 December 2017 (UTC)[reply]
I assumed you would be using one of the pi arctan expressions with x < 1. In that case try pairing up pairs as in 1/(2n+1) -1/(2n+3) = 2/(4n^2+8n+3) which is less than 2/(4n^2) or 1/2n^2. A series of 2^k these starting at n=2^k is bounded by 2^k( 1/2.2^2k ) = 1/2^2^k, the next stretch starts at 2^(k+1) so again this gives a geometric series to sum up for a bound. Dmcq (talk) 12:40, 23 December 2017 (UTC)[reply]
In Pi#Infinite_series it says using that series you'll only get 5 digits correct after 500,000 terms, so it doesn't converge fast. Dmcq (talk) 12:54, 23 December 2017 (UTC)[reply]
In general, for an alternating series, in the worst case the error is same size as the terms. So, for example, if you want π to within .00001 then you need to have π/4 to within .0000025 and so terms 1/(2n+1) < .0000025. This works out to n≥200000. --RDBury (talk) 16:43, 23 December 2017 (UTC)[reply]
Now that's silly of me. That was the first thought that occurred to me and of course it is straighforward when the terms always get smaller, I had no good reason to reject it. Dmcq (talk) 16:52, 23 December 2017 (UTC)[reply]

Just use the archimedes method it is easy to understand even for school children. https://www.craig-wood.com/nick/articles/pi-archimedes/ Ohanian (talk) 03:09, 26 December 2017 (UTC)[reply]

That requires the square root: a goal of my toy program is to avoid floats (or obviously reals). Otherwise good idea.--Leon (talk) 11:21, 27 December 2017 (UTC)[reply]

You can resum the series using just a few terms quite accurately using many different methods. One such method is based on the fact the error is bounded by the last term as also pointed out above. If you then include an auxiliary parameter in the series such that the sum doesn't depend on it but the indidual terms do depend on it, then the optimal choice that gets you the best approximation after truncating is given by the value of the parameter that makes the last term zero. In case of the Leibniz series:

 

we can multiply the nth term by $x^n$, and if we truncate at some order N this gives us a function   defined as:

 

We want to evaluate this for  , but we then get the old, slowly converging Leibniz series back. Instead we can substitute for x a function of another variable z that evaluates to 1 for some z, say, z = 1. We choose this function such that it becomes proportional to z for small z, allowing us to re-expand   in powers of z. Let's choose:

 

Then for z = 1, x = 1. Expanding   in powers of z for N = 10 and equating the coefficient of   to zero yields many solution for p. We then choose that solution that minimizes the modulus of the coefficient of  , this turns out to be  , and for that value the sum of the series for z = 1 times 4 equals  . We can do much better with only ten terms by including more parameters in the function that defines that defines the transform from x to z and equating more terms of the series to zero. But we can get a better approximation using a much simpler method, where we use the next best solution  that yielded a next smallest value for the coefficient of   and take the linear combination the two series with the two different values for p to eliminate that term. This then yields the approximation for   of  , so we gain a decimal by combing the best solution with a next best one. And we can gain more by taking the third best solution and eliminating one more term of the series. Count Iblis (talk) 18:22, 30 December 2017 (UTC)[reply]

Can I take apply to the University of Cambridge edit

I want know can I take apply to the University of Cambridge in Great Britain and how.

I have some dreams on number theory that I like reach them of course surely I can succeed and I like my parents and me go to Britain together.

Please guide me about laws. Alireza Badali (talk) 16:16, 23 December 2017 (UTC)[reply]

Your talk page is most interesting. This article Srinivasa Ramanujan may be helpful. 92.8.223.3 (talk) 17:00, 23 December 2017 (UTC)[reply]
I have seen his narrative movie but what do you mean by helpful?! Alireza Badali (talk) 19:20, 23 December 2017 (UTC)[reply]
The process for undergraduate applications (for non-UK residents) is described here. The graduate applications process is described here. Gandalf61 (talk) 21:22, 24 December 2017 (UTC)[reply]
I am   years old and I don't have a good CV at bachelor and master's course and I have forgotten almost all of lesson contents and somehow now I am undergraduate of course I would write some exciting phrases to show I am amazing and now I don't know this request for applying to Cambridge is silly or wisely but I think you know me as a fool, but I want be sure that this university will accept me or not before than any request because I scare fear they will laugh to me!
But the truth is that I can solve open problems in number theory if I study in Cambridge! Alireza Badali (talk) 10:23, 25 December 2017 (UTC)[reply]
Yes, they almost laughed at Ramanujan until Hardy saw some of his work. If you are as good as you say you are, then perhaps you should send some of your work to Cambridge (or Oxford, where I could possibly find you a contact). It sounds as if you have already tried to contact mathematicians in Iran. There can be various reasons why you feel you are "alone standing against the wind", and I'm not qualified to state an opinion on your work. It's unlikely that coming to Cambridge to study or research will automatically get your parents into the UK. Dbfirs 20:49, 25 December 2017 (UTC)[reply]
You gave more motivations to me, thank you so much, I wish see you, and in Iran I haven't tired to contact mathematicians because my notes are theoretical and philosophical till mathematically and I think nobody likes such notes (However in Iran always there were some mathematicians that were supporting me but because of I wasn't routine they couldn't decide about me.) and since my theories are alone and new (when I talk about homotopy groups that is key of number theory.) then I feel I am "alone standing against the wind", and I think "unlikely" is a word only about my parents and me! Alireza Badali (talk) 09:13, 26 December 2017 (UTC)[reply]
I feel Cambridge is mine. Alireza Badali (talk) 17:19, 29 December 2017 (UTC)[reply]