## How to form Equivalence classes for Equivalence class testing for the following

are just the equivalence classes which include the age ranges mentioned in the picture with the invalid ranges that is age<16 and age>100 good enough or does anything else go into consideration when forming equivalence classes

## Given a regular language, calculate its equivalence classes

I was given the following regular language:

For any $$n$$, the language $$L_{n}$$ consists of all words over $$Σ = \{0, 1\}$$ whose $$n$$th character from the end is 1.

I know it’s regular because it can be expressed as a regular expression ($$\Sigma^{*}1\Sigma^{n-1}$$), and I constructed a DFA and an NFA for it. I need to calculate its equivalence classes. I thought that the equivalence classes will be words that have 1 in the same place later in the word – for example one of the classes will be $$L(\Sigma^{*}1\Sigma^{n-2})$$, because no matter what digit will be added to all these words, the new words will belong to the original language. But I’m not sure I’m on the right track. I would love it if I could understand the process of thinking on this kind of question.

## construct transition table from equivalence of dfa-minimization

I’m trying to minimize a DFA.

From the state transition diagram, I have formed the table:

And the 0-equivalence is : {q0,q1,q3,q4,q5,q6,q7},{q2}

And 2-equivalence is {q0,q4},{q6},{q1,q7},{q3,q5},{q2}, as well as 3-equivalence.

If I write q0q4 together, what would I write in as value in the table?

Now what is the minimized DFA,transition table?

## Turing machine that can read and write simultaneously equivalence proof

How would I go about proving that a TM that can both read and write at the same time is equivalent to a typical TM?

For constructing a read+write TM from normal TMs, my idea is to split the state of writing and reading simultaneously to two separate states (one for writing and one for reading). Not quite sure if this works..

Also, am not sure how to construct a normal TM from read+write TM.

Thank you!

## Equivalence from multi-tape to single-tape implies limited write space?

Suppose I have the following subroutine, to a more complex program, that uses spaces to the right of the tape:

$$A$$: “adds a $at the beginning of the tape.” So we have: $$\begin{array}{lc} \text{Before }: & 0101\sqcup\sqcup\sqcup\ldots\ \text{After }A: & 0101\sqcup\sqcup\ldots \end{array}$$ And it is running on a multi-tape turing machine. The equivalence theorem from Sipser book proposes we can describe any multi-tape TM with a single-tape applying the following “algorithm”, append a $$\#$$ at every tape and then concat every tape in a single tape, and then put a dot to simulate the header of the previous machine, etc, etc. With $$a$$ and $$b$$ being the content of other tapes, we have: $$a\#\dot{0}101\#b$$ If we want to apply $$A$$ or another subroutine that uses more space, the “algorithm” described in Sipser is not enough, I can intuitively shift $$\#b$$ to the right, but how to describe it more formally for any other subroutine that uses more space in the tape? I can’t figure out a more general “algorithm” to apply in this cases. ## Can two type expressions in different kinds have subtyping relation and equivalence relation? In Higher-order bounded quantiﬁcation ($$F^ω_{<:}$$), introduced in Ch31 in Types and Programming Langauges by Pierce, its subtyping and equivalence rules are: 1. Does subtyping relation only exist between two type expressions in the same kind? Can two type expressions in different kinds have subtyping relation? 2. In rule (S-TRANS), why is Γ |- U :: K needed? 3. In rule (S-EQ), why are Γ |- S :: K and Γ |- T :: K needed? Are they not implied by S ≡ T? 4. Does the equivalence relation exist only between two type expressions in the same kind? Can two types in different type expressions have the equivalence relation? Thanks. ## Equivalence of IRD and ORD There is a question in Art of Computer Programming by Knuth which needs us to prove that Input restricted deques and Output restricted deques can form the same number of (and possibly individually same) permutations. The solution is By operating backwards, we can get the reverse of the inverse of the reverse of any input-restricted permutation with an output-restricted deque, and conversely. This rule sets up a one-to-one correspondence between the two sets of permutations. Which doesn’t seem very clear. Can someone explain the answer in english? ## Determining equivalence classes of$\{w \in \{0,1\}^*\mid$the$k$-bit of$w$from the right is 1$\}\$

I want to formally write the equivalence classes of the following language: $$L_k = \{w \in \{0,1\}^*\mid\text{ the } k\text{-th bit of }w\text{ from the right is } 1\}$$

I understand the definition of equivalence classes, yet struggle to come up with a clear intuitive answer.

The language is regular, therefore i’d expect finite equivalence classes.

It seems like the essence of the information I am looking for is only “what is the $$k$$-th bit from the right”, which means i want to focus my attention on suffixes in the form of $$\sigma y \in \{0,1\}^*$$ where $$|y|=k-1$$, $$\sigma\in \Sigma$$.

I would highly appreciate some guidance that would build my intuition for finding equivalence classes in general, and in this specific case.

## Datalog Program Equivalence with Fixed Universe Size

It is well known that to compute equivalence of two Datalog programs (or equivalently of two first order formulas with the least fixed point operator) wrt all possible inputs and universes, is undecidable. If we fix the universe size to be N, it is clearly decidable in time exponential wrt N. My question is whether one can do better, maybe even in time logarithmic in N (and maybe much worse wrt the length of the programs). Note that equivalence of two nonrecursive Datalog rules can be done in constant time for all inputs, let alone for fixed N, but is NP-Complete wrt the rules’ size.

## Decidable Program Equivalence

Determining whether two programs always return same output for same input is undecidable (easily reduced to the halting problem). My question is, is there a complexity class in which this problem is decidable for machines on that class?

Seems like it must be below PTIME, as Datalog is P-Complete and equivalence of Datalog programs is undecidable.