- Instead of getting to look at the last thing you added to the heap, you only get to look at the smallest element (with the ordering defined on a per-machine basis) currently on the heap.
- Instead of getting to remove the last thing you added to the heap, you only get to remove one of the smallest element (with the ordering defined on a per-machine basis) currently on the heap.
- Instead of getting to add an element to the top of the heap, you can only add an element to the heap, with its position being determined according to the other elements in the heap (with the ordering defined on a per-machine basis).
This machine can accept all regular languages, simply by not using the heap. It can also accept the language $displaystyle {a^{n}b^{n} in {a, b}^{*} mid n ge 0}$ by adding $a$’s to the heap, and removing $a$’s from the heap when it reads $b$’s. It can accept a variety of other context-free languages. However, it cannot accept, for instance, $displaystyle {w in {a, b}^{*} mid w = w^{R}}$ (stated without proof). EDIT: or can it? I don’t think it can, but I’ve been surprised before, and I’m sure I’ll keep being surprised when my assumptions to keep making of me an… well.
Can it accept any context-sensitive or Turing-complete languages?
More generally, what research, if any, has been pursued in this direction? What results are there, if any? I am also interested in other varieties of exotic state machines, possibly those using other data structures for storage or various kinds of restrictions on access (e.g., how LBAs are restricted TMs). References are appreciated. I apologize in advance if this question is demonstrating ignorance. Formal Definition: I provide some more detailed definitions of min-heap automata here in order to clarify further discussion in questions which reference this material. We define a type-1 nondeterministic min-heap automaton as a 7-tuple $$(Q, q_0, A, Sigma, Gamma, Z_0, delta)$$ where…
- $Q$ is a finite, non-empty set of states;
- $q_0 in Q$ is the initial state;
- $A subseteq Q$ is the set of accepting states;
- $Sigma$ is a finite, non-empty input alphabet;
- $Gamma$ is a finite, non-empty input alphabet, where the weight of a symbol $gamma in Gamma$, $w(gamma) in mathbb{N}$, is such that $w(gamma_1) = w(gamma_2) iff gamma_1 = gamma_2$;
- $Z_0 notin Gamma$ is the special bottom-of-the-heap symbol;
- $delta : Q times (Sigma cup {epsilon}) times (Gamma cup {Z_0}) rightarrow mathcal{P}({Q times Gamma^*})$ is the transition function.
The transition function works by assuming an initially empty heap consisting of only $Z_0$. The transition function may add to the heap an arbitrary collection (finite, but possibly empty or with repeats) of elements $gamma_1, gamma_2, …, gamma_k in Gamma$. Alternatively, the transition function may remove an instance of the element $gamma$ with the lowest weight $w(gamma)$ of all elements remaining on the heap (i.e., the element on top of the heap). The transition function may only use the top-most (i.e., of minimal weight) symbol instance in determining any given transition. Further, define a type-1 deterministic min-heap automaton to be a type-1 nondeterministic min-heap automaton which satisfies the following property: for all strings $x{sigma}y in Sigma$ such that $|x| = n$ and $sigma in Sigma$, $|delta^{n+1}(q_0, x{sigma}y, Z_0)| leq 1$. Define also a type-2 nondeterministic min-heap automaton exactly the same as a type-1 nondeterministic min-heap automaton, except for the following changes:
- $Gamma$ is a finite, non-empty input alphabet, where the weight of a symbol $gamma in Gamma$, $w(gamma) in mathbb{N}$, is such that $w(gamma_1) = w(gamma_2)$ does not necessarily imply $gamma_1 = gamma_2$; in other words, different heap symbols can have the same weight.
- When instances of distinct heap symbols with same weight are added to the heap, their relative order is preserved according to a last-in, first-out (LIFO) stack-like ordering.
Thanks to Raphael for pointing out this more natural definition, which captures (and extends) the context-free languages. Some results demonstrated so far:
- Type-1 min-heap automata recognize a set of languages which is neither a subset nor a superset of the context-free languages. [1,2]
- Type-2 min-heap automata, by their definition, recognize a set of languages which is a proper superset of the context-free languages, as well as a proper superset of the languages accepted by type-1 min-heap automata.
- Languages accepted by type-1 min-heap automata appear to be closed under union, concatenation, and Kleene star, but not under complementation [1], intersection, or difference;
- Languages accepted by type-1 nondeterministic min-heap automata appear to be a proper superset of languages accepted by type-1 deterministic min-heap automata.
There may be a few other results I have missed. More results are (possibly) on the way. Follow-up Questions
- Closure under reversal? — Open
- Closure under complementation? — No!
- Does nondeterminism increase power? — Yes?
- Is $HAL subsetneq CSL$ for type-2? — Open
- Does adding heaps increase power for type-1? — $HAL^1 subsetneq HAL^2 = HAL^k$ for $k > 2$ (?)
- Does adding a stack increase power for type-1? — Open
Asked By : Patrick87
Answered By : Alex ten Brink
$mathrm{DHAL} subset mathrm{L}$ $mathrm{HAL} subset mathrm{NL}$
where $mathrm{DHAL}$ is the set of languages recognized by some deterministic min-heap automaton.
Best Answer from StackOverflow
Question Source : http://cs.stackexchange.com/questions/110