28 research outputs found

    Коды Грея в задачах комбинаторной оптимизации

    No full text
    В статье приводятся полезные сведения для разработчиков алгоритмов и программ об использовании кодов Грея для решения комбинаторных задач с псевдобулевыми функциями (полиномами от булевых переменных). В качестве примера эффективности применения этих кодов рассматривается решение 0-1 задачи о ранце с полным перебором вариантов решения. Представлены результаты экспериментального исследования, которые показывают, что коды Грея можно практически применять в схемах ветвления, например, в методе ветвей и границ, когда количество переменных в узлах ветвления решающего алгоритма не превышает 35.У статті наводяться корисні відомості для розробників алгоритмів і програм про використання кодів Грея для розв’язання комбінаторних задач з псевдобулевими функціями (поліномами від булевих змінних). Як приклад ефективності застосування цих кодів розглядається розв’язання 0-1 задачі про ранець з повним перебором варіантів розв’язку. Представлені результати експериментального дослідження, які показують, що коди Грея можна практично застосовувати в схемах розгалуження, наприклад в методі гілок і меж, коли кількість змінних у вузлах розгалуження вирішального алгоритму не перевищує 35.The article provides useful information for developers of algorithms and programs on the use of Gray codes for solving combinatorial problems with pseudoBoolean functions (polynomials from Boolean variables). As an example of the effectiveness of the use of these codes, the solution 0-1 of the knapsack problem with a full search of the solutions is considered. The results of an experimental study are presented, which show that Gray codes can be practically applied in branching schemes, for example, in the branch and bound method, when the number of variables in the branch nodes of the decision algorithm does not exceed 35

    Monomer-dimer tatami tilings of square regions

    Get PDF
    We prove that the number of monomer-dimer tilings of an n×nn\times n square grid, with m<nm<n monomers in which no four tiles meet at any point is m2m+(m+1)2m+1m2^m+(m+1)2^{m+1}, when mm and nn have the same parity. In addition, we present a new proof of the result that there are n2n1n2^{n-1} such tilings with nn monomers, which divides the tilings into nn classes of size 2n12^{n-1}. The sum of these tilings over all monomer counts has the closed form 2n1(3n4)+22^{n-1}(3n-4)+2 and, curiously, this is equal to the sum of the squares of all parts in all compositions of nn. We also describe two algorithms and a Gray code ordering for generating the n2n1n2^{n-1} tilings with nn monomers, which are both based on our new proof.Comment: Expanded conference proceedings: A. Erickson, M. Schurch, Enumerating tatami mat arrangements of square grids, in: 22nd International Workshop on Combinatorial Al- gorithms (IWOCA), volume 7056 of Lecture Notes in Computer Science (LNCS), Springer Berlin / Heidelberg, 2011, p. 12 pages. More on Tatami tilings at http://alejandroerickson.com/joomla/tatami-blog/collected-resource

    Síntesis de Sistemas de Conmutación Mediante Permutación de Tablas de Código Gray (Método PGC)

    Get PDF
    Finding the shortest function on switching systems is a necessity for the development of efficient automatic systems. Currently, several methodologies aim to solve this need with different techniques. This article proposes a new methodology to find a propositional formula that describes a switching system problem using several truth tables which are based on an original one; these tables are generated using Gray Code principles and permutations. As it will be shown, the used code has a direct relation to the Hamiltonian paths, where each permutation is a different connection in a hypervolume, and each node is represented as a bit combination. An algorithm was developed using MATLAB and compared with the solutions from the software Boole-Deusto to verify and validate the applicability and implementation of the method. Finally, examples of execution, computational cost comparison and future work proposals are presented.Encontrar la función más corta en los sistemas de conmutación es una necesidad para el desarrollo de sistemas automáticos eficientes. Actualmente, existen varias metodologías que tienen como objetivo solucionar esta necesidad con diferentes técnicas. Este artículo propone una nueva metodología para encontrar una fórmula proposicional que describa un problema de un sistema de conmutación utilizando varias tablas de verdad que se basan en una original, estas tablas se generan utilizando los principios y permutaciones del Código Gray. Como se mostrará, el código utilizado tiene una relación directa con los caminos hamiltonianos, donde cada permutación es una conexión diferente en un hipervolumen y cada nodo se representa como una combinación de bits. Para verificar y validar el método, se desarrolló un algoritmo utilizando el MATLAB y se comparó con las soluciones del software Boole-Deusto. Finalmente, se presentan ejemplos de ejecución, comparación de costos computacionales y propuestas de trabajos futuros

    A constant-time algorithm for middle levels Gray codes

    Get PDF
    For any integer n1n\geq 1 a middle levels Gray code is a cyclic listing of all nn-element and (n+1)(n+1)-element subsets of {1,2,,2n+1}\{1,2,\ldots,2n+1\} such that any two consecutive subsets differ in adding or removing a single element. The question whether such a Gray code exists for any n1n\geq 1 has been the subject of intensive research during the last 30 years, and has been answered affirmatively only recently [T. M\"utze. Proof of the middle levels conjecture. Proc. London Math. Soc., 112(4):677--713, 2016]. In a follow-up paper [T. M\"utze and J. Nummenpalo. An efficient algorithm for computing a middle levels Gray code. To appear in ACM Transactions on Algorithms, 2018] this existence proof was turned into an algorithm that computes each new set in the Gray code in time O(n)\mathcal{O}(n) on average. In this work we present an algorithm for computing a middle levels Gray code in optimal time and space: each new set is generated in time O(1)\mathcal{O}(1) on average, and the required space is O(n)\mathcal{O}(n)

    Pure Parsimony Xor Haplotyping

    Full text link
    The haplotype resolution from xor-genotype data has been recently formulated as a new model for genetic studies. The xor-genotype data is a cheaply obtainable type of data distinguishing heterozygous from homozygous sites without identifying the homozygous alleles. In this paper we propose a formulation based on a well-known model used in haplotype inference: pure parsimony. We exhibit exact solutions of the problem by providing polynomial time algorithms for some restricted cases and a fixed-parameter algorithm for the general case. These results are based on some interesting combinatorial properties of a graph representation of the solutions. Furthermore, we show that the problem has a polynomial time k-approximation, where k is the maximum number of xor-genotypes containing a given SNP. Finally, we propose a heuristic and produce an experimental analysis showing that it scales to real-world large instances taken from the HapMap project

    Fast algorithms for classical specifications of stabiliser states and Clifford gates

    Full text link
    The stabiliser formalism plays a central role in quantum computing, error correction, and fault-tolerance. Stabiliser states are used to encode quantum data. Clifford gates are those which can be easily performed fault-tolerantly in the most common error correction schemes. Their mathematical properties are the subject of significant research interest. Numerical experiments are critical to formulating and testing conjectures involving the stabiliser formalism. Conversions between different specifications of stabiliser states and Clifford gates are also important components of classical algorithms for simulating quantum circuits. In this note, we provide fast methods for verifying that a vector is a stabiliser state, and interconverting between its specification as amplitudes, a quadratic form, and a check matrix. We use these to rapidly check if a given unitary matrix is a Clifford gate and to convert between the matrix of a Clifford gate and its compact specification as a stabiliser tableau. For example, we extract the stabiliser tableau of a Clifford gate matrix with N2N^2 entries, which naively requires O(N3logN)O(N^3 \log N) time, in time O(NlogN)O(N \log N). Our methods outperform the best-known brute force methods by some orders of magnitude with asymptotic improvements that are exponential in the number of qubits. We provide example implementations of our algorithms in Python.Comment: Python implementations available at https://github.com/ndesilva/stabiliser-tools. New in v2: new algorithm for extracting the stabiliser tableau of a Clifford gate matrix that is exponentially faster compared to v1, more thorough complexity analyse

    Universal Cycles for Minimum Coverings of Pairs by Triples, with Application to 2-Radius Sequences

    Full text link
    A new ordering, extending the notion of universal cycles of Chung {\em et al.} (1992), is proposed for the blocks of kk-uniform set systems. Existence of minimum coverings of pairs by triples that possess such an ordering is established for all orders. Application to the construction of short 2-radius sequences is given, with some new 2-radius sequences found through computer search.Comment: 18 pages, to appear in Mathematics of Computatio
    corecore