Anopen boundary is an unclosed surface element such as a disk, a hollow pipe of finite length, a hemisphere, and a sum of such surface elements. In this paper, on the basis of the author's rigorous mathematical theory, general algorithms to solve electromagnetic scattering by a metallic open boundary, and also by a non-metallic open boundary, are given, which enable us to solve various important problems in the study of high frequency devices such as antenna, leaky waveguide, grating, etc.