# Pagerank existence of a graph given a vector

Suppose a vector x of size n in real numbers such that the sum of all elements is equal to 1, is it possible to construct a graph with n nodes such that every element in x corresponds to the PageRank of the enumerated nodes? Since an exact solution is less likely, is it possible to create an approximate solution?

My assumptions for this problem:

1. The PageRank algorithm has a damping factor.
2. The input vector is normalized.

My initial idea was to start by ordering the nodes by the difference between their present and desired Pagerank, then 'donating' Pagerank by adding links from nodes that are above their desired Pagerank value. I implemented a version in C++, but it does not converge; instead, the first iteration is the closest iteration to the desired Pagerank vector. I wanted to pick the math stackexchange community's brains to see whether anyone had any better ideas.

Hint You are really asking this. Given a vector $\vec{x} \in \mathbb{R}^n$ with $x_i \ge 0$ and $\sum x_i = 1$, can we construct a matrix $A \in \mathbb{R}^{n \times n}$ such that $$A \vec{x} = \vec{x} \Leftrightarrow (A-I_n)\vec{x} = \vec{0}$$
• The trivial solution is $$A=I_{n}$$, but that's unsatisfactory because it's a poor representation of the web -- it is not constructed by exclusively self-referring pages. So I suppose that a more stringent restriction to put on A is that $$\sum_i^n{A_{ij}}=1\forall j\in n,A_{ii}=0 \forall i\in n$$ then, A is a stochastic matrix with no links referring to itself. – Nikhil Shinday Jul 21 '15 at 15:45