TITLE: How to compute the Picard rank of a K3 surface?
QUESTION [13 upvotes]: I'm curious about the following question:

Given a K3 surface, how does one proceed to compute its rank?

Of course the answer may depend on the form of the input, i.e. how the K3 is "given". So

For a given way of writing down a K3 surface, (e.g. quartics in $\mathbb{P}^3$) 
   How does one compute the Picard rank of the K3 surface?

(Aside: What I've seen people sometimes did is avoiding this question by nailing down a K3 surface $X$ with its $NS(X)$ together with the intersection form. Then find an embedding given by the ample class.)

REPLY [4 votes]: In Theorem 6 of the following paper : http://arxiv.org/abs/1111.4117, building on Van Lujik's work, François Charles explains a (theoretical) algorithm that computes the rank of a K3 surface $X$ defined over a number field. This algorithm terminates conjecturally, for instance if $X\times X$ satisfies the Hodge conjecture. 
The main new feature of this article, that allows him to obtain an algorithm, is that the discrepancy between the rank of $X$ and the rank of the reduction of $X$ at a typical prime may be read off the algebra of endomorphisms of the transcendental lattice of $X$.