For two sequences in the alignment that share a common ancestor, mismatches can be interpreted as point mutations and gaps as indels. Very short or very similar sequences can be aligned by hand; however, most interesting problems require the alignment of lengthy, highly variable or extremely numerous sequences that cannot be aligned solely by human effort. Instead, human knowledge is primarily applied in constructing algorithms to produce high-quality sequence alignments. A variety of computational algorithms have been applied to the sequence alignment problem Graph theory is developing as a promising field in various applications. In this method a method of penalty determination using graph theory is proposed, which can be developed into an algorithm.