315 research outputs found

    An Efficient Local Search for Partial Latin Square Extension Problem

    Full text link
    A partial Latin square (PLS) is a partial assignment of n symbols to an nxn grid such that, in each row and in each column, each symbol appears at most once. The partial Latin square extension problem is an NP-hard problem that asks for a largest extension of a given PLS. In this paper we propose an efficient local search for this problem. We focus on the local search such that the neighborhood is defined by (p,q)-swap, i.e., removing exactly p symbols and then assigning symbols to at most q empty cells. For p in {1,2,3}, our neighborhood search algorithm finds an improved solution or concludes that no such solution exists in O(n^{p+1}) time. We also propose a novel swap operation, Trellis-swap, which is a generalization of (1,q)-swap and (2,q)-swap. Our Trellis-neighborhood search algorithm takes O(n^{3.5}) time to do the same thing. Using these neighborhood search algorithms, we design a prototype iterated local search algorithm and show its effectiveness in comparison with state-of-the-art optimization solvers such as IBM ILOG CPLEX and LocalSolver.Comment: 17 pages, 2 figure

    Automation of the Solution of Kakuro Puzzles

    Get PDF

    Crossword Construction using Constraint Satisfaction and Simulated Annealing

    Get PDF
    Selle töö eesmärk on luua programm, mis koostab ristsõnu, kasutades kahte meetodit: kitsenduste rahuldamist (KR) ahne algoritmiga ja libalõõmutamist (LL), ning võrrelda nende meetodite efektiivsust. Tööd hakatakse kasutama õppematerjalina aine Tehisintellekt I õpetamisel. Ristsõna koostamine on üks tehisintellekti probleemidest, mis kuulub NP-täielike klassi. Seega hea lahenduse leidmine nõuab palju ressursse ja aega. Aga eksisteerivad meetodid, mis võimaldavad lahenduse leidmise aega vähendada. Nende hulgas on ka KR ja LL. KR kasutades seatakse antud ülesandele kitsendusi, mis teevad lahendamise lihtsamaks. Ristsõna koostamisel kehtivad järgmised kitsendused: 1.Sõna ei saa olla lühem, kui ruutude järjend, kuhu seda pannakse. 2.Sõna ei saa olla pikem, kui ruutude järjend, kuhu seda pannakse. 3.Kui järjendis on mõned tähed juba olemas, siis sõna, mis pannakse sellesse järjendisse, peab neid tähti sisaldama täpselt nendel samadel positsioonidel ja ei saa sisaldada mingeid teisi tähti nendel positsioonidel. Kui sõna rahuldab neid tingimusi, siis teda võetakse vastu ning ahne algoritm otsustab, kasutades heuristilist funktsiooni, kas see sõna on parim lahendus selles olukorras.Niiviisi püüab programm lõpliku sammude hulgaga optimaalse lahenduseni jõuda. LL töötab nii: antud on suvaline algseisund s, leida tema naaberseisund s', kui uus seisund on jooksvast seisundist parem, siis valida see, aga kui leitud seisund on jooksvast seisundist halvem, siis kasutada tõenäosus funktsiooni P, et otsustada, kas valida seda seisundit või mitte. Sellist operatsiooni korratakse kuni rahuldav lahendus on leitud või algoritm on juba teinud lubatud arvu samme. Tõenäosus, et algoritm valib uueks seisundiks halvema seisundi väheneb aja jooksul (kooskõlas nn temperatuuri alanemisega). Meetodeid on testitud ja võrreldid, kasutades erinevaid heuristikuid.The main goal of this thesis is to create a program that allows constructing crosswords, using two different algorithms. Given a grid and a text file with words (dictionary), the program should search for suitable words from a dictionary to fill the grid. The program should be able to complete this task in two different ways, in this case using constraint satisfaction method (CSM) with greedy algorithm and simulated annealing. Afore-mentioned algorithms were chosen mainly for educational purposes, since construction of the fastest algorithm is not a goal of this work. Along with other similar Artificial Intelligence problems, like N queens problem, map colouring and Sudoku solving (which is also NP-complete problem), crossword construction is a good example of simple, yet nontrivial task. The choice of CSM with greedy algorithm is obvious. If there are no constraints, the program will simply try to fill each entry by placing up to all, and that means also the words that are of inappropriate length, words in vocabulary until it finds first suitable or runs out of words. For example, by putting constraints on words length and already filled letters, the construction time can be drastically reduced. The simulated annealing was chosen with intention to show that the same problem can be solved in different ways and also to illustrate the difference in algorithm processing and its effectiveness. In addition, simulated annealing is quite similar to greedy algorithm, thus making their comparison a bit easier, but more interesting

    Comparison of Sudoku Solving Skills of Preschool Children Enrolled in the Montessori Approach and the National Education Programs Yıldız Güven1, Cihat Gültekin1, A. Beyzanur Dedeoğlu1

    Get PDF
    According to Johnson-Laird (2010), sudoku, a mind game, is based on a pure deduction and reasoning processes. This study analyzed sudoku solving skills of preschool children and to ascertain whether there was a difference between children who were educated according to the Ministry of Education preschool education program and the Montessori approach. Sudoku skills of children were analyzed by gender, age, duration of preschool attendance, mother’s and father’s education level and previous experience of playing sudoku using a 12-question Sudoku Skills Measurement Tool developed for this research study.The study sample of the study consisted of 118 children (57 girls, 61 boys) aged between 54-77 months. The findings showed that there was no significant difference in sudoku skills by gender. However, sudoku skills varied with age (54-65 months and 66-77 months) in favor of older groups. Children's sudoku skills were more developed with an increase in education level of either parent. Children who had been in preschool for longer had higher sudoku scores. A previous experience of playing sudoku did not impact sudoku scores. Sudoku skills of children who were educated according to the Montessori program were more developed compared to those of children educated according to Ministry of National Education program

    Towards 40 years of constraint reasoning

    Get PDF
    Research on constraints started in the early 1970s. We are approaching 40 years since the beginning of this successful field, and it is an opportunity to revise what has been reached. This paper is a personal view of the accomplishments in this field. We summarize the main achievements along three dimensions: constraint solving, modelling and programming. We devote special attention to constraint solving, covering popular topics such as search, inference (especially arc consistency), combination of search and inference, symmetry exploitation, global constraints and extensions to the classical model. For space reasons, several topics have been deliberately omitted.Partially supported by the Spanish project TIN2009-13591-C02-02 and Generalitat de Catalunya grant 2009-SGR-1434.Peer Reviewe

    Using Restarts in Constraint Programming over Finite Domains - An Experimental Evaluation

    Get PDF
    The use of restart techniques in complete Satisfiability (SAT) algorithms has made solving hard real world instances possible. Without restarts such algorithms could not solve those instances, in practice. State of the art algorithms for SAT use restart techniques, conflict clause recording (nogoods), heuristics based on activity variable in conflict clauses, among others. Algorithms for SAT and Constraint problems share many techniques; however, the use of restart techniques in constraint programming with finite domains (CP(FD)) is not widely used as it is in SAT. We believe that the use of restarts in CP(FD) algorithms could also be the key to efficiently solve hard combinatorial problems. In this PhD thesis we study restarts and associated techniques in CP(FD) solvers. In particular, we propose to including in a CP(FD) solver restarts, nogoods and heuristics based in nogoods as this should improve search algorithms, and, consequently, efficiently solve hard combinatorial problems. We thus intend to: a) implement restart techniques (successfully used in SAT) to solve constraint problems with finite domains; b) implement nogoods (learning) and heuristics based on nogoods, already in use in SAT and associated with restarts; and c) evaluate the use of restarts and the interplay with the other implemented techniques. We have conducted the study in the context of domain splitting backtrack search algorithms with restarts. We have defined domain splitting nogoods that are extracted from the last branch of the search algorithm before the restart. And, inspired by SAT solvers, we were able to use information within those nogoods to successfully help the variable selection heuristics. A frequent restart strategy is also necessary, since our approach learns from restarts

    Geometric particle swarm optimization for the sudoku puzzle

    Get PDF
    Geometric particle swarm optimization (GPSO) is a recently introduced generalization of traditional particle swarm optimization (PSO) that applies to all combinatorial spaces. The aim of this paper is to demonstrate the applicability of GPSO to non-trivial combinatorial spaces. The Sudoku puzzle is a perfect candidate to test new algorithmic ideas because it is entertaining and instructive as well as a nontrivial constrained combinatorial problem. We apply GPSO to solve the sudoku puzzle
    corecore