A new algorithm for enumerating all possible Sudoku squares

2016 ◽  
Vol 08 (02) ◽  
pp. 1650026 ◽  
Author(s):  
Pallavi Mishra ◽  
D. K. Gupta ◽  
Rakesh P. Badoni

Sudoku is an interesting number placement puzzle with some simple rules. For some positive integer [Formula: see text], the puzzle involves an [Formula: see text] grid partitioned into [Formula: see text] distinct blocks each of size [Formula: see text] such that the integers [Formula: see text] through [Formula: see text] appear exactly once in each row, each column and each block of the grid. Often some static numbers known as givens are placed according to the difficulty rating in the puzzle and then the rule is to place the numbers from [Formula: see text] to [Formula: see text] in the partially filled grid such that the conditions of the puzzle are satisfied. The aim of this paper is to propose a new algorithm for enumerating all possible Sudoku squares of size [Formula: see text]. It is based on the concepts of permutations derived from [Formula: see text] S-permutation matrices termed as S-permutations. There is a one-to-one correspondence between Sudoku squares and the set of those S-permutation matrices which are mutually disjoint to each other. The proposed algorithm uses the set of all S-permutations generated by some permutation generation algorithm as input and then enumerates all the subsets of cardinality [Formula: see text] of all S-permutations which are mutually disjoint to each other. The correctness of the algorithm is established. Its worst-case time complexity is O[Formula: see text], where [Formula: see text]. A mathematical formula involving the total number of the sets of [Formula: see text] mutually disjoint S-permutations is also derived. Experimentally, the proposed algorithm is verified for the Sudoku squares of size [Formula: see text]. It is observed that our algorithm is more systematic and better in terms of computational efficiency.

Author(s):  
William C. Regli ◽  
Satyandra K. Gupta ◽  
Dana S. Nau

Abstract While automated recognition of features has been attempted for a wide range of applications, no single existing approach possesses the functionality required to perform manufacturability analysis. In this paper, we present a methodology for taking a CAD model of a part and extracting a set of machinable features that contains the complete set of alternative interpretations of the part as collections of MRSEVs (Material Removal Shape Element Volumes, a STEP-based library of machining features). The approach handles a variety of features including those describing holes, pockets, slots, and chamfering and filleting operations. In addition, the approach considers accessibility constraints for these features, has an worst-case algorithmic time complexity quadratic in the number of solid modeling operations, and modifies features recognized to account for available tooling and produce more realistic volumes for manufacturability analysis.


Author(s):  
C. Ahrikencheikh ◽  
A. A. Seireg ◽  
B. Ravani

Abstract This paper deals with automatic generation of motion of a point under both geometric and non-geometric constraints. Optimal point paths are generated which are not only free of collisions with polygonal obstacles representing geometric constraints but also conform to non-geometric constraints such as speed of the motion, a maximum allowable change in the velocity vector and a minimum clearance from the obstacle boundaries. The concept of passage networks and conforming paths on the network are introduced. These are used to provide a new representation of the free space as well as a motion generation algorithm with a computational time complexity of only O(n3.log(n)), where n designates the total number of obstacle vertices. The algorithm finds the shortest or fastest (curved) path that also conforms with preset constraints on the motion of the point. The point paths generated are proved to be optimal while conforming to the constraints.


Author(s):  
Nafiseh Masoudi ◽  
Georges M. Fadel ◽  
Margaret M. Wiecek

Abstract Routing or path-planning is the problem of finding a collision-free and preferably shortest path in an environment usually scattered with polygonal or polyhedral obstacles. The geometric algorithms oftentimes tackle the problem by modeling the environment as a collision-free graph. Search algorithms such as Dijkstra’s can then be applied to find an optimal path on the created graph. Previously developed methods to construct the collision-free graph, without loss of generality, explore the entire workspace of the problem. For the single-source single-destination planning problems, this results in generating some unnecessary information that has little value and could increase the time complexity of the algorithm. In this paper, first a comprehensive review of the previous studies on the path-planning subject is presented. Next, an approach to address the planar problem based on the notion of convex hulls is introduced and its efficiency is tested on sample planar problems. The proposed algorithm focuses only on a portion of the workspace interacting with the straight line connecting the start and goal points. Hence, we are able to reduce the size of the roadmap while generating the exact globally optimal solution. Considering the worst case that all the obstacles in a planar workspace are intersecting, the algorithm yields a time complexity of O(n log(n/f)), with n being the total number of vertices and f being the number of obstacles. The computational complexity of the algorithm outperforms the previous attempts in reducing the size of the graph yet generates the exact solution.


2011 ◽  
Vol 03 (04) ◽  
pp. 457-471 ◽  
Author(s):  
B. BALAMOHAN ◽  
P. FLOCCHINI ◽  
A. MIRI ◽  
N. SANTORO

In a network environment supporting mobile entities (called robots or agents), a black hole is a harmful site that destroys any incoming entity without leaving any visible trace. The black-hole search problit is the task of a team of k > 1 mobile entities, starting from the same safe location and executing the same algorithm, to determine within finite time the location of the black hole. In this paper, we consider the black hole search problit in asynchronous ring networks of n nodes, and focus on time complexity. It is known that any algorithm for black-hole search in a ring requires at least 2(n - 2) time in the worst case. The best known algorithm achieves this bound with a team of n - 1 agents with an average time cost of 2(n - 2), equal to the worst case. In this paper, we first show how the same number of agents using 2 extra time units in the worst case, can solve the problit in only [Formula: see text] time on the average. We then prove that the optimal average case complexity of [Formula: see text] can be achieved without increasing the worst case using 2(n - 1) agents. Finally, we design an algorithm that achieves asymptotically optimal both worst and average case time complexities itploying an optimal team of k = 2 agents, thus improving on the earlier results that required O(n) agents.


VLSI Design ◽  
1998 ◽  
Vol 7 (1) ◽  
pp. 15-30
Author(s):  
Gustavo E. Téllez ◽  
Majid Sarrafzadeh

Given a set of terminals on the plane N={s,ν1,…,νn}, with a source terminal s, a Rectilinear Distance-Preserving Tree (RDPT) T(V, E) is defined as a tree rooted at s, connecting all terminals in N. An RDPT has the property that the length of every source to sink path is equal to the rectilinear distance between that source and sink. A Min- Cost Rectilinear Distance-Preserving Tree (MRDPT) minimizes the total wire length while maintaining minimal source to sink linear delay, making it suitable for high performance interconnect applications.This paper studies problems in the construction of RDPTs, including the following contributions. A new exact algorithm for a restricted version of the problem in one quadrant with O(n2) time complexity is proposed. A novel heuristic algorithm, which uses optimally solvable sub-problems, is proposed for the problem in a single quadrant. The average and worst-case time complexity for the proposed heuristic algorithm are O(n3/2) and O(n3), respectively. A 2-approximation of the quadrant merging problem is proposed. The proposed algorithm has time complexity O(α2T(n)+α3) for any constant α > 1, where T(n) is the time complexity of the solution of the RDPT problem on one quadrant. This result improves over the best previous quadrant merging solution which has O(n2T(n)+n3) time complexity.We test our algorithms on randomly uniform point sets and compare our heuristic RDPT construction against a Minimum Cost Rectilinear Steiner (MRST) tree approximation algorithm. Our results show that RDPTs are competitive with Steiner trees in total wire-length when the number of terminals is less than 32. This result makes RDPTs suitable for VLSI routing applications. We also compare our algorithm to the Rao-Shor RDPT approximation algorithm obtaining improvements of up to 10% in total wirelength. These comparisons show that the algorithms proposed herein produce promising results.


2007 ◽  
Vol 18 (04) ◽  
pp. 715-725
Author(s):  
CÉDRIC BASTIEN ◽  
JUREK CZYZOWICZ ◽  
WOJCIECH FRACZAK ◽  
WOJCIECH RYTTER

Simple grammar reduction is an important component in the implementation of Concatenation State Machines (a hardware version of stateless push-down automata designed for wire-speed network packet classification). We present a comparison and experimental analysis of the best-known algorithms for grammar reduction. There are two approaches to this problem: one processing compressed strings without decompression and another one which processes strings explicitly. It turns out that the second approach is more efficient in the considered practical scenario despite having worst-case exponential time complexity (while the first one is polynomial). The study has been conducted in the context of network packet classification, where simple grammars are used for representing the classification policies.


Sign in / Sign up

Export Citation Format

Share Document