The question i am going to ask is very much similar to this question-  But the problem here is, the radius of the spheres are too small (within 8 meter). I have used the Newton-Raphson method with Jackobian matrix to calculate a point which is exist in the intersection area of three spheres. I have the (lat,long) and a radius for three spheres and may be more. But every time I am getting a matrix which is not invertible. To apply NR method I've first convert the lat,long to x,y,z by this  lat = toRadians(latitude); lon = toRadians(longitude); x = earthRadius * cos(lat) * cos(lon); y= earthRadius * cos(lat) * sin(lon); z = earthRadius * sin(lat);   and used this as a center of a sphere and use r/1000 as radius (converted to KM) of that sphere. Algorithm starts with an initial point which i have considered the centroid. I guess it is for the Bad Starting Point. The radius is calculated form the signal strength of the different wi-fi access points(AP). The number of spheres are dependent on how many APs are available. Any advice would be helpful for me. EDIT The story repeated many times in stack exchange. I have 3 wi-fi APs with known (lat,lng) and using RSSI, I am calculating the distance (i.e. radius) in meter. Now I need to calculate the location of the mobile user. Main problem is the RSSI is fluctuating and in result estimated distance can not be estimated correctly. That's why the spheres are not always intersecting. But Newton-Raphson should try to find the intersection which is not happening. It throws an error that matrix is not invertible. Generated matrix may be or may not be square. If it is not square then used .
I need to find algorithm that can calculate centroid A (aka gravity center, geometric center, center of mass) from the figure where circles T1,T2,T3,T4,T5,..,Tn intersect AND length of line R from centroid to farthest corner of mentioned figure   Following information is given:   T1   Latitude    =   56.999883   Longitude   =   24.144473   Radius  =   943 T2   Latitude    =   57.005352   Longitude   =   24.151168   Radius  =   857 T3   Latitude    =   57.005352   Longitude   =   24.163356   Radius  =   714 T4   Latitude    =   56.999042   Longitude   =   24.168506   Radius  =   714 T5   Latitude    =   56.994226   Longitude   =   24.15709    Radius  =   771   Result should look like this:  A Latitude = XX.XXXXXXX    Longitude = XX.XXXXXXX  Radius = XX    As you probably already figured out, I am working on software that can find device location by closest Wifi Access Points or Mobile Base stations, as number of access points or base stations might change, I need an algorithm that can adapt to uncertain amount of points.  There are some similar questions  and , but none of them exactly answers to my question.
Example of a domain where all irreducibles are primes and that is not a GCD domain One has the following relations for a domain $R$:  $R$ GCD domain $\Rightarrow$ All irreducible elements are prime  $R$ PID $\Rightarrow$ $(R$ GCD domain $\land$ $R$ statisfies ACCP$)$  $R$ UFD $\Leftrightarrow$ $(R$ GCD domain $\land$ $R$ satisfies ACCP$)$  $R$ satisfies ACCP $\Rightarrow$ $(R$ UFD $\Leftrightarrow$ All irreducible elements are prime$)$  $R$ GCD domain $\Rightarrow$ $(R$ UFD $\Leftrightarrow$ $R$ atomic domain$)$  So what is the difference between a GCD domain and a domain where all irreducible elements are prime? What is the "weakest" predicate $P$ such that  $R$ GCD domain $\Leftrightarrow$ $($All irreducible elements are prime $\land$ $P(R))$ ? Project Euler - 34 / Find a mathematical approach for upper bound 145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145. Find   the sum of all numbers which are equal to the sum of the factorial of   their digits. Note: as 1! = 1 and 2! = 2 are not sums they are not   included.   So I tried a random enough large upper bound (100000) in my program and it worked.  I deleted this part to not spoil the answer  My question is : How to find the closest upper bound using a mathematical approach ? Is it possible to install Ubuntu on my Windows 8 computer without any CD or USB drive? Please read entire post CAREFULLY before answering.  This question will make you confused if you don't.  Information (May skip :P)   OS : Windows NT 6.2 (Windows 8 K) Equipped hard disk   Total 1TB, 1 disk C: (Simple Layout, NTFS, Boot, Pagefile, Crash dump, Main): total 488,039,776,256 bytes, used 93,473,599,488 bytes D: (Simple Layout, NTFS, Main): total 486,859,075,584 bytes, used 8,426,016,768 bytes hidden: Ask if needed  Brand(manufacturer): Samsung Electronics Processor(CPU): Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz RAM: 8GB , 64-bit , OS 64-bit   Question (READ THEM ALL VERY CAREFULLY)   Is there any way to install Ubuntu on this computer without any external disk (CD, USB drive, etc) Note : This computer is 64-bit, so  did not help me. WUBI does not support UEFI, and This computer uses it. No Virtual PC programs like VirtualBox or VMWare, because it takes memory.   EDIT : I already found a USB drive in my home, so now it is installed on my computer xD Light emission from the vicinity of a black hole The photograph of the black hole, at the centre of galaxy M87, is now a part of human history. We are told that the red-colour is caused by hot gas, matter &amp; radiation around the "edge", the Event Horizon. Given the power of the gravitational forces emanating from black hole, why aren't these three things drawn into the abyss? If light is bent/ drawn into the BH, how does this red image arise? The logic, here, would be that a body, on the Event Horizon, is immune from the gravity--which sounds pretty fatuous? Iterating each character in a string using Python In C++, I can iterate over an std::string like this:  std::string str = "Hello World!";  for (int i = 0; i &lt; str.length(); ++i) {     std::cout &lt;&lt; str[i] &lt;&lt; std::endl; }   How do I iterate over a string in Python? Proof verification: Set of partial limits of a sequence is closed Is soaking beans 24 hours unrefrigerated safe? It strikes me as an unsafe food practice to follow Cook's Illustrated's advice for soaking dried beans for 24 hours unrefrigerated.  I've also seen them suggest you soak steel-cut oats unrefrigerated overnight.    Is there some reason why these practices are okay?  Would there be any harm in refrigerating them, particularly the beans, while soaking?  From Cook's Illustrated:     Dissolve 3 tablespoons salt in 4 quarts cold water in large bowl or   container. Add [one pound] beans and soak at room temperature for at least 8 hours   and up to 24 hours. Drain and rinse well. Proof of continuity of Thomae Function at irrationals. In :  $$ \begin{align} t(x) = \begin{cases} 0 &amp; \text{if $x$ is irrational}\\ \frac{1}{n} &amp; \text{if $x = \frac{m}{n}$ where $\gcd(m,n) = 1$} \end{cases} \end{align} $$  I can prove the discontinuity at rational $b$ by taking a sequence of irrationals $x_n$ which converge to $b$.   But while going through an argument for continuity at irrationals.  I found this in a book.      On the other hand if $b$ is an irrational number and $\epsilon &gt; 0$   then there is a     natural number $n_0$ such that $1/n_0 &lt; \epsilon$.   There are only finite number of rationals with denominator less than   $n_0$ in the interval $(b-1,b+1)$. Hence we can find a $\delta &gt; 0$   such that $\delta$ neighbourhood of $b$ contains no rational with   denominator less than $n_0$.   I understand the rest of the proof. But I am unable to prove the emphasized text. Although I find it intuitive. Unzip a file with php I know that python has a len() function that is used to determine the size of a string, but I was wondering why it's not a method of the string object.  Update  Ok, I realized I was embarrassingly mistaken. __len__() is actually a method of a string object. It just seems weird to see object oriented code in Python using the len function on string objects. Furthermore, it's also weird to see __len__ as the name instead of just len. If the dual spaces are isometrically isomorphic are the spaces isomorphic? Inequality involving the sup of a function and its first and second derivatives Let $f:\mathbb{R} \to \mathbb{R}$ be a twice differentiable function. And let  $$\eqalign{   &amp; M_0  = \sup \left|f(x)\right|  \cr                &amp; M_1  = \sup \left|\frac{d}{dx} f(x) \right|  \cr                &amp; M_2  = \sup \left|\frac{d^2}{dx^2} f(x) \right| \cr }$$ Prove that  $$M_1 ^2  \leqslant 4M_0 M_2$$ I can not think how I can relate these values ​​in some inequality )= In Java, how do I call a base class's method from the overriding method in a derived class? How many people have undergone carbon freezing in Star Wars? We all know the story of Han Solo being a guinea pig for the planned freezing of Luke Skywalker, but how often are people "stored" in this way? "Nikki's and Alice's X" vs. "Nikki and Alice's X" I've been asked to show that:  $n(n+1)(2n+1) \equiv 0 \pmod 6$  I found in a previous question that:  $n(n+1)$ was divisible by $2$ and resulted in an even number e.g  $n(n+1) \equiv 0 \pmod 2$  so I figured I needed to find:  $(2n+1) \equiv 0 \pmod 3$ in order to complete  $n(n+1)(2n+1) \equiv 0 \pmod 6$  but I am unsure on how to find $(2n+1) \equiv 0 \pmod 3$  Is this the right way to find the mod 6 and if so could you tell me how I could find  $(2n+1) \equiv 0 \pmod 3?$ Initialize class fields in constructor or at declaration? I've been programming in C# and Java recently and I am curious where the best place is to initialize my class fields.  Should I do it at declaration?:  public class Dice {     private int topFace = 1;     private Random myRand = new Random();      public void Roll()     {        // ......     } }   or in a constructor?:  public class Dice {     private int topFace;     private Random myRand;      public Dice()     {         topFace = 1;         myRand = new Random();     }      public void Roll()     {         // .....     } }   I'm really curious what some of you veterans think is the best practice. I want to be consistent and stick to one approach. Floquet and Bloch's theorems : connection? It is often stated that  and  are equivalent, even the Bloch's theorem is often referred as Floquet-Bloch theorem.  However, it seems quite confusing to me since the former involves a second order differential equation (Schroedinger equation with a periodic potential) while the latter is defined for a first order one.  Can someone clarify this to me? Also it would be nice if I can get references that connect the two. Can I apply for a Schengen visa of the first port of entry or does it need to be the country of the longest duration? I'm planning to travel to the Netherlands, Spain and Bulgaria. My longest stay will probably be in Bulgaria. Now, Bulgaria doesn't issue a Schengen visa but allows people with a Schengen visa to visit. Which visa should I be applying for? Bulgarian Visa AND Schengen visa or just the Schengen visa for Netherlands or Spain? How to allow Page Up in GNU Screen? I use Vim to edit text files on Linux. Commonly I connect to remote Linux machines using PuTTY from Windows.  I use GNU Screen commonly as well.  When using Vim inside Screen I am unable to use the Page Up key because Screen interprets it as a command to start copy mode.    I would like to use Page Up for its regular up-paging functionality.  How can I configure Screen to do this?