1: \begin{abstract}
2: Let $X$ be a complex algebraic $K3$ surface or a supersingular $K3$ surface in odd characteristic.
3: We present an algorithm by which,
4: under certain assumptions on $X$,
5: we can calculate a finite set of generators
6: of the image of the natural homomorphism from the automorphism group of $X$ to
7: the orthogonal group of the N\'eron-Severi lattice of $X$.
8: We then apply this algorithm to certain complex $K3$ surfaces,
9: among which are singular $K3$ surfaces whose transcendental lattices are of small discriminants.
10: \end{abstract}
11: