  An identifying code of a graph G is a dominating set C such that every vertex
x of G is distinguished from all other vertices by the set of vertices in C
that are at distance at most 1 from x. The problem of finding an identifying
code of minimum possible size turned out to be a challenging problem. It was
proved by N. Bertrand that if a graph on n vertices with at least one edge
admits an identifying code, then a minimum identifying code has size at most
n-1. Some classes of graphs whose smallest identifying code is of size n-1 were
already known, and few conjectures were formulated to classify all these
graphs. In this paper, disproving these conjectures, we classify all finite
graphs for which all but one of the vertices are needed to form an identifying
code. We also classify all infinite graphs needing the whole set of vertices in
any identifying code. New upper bounds in terms of the number of vertices and
the maximum degree of a graph are also provided.
