A concise introduction to the mathematical theory of knots is presented. Definitions of basic notionsare explained. Then, knots are considered as material objects and the question concerning their optimalconformations is posed. A numerical algorithm searching for the ideal knots is described. A few resultsobtained with its help are presented.