Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using this technique to find the PR of these 3 pages. It converges to something it shouldn't be. I tried the same iteration in Java and 2 pages come up with 1.333 and the other one as 0.666. Mathematica is calculating something differently. Here's my code:

g = {"Netscape" -> "Amazon", "Netscape" -> "Netscape", 
   "Amazon" -> "Netscape", "Amazon" -> "Microsoft", 
   "Microsoft" -> "Amazon"};
pr = PageRankVector[g]
 VertexRenderingFunction -> (Text[
     Framed[#2 <> "\n" <> 
       ToString[pr[[#3]]], {Background -> RGBColor[1, 1, 0.8], 
       FrameStyle -> RGBColor[0.94, 0.85, 0.36]}], #1] &), 
 DirectedEdges -> True]
share|improve this question
You probably have a problem in your Java code or others settings for TeleportProbability. But 1.333 and 0.666 doesn't add up to one, which it should, so I am positive that you have an error in your Java code. – C. E. Jan 27 '14 at 21:44
How do I set Teleport in Mathematica to 0? And in my Java, I am not using any damping at all, so it's the plain PR formula, as described here I am getting the same results as Stanford, so probably because Mathematica is indeed using a teleportation probability. – Ali Gajani Jan 27 '14 at 22:35
You have to look in the documentation. ` PageRankVector[g,TeleportProbability->0]` – Ajasja Jan 28 '14 at 21:38

In the case that this does not closed I'll answer this temporarily (so that there won't be so many unaswerd questions aound)

The problem is TeleportProbability as guessed by @Pickett. To set it to 0 you just have to look in the documentation.


share|improve this answer
Unfortunately setting the value to zero will cause The value of option TeleportProbability -> 0 should be a positive machine real number less than 1. and setting it to a small value did not produce the right result for me. I also tried some other things, but alas could not replicate the paper's result. – C. E. Jan 28 '14 at 21:56
@Pickett Should I delete this A then? – Ajasja Jan 29 '14 at 9:00
Probably, the intention was right but in this case TeleportProbability seems to be only a part of the problem. The answer is probably TeleportProbability+normalization+some other difference. – C. E. Jan 29 '14 at 9:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.