## How to describe Deterministic Transitive Closure in FOL

In "Finite Model Theory and Its Applications", page 152, it is said that Deterministic Transitive Closure, on ordered finite structures, captures LOGSPACE.

Hence, taking into account that FOL captures LOGSPACE, it should be possible to:

• Given a functional relation R(X,Y) (e.g. "motherOf(X,Y)")
• It should be possible to define, in FOL, a predicate T(X,Y) that captures its transitive closure (e.g. "femaleAncestor(X, Y)")

I would like to know how to define such predicate. This would be quite easy in Datalog, using recursion, but it should be possible to define it without recursion, which is the question that puzzles me.

Posted on Categories proxies

## Distributional error probability of deterministic algorithm implies error probability of randomized algorithm?

Consider some problem $$P$$ and let’s assume we sample the problem instance u.a.r. from some set $$I$$. Let $$p$$ be a lower bound on the distributional error of a deterministic algorithm on $$I$$, i.e., every deterministic algorithm fails on at least a $$p$$-fraction of $$I$$.

Does this also imply that every randomized algorithm $$\mathcal{R}$$ must fail with probability $$p$$ if, again, we sample the inputs u.a.r. from $$I$$?

My reasoning is as follows: Let $$R$$ be the random variable representing the random bits used by the algorithm. \begin{align} \Pr[ \text{ \mathcal{R} fails}] &= \sum_\rho \Pr[ \text{ \mathcal{R} fails and R=\rho }] \ &= \sum_\rho \Pr[ \text{ \mathcal{R} fails} \mid R=\rho] \Pr[ R=\rho ] \ &\ge p \sum_\rho \Pr[ R=\rho ] = p. \end{align} For the inequality, I used the fact that once we have fixed $$R = \rho$$, we effectively have a deterministic algorithm.

I can’t find the flaw in my reasoning, but I would be quite surprised if this implication is true indeed.

Posted on Categories proxies

## What language does this deterministic finite automaton accept? Been mulling over this one for hours, my initial thought was { w ε {a,b}* | w is empty, or ends with either ab or ba} but that’s clearly wrong as neither aba nor bab are accepted by the automaton. If anyone has any idea what language this automaton accepts it would really put my mind at ease.

Posted on Categories proxies

## Is any randomized Algorithm a probability distribution over the set of deterministic Algorithms?

If there is a finite set of Instances of size n and the set of (reasonable) deterministic algorithms is finit.

Can any randomized Algorithm be seen as a probability distribution over the set of deterministic Algorithms? And if yes, why?

Posted on Categories proxies

## Deterministic Finite Automata vs Java

You need to select a device controller. You have two options: Option 1: Implement with a DFA Option 2: Implement using Java The primary advantage of a DFA over a program written in Java is as follows:

• A DFA requires fewer computational resources
• A DFA is faster than a program in Java
• Running a DFA costs less than running a program written in Java
• It doesn’t matter if we use a DFA or a program written in Java, as long as it gets the job done
Posted on Categories proxies

## Deterministic finite automata

For Sigma={a,b}, Design DFA for the language a) L={w:(na(w)+2nb(w))mod 3<2}. b) accepting set of string over {a,b} in which anbmcl, where n , m and l is greater than equal to 1.

Posted on Categories proxies

## How to determine if a language produced by grammar is recognizable by deterministic pushdown automaton (DPDA)?

I have a following grammar: S -> aSa | bSb | lambda.

And I have to figure out whether the language produced by this grammar is recognizable by DPDA. I can’t find any theoremas about it. Obviously, it’s a context-free language and can be recognized by DPA, but what about DPDA?

Posted on Categories proxies

## Finding the upper bound of states in Minimal Deterministic Finite Automata

I have a task to determine the upper bound of states in the Minimal Deterministic Finite Automata that recognizes the language: $$L(A_1) \backslash L(A_2)$$, where $$A_1$$ is a Deterministic Finite Automata(DFA) with $$n$$ states and $$A_2$$ is Non-deterministic Finite Automata(NFA) with $$m$$ states.

The way I am trying to solve the problem:

1. $$L(A_1) \backslash L(A_2) = L(A_1) \cap L(\Sigma^* \backslash L(A_2)$$, which is language, that is recognised by automata $$L’$$ with $$n*m$$ states
2. Determinization of $$L’$$ which has $$(n*m)^2$$ states and it is the upper bound of states.

Am I right?

Posted on Categories proxies

## Maximum characters in a deterministic Turing machine

Assume we have a deterministic Turing machine $$M = (q_s, q_a, q_r, \Sigma, \Gamma, \delta, Q, b)$$ where $$q_s,q_a,q_r$$ are the (unique) starting state, accept state and reject state respectively, $$Q$$ the set of non-final states, $$\Sigma$$ the input alphabet, $$\Gamma$$ the tape alphabet, $$\delta$$ the transition function and $$b \in \Gamma$$ the blank symbol.

How many characters can fit in $$\Gamma$$, as a function of $$|\Sigma|, |Q|$$ such that for each $$c \in \Gamma$$, $$\delta$$ will be defined by it for some state and character?

Posted on Categories proxies

## I need help in creating deterministic finite automata

Let Σ = {a, b, c}. Draw a DFA that rejects all words for which the last two letters match. Draw a DFA that rejects all words for which the first two letters match.

Posted on Categories proxies