PatanasakPinyo T.Sulaiman A.Mahidol University2024-04-112024-04-112024-03-01International Journal of Computers and their Applications Vol.31 No.1 (2024) , 5-1410765204https://repository.li.mahidol.ac.th/handle/20.500.14594/97916In statistics, probability theory, and computer science, a derangement, ln, is known to be a basic problem that computes total ways of rearranging n ∈ N items such that a result contains no item i that stands in the same position as it did in the input. Formally, the derangement problem has a problem instance of a finite collection (Formula Presented). With this formulation, ln is a total number of qualified collections where contains n members of (x1,yj) where i ≠ j and every x1 and yj (1 ≤ i,j ≤ n) must show up exactly once in b'. In this article, we present a dynamic programming algorithm that computes ln and its justification. We also provide a discussion about extending the limitation of the problem with an objective to cover a general case where we have a finite set of variables a1,a2,.…,ak rather than the traditional scenario that has only two variables: X and y.Computer ScienceToward an Extension of Efficient Algorithm to Solve Derangement Problems by Dynamic Programming ApproachArticleSCOPUS2-s2.0-85189312961