Grzegorz Herman - Academia.edu (original) (raw)
Papers by Grzegorz Herman
ArXiv, 2008
Although a deterministic polytime algorithm for primality testing is now known ([4]), the Rabin-M... more Although a deterministic polytime algorithm for primality testing is now known ([4]), the Rabin-Miller randomized test of primality continues being the most efficient and widely used algorithm. We prove the correctness of the Rabin-Miller algorithm in the theory V 1 for polynomial time reasoning, from Fermat’s little theorem. This is interesting because the Rabin-Miller algorithm is a polytime randomized algorithm, which runs in the class RP (i.e., the class of polytime MonteCarlo algorithms), with a sampling space exponential in the length of the binary encoding of the input number. (The class RP contains polytime P.) However, we show how to express the correctness in the language of V 1 , and we also show that we can prove the formula expressing correctness with polytime reasoning from Fermat’s Little theorem, which is generally expected to be independent of V 1 . Our proof is also conceptually very basic in the sense that we use the extended Euclid’s algorithm, for computing grea...
ArXiv, 2019
We present a novel parsing algorithm for all context-free languages, based on computing the relat... more We present a novel parsing algorithm for all context-free languages, based on computing the relation between configurations and reaching transitions in a recursive transition network. Parsing complexity w.r.t. input length matches the state of the art: it is worst-case cubic, quadratic for unambiguous grammars, and linear for LR-regular ones. What distinguishes our algorithm is its clean mathematical formulation: parsing is expressed as a composition of simple operations on languages and relations, and can therefore be implemented using only immutable data structures. With a proper choice of these structures, a vast majority of operations performed during parsing typical programming languages can be memoized, which allows our proof-of-concept implementation to outperform common generalized parsing algorithms, in some cases by orders of magnitude.
We study the problem of deciding, whether a given partial order is embeddable into two consecutiv... more We study the problem of deciding, whether a given partial order is embeddable into two consecutive layers of a Boolean lattice. Employing an equivalent condition for such em- beddability similar to the one given by J. Mittas and K. Reuter [5], we prove that the decision pro
Capacitated k-median is one of the few outstanding optimization problems for which the existence ... more Capacitated k-median is one of the few outstanding optimization problems for which the existence of a polynomial time constant factor approximation algorithm remains an open problem. In a series of recent papers algorithms producing solutions violating either the number of facilities or the capacity by a multiplicative factor were obtained. However, to produce solutions without violations appears to be hard and potentially requires different algorithmic techniques. Notably, if parameterized by the number of facilities k, the problem is also W [2] hard, making the existence of an exact FPT algorithm unlikely. In this work we provide an FPT-time constant factor approximation algorithm preserving both cardinality and capacity of the facilities. The algorithm runs in time 2O(k log k)nO(1) and achieves an approximation ratio of 7 + ε. 2012 ACM Subject Classification Theory of computation → Facility location and clustering; Theory of computation → Fixed parameter tractability
Fundam. Informaticae, 2007
We introduce a new propositional proof system, which we call H, that allows quantification over p... more We introduce a new propositional proof system, which we call H, that allows quantification over permutations. In H we may write (∃ab)α and (∀ab)α, which is semantically equivalent to α(a,b)∨α(b,a) and α(a,b)∧ α(b,a), respectively. We show that H with cuts restricted to Σ$_1$ formulas (we denote this system H$_1$) simulates efficiently the Hajos calculus (HC) for constructing graphs which are non-3-colorable. This shows that short proofs over formulas that assert the existence of permutations can capture polynomial time reasoning (as by [9], HC is equivalent in strength to EF, which in turn captures polytime reasoning). We also show that EF simulates efficiently H$^*_1$, which is H$_1$ with proofs restricted to being tree-like. In short, we show that H$^*_1$l$_p$ EFl$_p$ H$_1$.
Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation
We present a novel parsing algorithm for all context-free languages. The algorithm features a cle... more We present a novel parsing algorithm for all context-free languages. The algorithm features a clean mathematical formulation: parsing is expressed as a series of standard operations on regular languages and relations. Parsing complexity w.r.t. input length matches the state of the art: it is worst-case cubic, quadratic for unambiguous grammars, and linear for LR-regular grammars. What distinguishes our approach is that parsing can be implemented using only immutable, acyclic data structures. We also propose a parsing optimization technique called context-free memoization. It allows handling an overwhelming majority of input symbols using a simple stack and a lookup table, similarly to the operation of a deterministic LR(1) parser. This allows our proof-of-concept implementation to outperform the best current implementations of common generalized parsing algorithms (Earley, GLR, and GLL). Tested on a large Java source corpus, parsing is 3–5 times faster, while recognition—35 times faster.
Fundamenta Informaticae
We investigate different variants of unambiguity in the context of computing multi-valued functio... more We investigate different variants of unambiguity in the context of computing multi-valued functions. We propose a modification to the standard computation models of Turing Machines and configuration graphs, which allows for unambiguity-preserving composition. We define a notion of reductions (based on function composition), which allows nondeterminism but controls its level of ambiguity. In light of this framework we establish reductions between different variants of path counting problems. We obtain improvements of results related to inductive counting.
Fundamenta Informaticae, 2007
We introduce a new propositional proof system, which we call H, that allows quantification over p... more We introduce a new propositional proof system, which we call H, that allows quantification over permutations. In H we may write (∃ab)α and (∀ab)α, which is semantically equivalent to α(a, b) ∨ α(b, a) and α(a, b) ∧ α(b, a), respectively. We show that H with cuts restricted to Σ 1 formulas (we denote this system H 1) simulates efficiently the Hajós calculus (HC) for constructing graphs which are non-3-colorable. This shows that short proofs over formulas that assert the existence of permutations can capture polynomial time reasoning (as by [9], HC is equivalent in strength to EF, which in turn captures polytime reasoning). We also show that EF simulates efficiently H * 1 , which is H 1 with proofs restricted to being tree-like. In short, we show that H * 1 ≤ p EF ≤ p H 1 .
Journal of Discrete Algorithms, 2009
We introduce the inverted prefix tries (a variation of suffix tries) as a convenient formalism fo... more We introduce the inverted prefix tries (a variation of suffix tries) as a convenient formalism for stating and proving properties of the Ehrenfeucht–Mycielski sequence [A. Ehrenfeucht, J. Mycielski, A pseudorandom sequence—how random is it? American Mathematical Monthly 99 (1992) 373-375]. We also prove an upper bound on the position in the sequence by which all strings of a given length
We introduce a new propositional proof system, which we call H, that allows quantification over p... more We introduce a new propositional proof system, which we call H, that allows quantification over permutations. In H we may write (∃ab)α and (∀ab)α, which is semantically equivalent to α(a, b) ∨ α(b, a) and α(a, b) ∧ α(b, a), respectively. We show that H with cuts restricted to Σ 1 formulas (we denote this system H 1) simulates efficiently the Hajós calculus (HC) for constructing graphs which are non-3-colorable. This shows that short proofs over formulas that assert the existence of permutations can capture polynomial time reasoning (as by [9], HC is equivalent in strength to EF, which in turn captures polytime reasoning). We also show that EF simulates efficiently H * 1 , which is H 1 with proofs restricted to being tree-like. In short, we show that H * 1 ≤ p EF ≤ p H 1 .
Although a deterministic polytime algorithm for primality testing is now known ([4]), the Rabin-M... more Although a deterministic polytime algorithm for primality testing is now known ([4]), the Rabin-Miller randomized test of primality continues being the most efficient and widely used algorithm. We prove the correctness of the Rabin-Miller algorithm in the theory V 1 for polynomial time reasoning, from Fermat's little theorem. This is interesting because the Rabin-Miller algorithm is a polytime randomized algorithm, which runs in the class RP (i.e., the class of polytime Monte-Carlo algorithms), with a sampling space exponential in the length of the binary encoding of the input number. (The class RP contains polytime P.) However, we show how to express the correctness in the language of V 1 , and we also show that we can prove the formula expressing correctness with polytime reasoning from Fermat's Little theorem, which is generally expected to be independent of V 1. Our proof is also conceptually very basic in the sense that we use the extended Euclid's algorithm, for computing greatest common divisors, as the main workhorse of the proof. For example, we make do without proving the Chinese Reminder theorem, which is used in the standard proofs.
Fundamenta Informaticae, 2012
First of all, I would like to thank my supervisor, Dr. Michael Soltys. It was much thanks to him-... more First of all, I would like to thank my supervisor, Dr. Michael Soltys. It was much thanks to him-being not only an inspiring and patient advisor, but also a great person-that my years at McMaster were truly pleasant and enriching. The other members of my supervisory committee: Dr. Ryszard Janicki and Dr. Emil Sekerinski, as well as Prof. Stephen Cook, who has agreed to review my thesis, have all provided many valuable remarks. I am deeply grateful to my parents Izabel a and Krzysztof, and to my grandmother Zofia-I think it is simply not possible to overestimate the support and encouragement I have received from them. Many of my fiends also deserve my sincere thanks. In Poland: Lech, Ania and Michal, Marta, Patryk, Kasia, Ania, and of course Dominika, who has waited for me so patiently ... In Canada, I have been blessed to meet father Peter, Allan, Theresa and Elaine, Lauren and Due, Meghan, and many others. Thank you all for being there for me! IV
ArXiv, 2008
Although a deterministic polytime algorithm for primality testing is now known ([4]), the Rabin-M... more Although a deterministic polytime algorithm for primality testing is now known ([4]), the Rabin-Miller randomized test of primality continues being the most efficient and widely used algorithm. We prove the correctness of the Rabin-Miller algorithm in the theory V 1 for polynomial time reasoning, from Fermat’s little theorem. This is interesting because the Rabin-Miller algorithm is a polytime randomized algorithm, which runs in the class RP (i.e., the class of polytime MonteCarlo algorithms), with a sampling space exponential in the length of the binary encoding of the input number. (The class RP contains polytime P.) However, we show how to express the correctness in the language of V 1 , and we also show that we can prove the formula expressing correctness with polytime reasoning from Fermat’s Little theorem, which is generally expected to be independent of V 1 . Our proof is also conceptually very basic in the sense that we use the extended Euclid’s algorithm, for computing grea...
ArXiv, 2019
We present a novel parsing algorithm for all context-free languages, based on computing the relat... more We present a novel parsing algorithm for all context-free languages, based on computing the relation between configurations and reaching transitions in a recursive transition network. Parsing complexity w.r.t. input length matches the state of the art: it is worst-case cubic, quadratic for unambiguous grammars, and linear for LR-regular ones. What distinguishes our algorithm is its clean mathematical formulation: parsing is expressed as a composition of simple operations on languages and relations, and can therefore be implemented using only immutable data structures. With a proper choice of these structures, a vast majority of operations performed during parsing typical programming languages can be memoized, which allows our proof-of-concept implementation to outperform common generalized parsing algorithms, in some cases by orders of magnitude.
We study the problem of deciding, whether a given partial order is embeddable into two consecutiv... more We study the problem of deciding, whether a given partial order is embeddable into two consecutive layers of a Boolean lattice. Employing an equivalent condition for such em- beddability similar to the one given by J. Mittas and K. Reuter [5], we prove that the decision pro
Capacitated k-median is one of the few outstanding optimization problems for which the existence ... more Capacitated k-median is one of the few outstanding optimization problems for which the existence of a polynomial time constant factor approximation algorithm remains an open problem. In a series of recent papers algorithms producing solutions violating either the number of facilities or the capacity by a multiplicative factor were obtained. However, to produce solutions without violations appears to be hard and potentially requires different algorithmic techniques. Notably, if parameterized by the number of facilities k, the problem is also W [2] hard, making the existence of an exact FPT algorithm unlikely. In this work we provide an FPT-time constant factor approximation algorithm preserving both cardinality and capacity of the facilities. The algorithm runs in time 2O(k log k)nO(1) and achieves an approximation ratio of 7 + ε. 2012 ACM Subject Classification Theory of computation → Facility location and clustering; Theory of computation → Fixed parameter tractability
Fundam. Informaticae, 2007
We introduce a new propositional proof system, which we call H, that allows quantification over p... more We introduce a new propositional proof system, which we call H, that allows quantification over permutations. In H we may write (∃ab)α and (∀ab)α, which is semantically equivalent to α(a,b)∨α(b,a) and α(a,b)∧ α(b,a), respectively. We show that H with cuts restricted to Σ$_1$ formulas (we denote this system H$_1$) simulates efficiently the Hajos calculus (HC) for constructing graphs which are non-3-colorable. This shows that short proofs over formulas that assert the existence of permutations can capture polynomial time reasoning (as by [9], HC is equivalent in strength to EF, which in turn captures polytime reasoning). We also show that EF simulates efficiently H$^*_1$, which is H$_1$ with proofs restricted to being tree-like. In short, we show that H$^*_1$l$_p$ EFl$_p$ H$_1$.
Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation
We present a novel parsing algorithm for all context-free languages. The algorithm features a cle... more We present a novel parsing algorithm for all context-free languages. The algorithm features a clean mathematical formulation: parsing is expressed as a series of standard operations on regular languages and relations. Parsing complexity w.r.t. input length matches the state of the art: it is worst-case cubic, quadratic for unambiguous grammars, and linear for LR-regular grammars. What distinguishes our approach is that parsing can be implemented using only immutable, acyclic data structures. We also propose a parsing optimization technique called context-free memoization. It allows handling an overwhelming majority of input symbols using a simple stack and a lookup table, similarly to the operation of a deterministic LR(1) parser. This allows our proof-of-concept implementation to outperform the best current implementations of common generalized parsing algorithms (Earley, GLR, and GLL). Tested on a large Java source corpus, parsing is 3–5 times faster, while recognition—35 times faster.
Fundamenta Informaticae
We investigate different variants of unambiguity in the context of computing multi-valued functio... more We investigate different variants of unambiguity in the context of computing multi-valued functions. We propose a modification to the standard computation models of Turing Machines and configuration graphs, which allows for unambiguity-preserving composition. We define a notion of reductions (based on function composition), which allows nondeterminism but controls its level of ambiguity. In light of this framework we establish reductions between different variants of path counting problems. We obtain improvements of results related to inductive counting.
Fundamenta Informaticae, 2007
We introduce a new propositional proof system, which we call H, that allows quantification over p... more We introduce a new propositional proof system, which we call H, that allows quantification over permutations. In H we may write (∃ab)α and (∀ab)α, which is semantically equivalent to α(a, b) ∨ α(b, a) and α(a, b) ∧ α(b, a), respectively. We show that H with cuts restricted to Σ 1 formulas (we denote this system H 1) simulates efficiently the Hajós calculus (HC) for constructing graphs which are non-3-colorable. This shows that short proofs over formulas that assert the existence of permutations can capture polynomial time reasoning (as by [9], HC is equivalent in strength to EF, which in turn captures polytime reasoning). We also show that EF simulates efficiently H * 1 , which is H 1 with proofs restricted to being tree-like. In short, we show that H * 1 ≤ p EF ≤ p H 1 .
Journal of Discrete Algorithms, 2009
We introduce the inverted prefix tries (a variation of suffix tries) as a convenient formalism fo... more We introduce the inverted prefix tries (a variation of suffix tries) as a convenient formalism for stating and proving properties of the Ehrenfeucht–Mycielski sequence [A. Ehrenfeucht, J. Mycielski, A pseudorandom sequence—how random is it? American Mathematical Monthly 99 (1992) 373-375]. We also prove an upper bound on the position in the sequence by which all strings of a given length
We introduce a new propositional proof system, which we call H, that allows quantification over p... more We introduce a new propositional proof system, which we call H, that allows quantification over permutations. In H we may write (∃ab)α and (∀ab)α, which is semantically equivalent to α(a, b) ∨ α(b, a) and α(a, b) ∧ α(b, a), respectively. We show that H with cuts restricted to Σ 1 formulas (we denote this system H 1) simulates efficiently the Hajós calculus (HC) for constructing graphs which are non-3-colorable. This shows that short proofs over formulas that assert the existence of permutations can capture polynomial time reasoning (as by [9], HC is equivalent in strength to EF, which in turn captures polytime reasoning). We also show that EF simulates efficiently H * 1 , which is H 1 with proofs restricted to being tree-like. In short, we show that H * 1 ≤ p EF ≤ p H 1 .
Although a deterministic polytime algorithm for primality testing is now known ([4]), the Rabin-M... more Although a deterministic polytime algorithm for primality testing is now known ([4]), the Rabin-Miller randomized test of primality continues being the most efficient and widely used algorithm. We prove the correctness of the Rabin-Miller algorithm in the theory V 1 for polynomial time reasoning, from Fermat's little theorem. This is interesting because the Rabin-Miller algorithm is a polytime randomized algorithm, which runs in the class RP (i.e., the class of polytime Monte-Carlo algorithms), with a sampling space exponential in the length of the binary encoding of the input number. (The class RP contains polytime P.) However, we show how to express the correctness in the language of V 1 , and we also show that we can prove the formula expressing correctness with polytime reasoning from Fermat's Little theorem, which is generally expected to be independent of V 1. Our proof is also conceptually very basic in the sense that we use the extended Euclid's algorithm, for computing greatest common divisors, as the main workhorse of the proof. For example, we make do without proving the Chinese Reminder theorem, which is used in the standard proofs.
Fundamenta Informaticae, 2012
First of all, I would like to thank my supervisor, Dr. Michael Soltys. It was much thanks to him-... more First of all, I would like to thank my supervisor, Dr. Michael Soltys. It was much thanks to him-being not only an inspiring and patient advisor, but also a great person-that my years at McMaster were truly pleasant and enriching. The other members of my supervisory committee: Dr. Ryszard Janicki and Dr. Emil Sekerinski, as well as Prof. Stephen Cook, who has agreed to review my thesis, have all provided many valuable remarks. I am deeply grateful to my parents Izabel a and Krzysztof, and to my grandmother Zofia-I think it is simply not possible to overestimate the support and encouragement I have received from them. Many of my fiends also deserve my sincere thanks. In Poland: Lech, Ania and Michal, Marta, Patryk, Kasia, Ania, and of course Dominika, who has waited for me so patiently ... In Canada, I have been blessed to meet father Peter, Allan, Theresa and Elaine, Lauren and Due, Meghan, and many others. Thank you all for being there for me! IV