## SEO best practice for page that is the same for 50 US States

I have a calculator for each US state: for example let’s say you plug in your income and it tells you your state tax rate, which depends on your state.

The calculator has the same UI for ever state, one simple form. The only difference is the page title and H1 tag "PA Tax Calculator" and "Pennsylvania Tax Rates." Of course, your results depend on the state which is generated using JS.

I am trying to decide between:

• 50 Unique URLs that I send to Google: example.com/calc/?state=PA and example.com/calc/?state=CA, then state-specific titles on Google: "PA Tax Calculator"
• One URL for indexing (example.com/calc/) that then uses a select form or geolocation to select the correct state. Leave the Google page title generic: "50 State Tax Calculator"

I’d like to be able to put the state title in the Google search title as I think it would feel more personal for vistors, but it seems like if the 50 pages are too similar it’ll just be diluting to have 50 identical pages. This is my first time trying to figure out how to get visitors via SEO.

## Reduce the number of final states for the given NSFA?

For the given NFA, how do you reduce the number of paths without adding $$\epsilon$$-transitions? ## Why is it impossible to iterate over all TMs with $n$ states and $k$ symbols that halt after $m$ steps on $\epsilon$?

Define $$\{\sigma(n,k,m,i)\}_{i=1}^{l_m}$$ an ordered set of all TMs with $$n$$ states and $$k$$ symbols that halt after $$m$$ steps on $$\epsilon$$

There are $$(2kn)^{kn}$$ TMs with $$n$$ states and $$k$$ symbols, so $$l_m$$ is always finite and so is the range of $$m$$.

If we could iterate over $$\sigma$$ given $$n,k$$ for all $$m,i$$, then we could decide the halting problem:

1. Get $$n,k$$ from input machine
2. Iterate over $$\sigma$$ for all $$m,i$$ and check for each one if $$\sigma(n,k,m,i)$$ equals the input machine, if they are equal accept.
3. Reject.

This is odd because It seems very feasible to constract $$\{\sigma(n,k,m,i)\}_{i=1}^{l_m}$$ using elementary combinatorics. Even settling on a (computable) combinatorial formula for $$l_m$$ for all $$m$$ given $$n,k$$ will be enough to solve the haling problem since we will know how many machines are there that halt for each $$m$$, and we can simulate one step at a time for all the $$(2kn)^{kn}$$ machines and compare each machine that halts with the input machine until reaching $$l_m$$ for all $$m$$ without a correct comparison and reject.

Is there a fact (independent of it contradicting the Halting problem) that makes it clear why there is no computable combinatorial formula for $$l_m(n,k)$$? or am I missing some detail here?

Posted on Categories proxies

## Proof that $\{0|1\}^*0\{0|1\}^n$ requires at least $2^{n+1}$ states

How can you prove that any DFA accepting the language generated by the regular expression $$\{0|1\}^*0\{0|1\}^n$$ requires at least $$2^{n+1}$$ states?

I first attempted induction on $$n$$. But I don’t even see how to prove the base-case, like if $$n=1$$. You need the DFA to take any string and, when it encounters a 0, get set down a track of checking that $$n$$ characters follow. If it’s fewer than $$n$$ then fine you reject. But if there are more characters, to sort of re-set it so that it looks for the first 0 after the earlier one was found. But DFAs don’t have that kind of memory.

And once you’ve established the base-case, the inductive case doesn’t seem clear either. If you know the result is true up to $$n$$, then if you consider the regex with $$n+1$$ then you get a DFA which accepts it. You intuitively want to remove the accepting states and "move them back" one vertex in the graph. Now you have a DFA with at least $$2^n$$ states. But how do you know that you needed $$2^n$$ accepting states so that the net number of accepting states is then $$2^{n+1}$$?

Posted on Categories proxies

## A reduction from $HP$ to $\{(\langle M \rangle, \langle k \rangle) : \text{M visits in at list$k$states for any input}\}$

I tried to define the next reduction from $$HP$$ to $$\{(\langle M \rangle, \langle k \rangle) : \text{M visits in at list k states for any input}\}$$.

Given a couple $$(\langle M\rangle , \langle x\rangle)$$ we define $$M_x$$ such that for any input $$y$$, $$M_x$$ simulates $$M$$ on the input $$x$$. We denote $$Q_M +c$$ the number of states needed for the simulation of $$M$$ on $$x$$, and define more special states for $$M_x$$ $$q_1′,q_2′,…,q_{Q_M + c+ 1}’$$ when $$q’_{Q_M +c+1}$$ is defined as the only final state of $$M_x$$. Now, in case $$M_x$$ simulation of $$M$$ on $$x$$ halts (i.e $$M$$ reach one of its finite state) $$M_x$$ move to $$q_1’$$ and then continue to walk through all the special states till it reaches $$q_{Q_M + c + 1}$$.

We define the reduction $$(\langle M \rangle , \langle x \rangle) \longrightarrow (\langle M_x \rangle , \langle Q_M +c+1 \rangle)$$

In case $$((\langle M \rangle , \langle x \rangle) \in HP$$ then for any input $$y$$ , $$M_x$$ walks through all the special states and thus visits in at least $$Q_m + c+ 1$$ steps. Otherwise, $$M$$ doesn’t stop on $$x$$ so $$M_x$$ doesn’t visit any special state, thus visits at most $$Q_M +c$$ states (the states needed for the simulation).

It is ok? If you have other ideas or suggestions please let me know.

Posted on Categories proxies

## checking whether turing machine passes at least k>2 states before accepting a word

$$L=\{|\exists\,\,w\in L(M)\,\,such\,\,that\,\,M\,\,passes\,\,at\,\,least\,\,k>2\,\,distinct\,\,states\,\,before\,\,accepting\,\,w\}$$

I try to think of reduction to prove that this language is neither RE nor coRE. How to approach this problem? Is there a hint, or intuition?

I usually check whether Rice can be used, but the question here is not about the language itself

Posted on Categories proxies

## Is this push-down automaton non-deterministic, as JFLAP states?

There is a tool called JFLAP, which, among other things, can analyze push-down automata, and find non-determinism.

In this example it is detecting non-determinism in state q0: The first symbol in the transition represents the symbol read as input; the second symbol represents the symbol extracted from the stack; and the third symbol is the symbol pushed to the stack. λ represents the empty symbol, so this is an empty transition without checking the stack or pushing anything to it.

I am surprised, as that state seems to fulfill the conditions for determinism for push-down automatons (if only because it only contains a single transition!). I would expect the next state to be q1 under any circumstance.

In comparison, JFLAP doesn’t find any non-determinism here: Mind you, the transition is the same, it only changes that this one adds something to the stack. Am I missing something or is JFLAP wrong in the first instance?

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

## Does the order of ripping off the states matter? Do we get same regular expressions at the end regardless of the order that we take the states step by step? Can somebody prove by exemplification?

## Construct a DFA with reduced states equivalent to 10 + (0 + 11)0*1

I have found this question in a book. I could convert it into its equivalent DFA. But the problem is with the “reduced state” part. I think the answer given in the book is wrong. What would be the DFA with its reduced states? I am giving the converting steps for reference: The reduced DFA as given in the book: So, what should the DFA with reduced states look like?

Posted on Categories proxies