I am trying to solve one graph traversing problem which might be classical to guys who are familiar with the topic. However, I am not. I have directed graph where nodes are cities and plane can fly from one to another. The network is quite complex. I have to find number of paths from e.g. Atlanta to Orlando with defined (zero, one, two…) number of stops. I do this by multiplying adjacency matrix exact number of times (repeated squaring) which gives distance matrix. The problem is how to eliminate redundant paths e.g. Atlanta-Boston-Atlanta-Orlando. This path has two stops which is O.K. from the algorithm point of view (if we need two stops) but makes no sense. Is there algorithm to eliminate such paths?
How can I go about determining the number of unique simple paths within an undirected graph? Either for a certain length, or a range of acceptable lengths.  Recall that a simple path is a path with no cycles, so I'm talking about counting the number of paths with no cycle.
I have a question about the following passage on pg. 89 of Zee's QFT in a nutshell:     At first sight, what Dirac wanted does not make sense. The equation is supposed to have the form "some linear combination of $\partial_\mu$ acting on some field $\psi$ is equal to some constant times the field." Denote the linear combination by $c^\mu\partial_\mu$. If the $c^\mu$'s are four ordinary numbers, then the four-vector $c^\mu$ defines some direction and the equation cannot be Lorentz invariant.   The simplest equation I can construct that he is referring to is  $$(c^{\mu}\partial_{\mu}-m)\phi(x)=0, $$  for $m&gt;0$. Taking $\phi(x)\rightarrow\phi(\Lambda^{-1}x)$, and $c^{\mu}\rightarrow\Lambda^{\mu}_{\ \ \nu}c^{\nu}$. Then, the left term transforms like   \begin{align*} \Lambda^{\mu}_{\ \ \nu}c^{\nu}(\Lambda^{-1})^{\sigma}_{\ \ \mu}\partial_{\sigma}\phi(\Lambda^{-1}x) &amp;= \delta^{\sigma}_{\ \ \nu}c^{\nu}\partial_{\sigma}\phi(\Lambda^{-1}x)\\ &amp;=c^{\sigma}\partial_{\sigma}\phi(\Lambda^{-1}x). \end{align*}  Then, we have that   $$ (c^{\sigma}\partial_{\sigma}-m)\phi(\Lambda^{-1}x)=0.$$  But doesn't this show that the equation is Lorentz-invariant? opengl storing multiple indices into indices buffer After parsing collada files I found out that we have to load two(or more) indices each pointing to say a vertex or normal etc. like this (&lt;p>3 0 2 0 0 0&lt;/p>)  Is there a way to load (and use)these indices to indices buffer(ELEMENT_ARRAY_BUFFER) like this (vnvnvn...) ; where v is vertex pointer, n is normal pointer from the above. with vertices loaded to VBO1 like (vvvv...) and in VBO2 like (nnnn...). So that we dont have to repeat the normals in VBO2.  VBO like (vnvnvn...) is also ok. (and not something like this ), I'm not trying to use multiple indices buffer. I'm trying to put all the given indices into one index buffer and use them alternately.  (If I wasnt clear i will try for more clarification.) What form of the verb is used with compound subjects containing "or"? What are some useful, undocumented Mathematica functions? ROC vs Precision-recall curves on imbalanced dataset I just finished reading  discussion. They argue that PR AUC is better than ROC AUC on imbalanced dataset.   For example, we have 10 samples in test dataset. 9 samples are positive and 1 is negative. We have a terrible model which predicts everything positive. Thus, we will have a metric that TP = 9, FP = 1, TN = 0, FN = 0.  Then, Precision = 0.9, Recall = 1.0. The precision and recall are both very high, but we have a poor classifier.  On the other hand, TPR = TP/(TP+FN) = 1.0, FPR = FP/(FP+TN) = 1.0. Because the FPR is very high, we can identify that this is not a good classifier.  Clearly, ROC is better than PR on imbalanced datasets. Can somebody explain why PR is better? What did Hegel mean by 'world spirit'? I understand that Hegel intends to justify the history of mankind by stating that every town and society that has existed has been a test indirectly arranged by the 'world spirit' in order to eventually create a town in which people would live ethically, and that this process has been done in order for the 'world spirit' to become aware of its freedom. But what exactly is this 'world spirit'?   In the last quiz of a course I'm taking (I´ve taken this year a philosophy course at college), I wrote that the 'world spirit' was some kind of parasitic entity which inhabits every human being that has existed and is going to exist. Does this seem right? CPU on Ubuntu running high In the terminal I used "top" to check the processes and how much of the CPU was being used as I thought max was 100%, so I restored 292,000 photos with recoverjpeg on my sda1 HDD, I opened the folder and the Nautalis is  fluctuating between 130% and 170% , should I close the program and am I at risk of my gpu locking up ? I am trying to rename my Windows / Boot Camp partition from "EFI Boot" to "Boot Camp" or "Windows". But I do not figure out where to rename.   I tried bless command on the NTFS Volume, I tried creating the folders "System/Library/CoreServices" and copied the .disklabel file into it (or also blessit) but nothing changed.  Finally I got the Volume Icon on Boot Selection to work by copying the icns File onto the EFI partition. Also tried blesson the EFI partition – but this also do not work.  So I have my Icon, but I also would like to rename it – how can I do this?  Systems are Windows 10 and macOS Mojave. Split seeds.rb into multiple sections? How to find a whole word in a String in java How to install software provided in software-center via terminal? How do I run two commands in one line in Windows CMD? Mail vs. mail what is the difference What is this business about mail and Mail? [On a CentOS box] Why mail does not work but won't return an error either while Mail works fine with the exact same syntax?  Mail is basically a link to mail, isn't it?  Sorry, this was a mixup, apparently (for historical reasons?!) there is a mail and a Mail  Nowadays it looks like they both point to the same thing, on my machine:  sr-linux&gt; ls -l `which mail` -rwxr-xr-x    1 root     mail        66492 Jun 24  2001 /bin/mail sr-linux&gt; ls -l `which Mail` lrwxrwxrwx    1 root     root           14 Nov 19  2001 /usr/bin/Mail -&gt; ../../bin/mail Limit $\frac{x^2y}{x^4+y^2}$ is found using polar coordinates but it is not supposed to exist. Consider the following 2-variable function:     $$f(x,y) = \frac{x^2y}{x^4+y^2}$$   I would like to find the limit of this function as $(x,y) \rightarrow (0,0)$.   I used polar coordinates instead of solving explicitly in $\mathbb R^2 $, and it went as the following:  $$ x = r \cos \theta, \qquad y = r\sin\theta $$   Hence,  $$\lim_{(x,y) \to (0,0)} \frac{x^2y}{x^4 + y^2} = \lim_{r \to 0}\frac{r^2\cos^2\theta(r\sin\theta)}{r^4\cos^4\theta + r^2\sin^2\theta}$$  This simplifies to,  $$ \lim_{r \to 0} \frac{r^3 \cos^2\theta\sin\theta}{r^2(r^2\cos^4\theta + \sin^2\theta)}$$  Simplifying $r^3/r^2$, we finally get;  $$\lim_{r \to 0} \frac{r (\cos^2\theta\sin\theta)}{r^2\cos^4\theta + \sin^2\theta}$$  Now from the above, we find that as $r \to 0$ the limit is $0$.   I wanted to verify this answer so I checked on Wolfram Alpha. Explicitly without changing to polar coordinates, it said that the limit does not exist at $(0,0)$ and rightly so. Then how is it that with polar coordinates, the limit exists and is $0$? Am I doing something wrong in this method?  Also, what should I do in this situation, and when should I NOT use polar coordinates to find limits of multi-variable functions? App question timer shouldn't kick in until submission I attempted to ask a question using the iOS app, but it was rejected due to lack of a required tag. On adding the tag I found that I wasn't permitted to submit the question for another 60 seconds, even though this wasn't a new question.  Is this timer intentional, or should it not kick in for edits of questions not actually accepted by the site? Interscholastic Mathematics League Senior B Division #2 Points $P$, $Q$, $R$ and $S$ are chosen on the sides of parallelogram $ABCD$, so that $P$ is on line $AB$, $Q$ is on line $BC$, $R$ is on line $CD$, $S$ is on line $DA$, and $AP=BQ=CR=DS=\frac{1}{3}(AB)$. Compute the ratio of the area of $PQRS$ to the area of $ABCD$. Using matplotlib in pygame Can't create new folder from anywhere in Windows 7 I have this problem on two of my new laptops and can't seem to find a decent workable solution elsewhere in forum land. The problem is that on my Windows 7 Professional machines the right mouse button doesn't show the New Folder option and elsewhere as well (via Explorer) I'm unable to create new folders.   I'll be happy to get this tiny problem resolved and declare that Windows 7 is almost perfect! Thanks to all of you in advance for your contribution!  PS: None of the Vista solutions seem to work here!      Tried NewFolderFix.reg, didn't work - "Not all data was succesfully written to the registry. Some keys are open by the system or other processes."  Converted FolderFix.reg to .inf file and that worked.  Don't recall the problem appearing after an update.  MS answer to the explore process hanging (KB 972685) was to install the latest Visual C++ Update (vcredist.exe).  Nope. That didn't help either.  I haven't touched Silverlight since installation when Windows 7 hit the shelves. I tortured the RC installation before that, and never had problems there either.    UPDATE-  Logged back into Administrator account, still missing from there. Spent a bit more time looking instead of just fixing. Just yto make sure, logged back into my user account - still OK there.  Turns out the entries in HKCR\CLSID were the culprit here. Reg file wouldn't take again (as above) but inf file fixed it. This key was unable to be entered from regfile, or altered or deleted in Regedit (Permissions).   Don't quite understand why a common key in HKCR needed to be entered separately for each user.   Here is the file I used to fix it. Just copy into notepad, save as newfolderfix.inf, rt-click and select Install  ================================================================  [Version]  Signature=$Windows NT$  [DefaultInstall]  AddReg     =REGEntries.AddReg  [REGEntries.AddReg]  HKCR,"%String0%",,0x0,"CLSID_ExecuteFolder"  HKCR,"%String0%\InProcServer32",,0x0,"ExplorerFrame.dll"  HKCR,"%String0%\InProcServer32","ThreadingModel",0x0,"Apartment"   [Strings]  String0 = "CLSID\{11dbb47c-a525-400b-9e80-a54615a090c0}"  =============================================================   Thanks to others who helped point me in the right direction. How do I get an animated gif to work in WPF? Have red shifted photons lost energy and where did it go? I think the title says it. Did expansion of the universe steal the energy somehow?