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.

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.

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:

Answer choices:

  • 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

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?

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?

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?