Next Article in Journal
Pulmonary Nodule Detection from X-ray CT Images Based on Region Shape Analysis and Appearance-based Clustering
Previous Article in Journal
An Adaptive Spectral Clustering Algorithm Based on the Importance of Shared Nearest Neighbors
Article Menu

Export Article

Open AccessArticle
Algorithms 2015, 8(2), 190-208; doi:10.3390/a8020190

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

Department of Marketing Management, Takming University of Science and Technology, Neihu District, Taipei 11451, Taiwan
Academic Editor: Faisal Abu-Khzam
Received: 19 December 2014 / Revised: 27 April 2015 / Accepted: 30 April 2015 / Published: 8 May 2015
View Full-Text   |   Download PDF [370 KB, uploaded 8 May 2015]   |  

Abstract

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. View Full-Text
Keywords: Lattice Path; Multiset Permutation; Turns; Integer Partition; Cryptography; Open Shop Scheduling Lattice Path; Multiset Permutation; Turns; Integer Partition; Cryptography; Open Shop Scheduling
Figures

Figure 1

This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. (CC BY 4.0).

Scifeed alert for new publications

Never miss any articles matching your research from any publisher
  • Get alerts for new papers matching your research
  • Find out the new papers from selected authors
  • Updated daily for 49'000+ journals and 6000+ publishers
  • Define your Scifeed now

SciFeed Share & Cite This Article

MDPI and ACS Style

Kuo, T. From Enumerating to Generating: A Linear Time Algorithm for Generating 2D Lattice Paths with a Given Number of Turns. Algorithms 2015, 8, 190-208.

Show more citation formats Show less citations formats

Related Articles

Article Metrics

Article Access Statistics

1

Comments

[Return to top]
Algorithms EISSN 1999-4893 Published by MDPI AG, Basel, Switzerland RSS E-Mail Table of Contents Alert
Back to Top