From Enumerating to Generating: A Linear Time Algorithm for Generating 2D Lattice Paths with a Given Number of Turns

We propose a linear time algorithm, called G2DLP, for generating 2D lattice L(n1, n2) paths, equivalent to two-item  multiset permutations, with a given number of turns. The usage of turn has three meanings: in the context of multiset permutations, i...

Full description

Bibliographic Details
Main Author: Ting Kuo
Format: Article
Language:English
Published: MDPI AG 2015-05-01
Series:Algorithms
Subjects:
Online Access:http://www.mdpi.com/1999-4893/8/2/190
id doaj-6831fa895520463ab04eb72e168347d1
record_format Article
spelling doaj-6831fa895520463ab04eb72e168347d12020-11-25T00:50:09ZengMDPI AGAlgorithms1999-48932015-05-018219020810.3390/a8020190a8020190From Enumerating to Generating: A Linear Time Algorithm for Generating 2D Lattice Paths with a Given Number of TurnsTing Kuo0Department of Marketing Management, Takming University of Science and Technology, Neihu District, Taipei 11451, TaiwanWe propose a linear time algorithm, called G2DLP, for generating 2D lattice L(n1, n2) paths, equivalent to two-item  multiset permutations, with a given number of turns. The usage of turn has three meanings: in the context of multiset permutations, it means that two consecutive elements of a permutation belong to two different items; in lattice path enumerations, it means that the path changes its direction, either from eastward to northward or from northward to eastward; in open shop scheduling, it means that we transfer a job from one type of machine to another. The strategy of G2DLP is divide-and-combine; the division is based on the enumeration results of a previous study and is achieved by aid of an integer partition algorithm and a multiset permutation algorithm; the combination is accomplished by a concatenation algorithm that constructs the paths we require. The advantage of G2DLP is twofold. First, it is optimal in the sense that it directly generates all feasible paths without visiting an infeasible one. Second, it can generate all paths in any specified order of turns, for example, a decreasing order or an increasing order. In practice, two applications, scheduling and cryptography, are discussed.http://www.mdpi.com/1999-4893/8/2/190Lattice PathMultiset PermutationTurnsInteger PartitionCryptographyOpen Shop Scheduling
collection DOAJ
language English
format Article
sources DOAJ
author Ting Kuo
spellingShingle Ting Kuo
From Enumerating to Generating: A Linear Time Algorithm for Generating 2D Lattice Paths with a Given Number of Turns
Algorithms
Lattice Path
Multiset Permutation
Turns
Integer Partition
Cryptography
Open Shop Scheduling
author_facet Ting Kuo
author_sort Ting Kuo
title From Enumerating to Generating: A Linear Time Algorithm for Generating 2D Lattice Paths with a Given Number of Turns
title_short From Enumerating to Generating: A Linear Time Algorithm for Generating 2D Lattice Paths with a Given Number of Turns
title_full From Enumerating to Generating: A Linear Time Algorithm for Generating 2D Lattice Paths with a Given Number of Turns
title_fullStr From Enumerating to Generating: A Linear Time Algorithm for Generating 2D Lattice Paths with a Given Number of Turns
title_full_unstemmed From Enumerating to Generating: A Linear Time Algorithm for Generating 2D Lattice Paths with a Given Number of Turns
title_sort from enumerating to generating: a linear time algorithm for generating 2d lattice paths with a given number of turns
publisher MDPI AG
series Algorithms
issn 1999-4893
publishDate 2015-05-01
description We propose a linear time algorithm, called G2DLP, for generating 2D lattice L(n1, n2) paths, equivalent to two-item  multiset permutations, with a given number of turns. The usage of turn has three meanings: in the context of multiset permutations, it means that two consecutive elements of a permutation belong to two different items; in lattice path enumerations, it means that the path changes its direction, either from eastward to northward or from northward to eastward; in open shop scheduling, it means that we transfer a job from one type of machine to another. The strategy of G2DLP is divide-and-combine; the division is based on the enumeration results of a previous study and is achieved by aid of an integer partition algorithm and a multiset permutation algorithm; the combination is accomplished by a concatenation algorithm that constructs the paths we require. The advantage of G2DLP is twofold. First, it is optimal in the sense that it directly generates all feasible paths without visiting an infeasible one. Second, it can generate all paths in any specified order of turns, for example, a decreasing order or an increasing order. In practice, two applications, scheduling and cryptography, are discussed.
topic Lattice Path
Multiset Permutation
Turns
Integer Partition
Cryptography
Open Shop Scheduling
url http://www.mdpi.com/1999-4893/8/2/190
work_keys_str_mv AT tingkuo fromenumeratingtogeneratingalineartimealgorithmforgenerating2dlatticepathswithagivennumberofturns
_version_ 1725249111949574144