<p>Answer to questions 1 and 2: No. This is also the answer to 3 if $M$ is required to always halt (isn't this implied by the definition of a learner, or do you mean the program produced by $M$ must always halt?). Here's a proof for 1 (2 and 3 work pretty much the same way)</p>

<p>Suppose there's an algorithm $A$ which takes the description of a learner $N$ and outputs a learner $M$ which behaves differently. Let $N$ be a learner which runs $A$ on its own description, then runs the output $A(N) = M$ on the input text to produce a program that enumerates some set. By definition of $A$, $N$ and $M$ behave differently, but by construction they behave identically, contradicting the existence of $A$.</p>

<p>This same argument can be pretty easily modified to show that 2 is impossible. It can also be used to show that 3 is impossible if $M$ must always halt.</p>

<p>Not a real answer for question 4, but you might find this helpful: A prudent learner cannot converge on both every text for a finite set and on every text for the set of all natural numbers. Let $N$ be a learner that converges on every text for a finite set. Now, consider the following text for the set of all natural numbers. It contains all numbers in order, separated by differing numbers of 1s. After $i$, it contains enough 1s that $N$ will return a program which enumerates the set $1,\ldots,i$. $N$ will do this because it converges on every finite set. Because it will return a program enumerating a finite set after every prefix of this text, it does not converge on this text.</p>

<p>So if you let $M_1$ be the learner which converges on all finite sets and $M_2$ be the learner which converges on all texts for the set of all natural numbers, at least one of $M_1,M_2$ satisfies the criteria in question 4. You can extend this to a countably infinite set of learners in which at least all but one learner satisfies the criteria in question 4 by producing a machine $M_i$ for each natural number $i$ which converges on all finite sets which don't contain powers of the $i$th prime and also converges on the set of all powers of the $i$th prime. By similar logic as above, $N$ can't converge on all sets that any two of these converge on.</p>

<p>You can use this set of learners to find an $M$ satisfying 4 with arbitrarily high probability.</p>

CC BY-SA 3.0
2011-07-05T03:07:27.837Z
Thanks a lot and I think you are right on questions 1, 2, 3. Unfortunately, I found I wanted to ask the fourth question. Should I award a tick to Dave? I fear that people would think that the question is closed.
Zirui Wang
CC BY-SA 3.0
2011-07-05T03:23:56.750Z
Even though the learner N from Dave's construction doesn't always halt, we can make a new learner N' from N such that (a) N' converges on exactly the same texts as N and (b) N' always halts.
Zirui Wang
CC BY-SA 3.0
2011-07-05T04:39:26.900Z
Feel free to withhold the tick if you want more people to try to answer question 4.
Dave
CC BY-SA 3.0
2011-07-05T04:52:59.343Z
Thanks for your generosity. I guess it will take a while for an answer to question 4 to appear, because it's too similar to the open problem.
Zirui Wang
CC BY-SA 3.0
2011-07-04T23:18:06.640Z
2011-07-08T08:20:14.570Z
2011-07-08T08:20:14.570Z
Dave
<p>Here's an answer to your second question. Consider a learner $M$ which always produces a machine that enumerates every natural number. This converges on any text which contains every natural number. In the next paragraph, we will show that there is a one-to-one mapping from the set of all texts to the texts on which $M$ converges. Therefore, $M$ converges on as many texts as there are. It is more powerful than any text which converges on a set of smaller cardinality, and no learner can converge on more sets. So either $M$ is more powerful than $N$, or no learner is.</p>

<p>Let $T$ be a text. Consider the representation $T_b$ of $T$ in binary. We match this with a text $f(T)$ which we construct as follows. If bit $i$ of $T_b$ is equal to 0, then positions $2i-1$ and $2i$ of $f(T)$ are $2i-1$ and $2i$, in order. If bit $i$ is 0, then positions $2i-1$ and $2i$ of $f(T)$ are $2i$ and $2i-1$, reversing the order. For example, if $T_b$ begins $01100$, then $f(T)$ begins $1,2,4,3,6,5,7,8,9,10$.</p>

<p>If two texts $T,T&#39;$ are such that $f(T) = f(T&#39;)$, then they have identical binary representations, so $T=T&#39;$. Thus, this mapping is one-to-one, so the cardinality of the set of texts on which $M$ converges is the same as that of the set of all texts.</p>

CC BY-SA 3.0
2011-07-01T02:51:42.620Z
Note that the above only works if the numbers in a text are in sorted order. If texts aren't in sorted order, the learner $M$ which always outputs a program that outputs every natural number converges on the uncountably infinitely many orderings of the set of all natural numbers. As there are uncountably infinitely many texts, no learner is more powerful than $M$.
Dave
CC BY-SA 3.0
2011-07-01T10:23:03.473Z
I can design a learner that converges on (a) all texts that contain n, n + 1, ... for some n and (b) all texts for the set of even numbers. So even though the number of texts in (a) is maximal, this learner is more powerful than a learner that converges on only (a).
Zirui Wang
CC BY-SA 3.0
2011-07-02T01:08:08.413Z
I believe my comment addresses what you just said. If you take the learner that outputs a machine which enumerates all natural numbers, the set of texts it accepts has the same cardinality as the rational numbers. So does the set of all texts. So this learner is more powerful than any learner $N$ that converges on a set with smaller cardinality, and there is no more powerful learner for any $N$ that converges on a set with equal cardinality.
Dave
CC BY-SA 3.0
2011-07-02T02:24:21.093Z
I updated my answer to better explain this comment.
Dave
CC BY-SA 3.0
2011-07-03T23:53:33.443Z
I think this becomes a distinction based on what Zirui means by '(strictly) more texts' (1). If you interpret that based only on cardinality, then Dave's argument works, but cardinality is pretty coarse grained. You can also interpret (1) as strict superset, and then it seems that Zirui's comment breaks Dave's answer. But maybe I am not quiet understanding the question/answer.
Artem Kaznatcheev
CC BY-SA 3.0
2011-07-04T05:10:48.337Z
@Artem Kaznatcheev: Sorry I didn't make it clear. A converges on more texts than B iff (a) A converges on all texts on which B converges and (b) there is a text on which A converges but B does not. So the superset interpretation is what I intended. Sorry about the confusion.
Zirui Wang
CC BY-SA 3.0
2011-06-30T17:28:57.857Z
2011-07-02T02:23:33.217Z
2011-07-02T02:23:33.217Z
Dave
<p>My <strong>questions</strong> are:</p>
<blockquote>
<p>[Solved by Dave] Given a learner N, can you design a learner M that behaves differently from N? No.</p>
</blockquote>
<p>and</p>
<blockquote>
<p>[Solved by Dave] Given a learner N, can you design a learner M that is more powerful than N? No.</p>
</blockquote>
<p>and</p>
<blockquote>
<p>[Solved by Dave] Given a learner N that always halts, can you design a learner M and a set of natural numbers L, such that (a) for every text T that contains exactly L, M converges on T and (b) there exists a text T' that contains exactly L, such that N diverges on T'? No.</p>
</blockquote>
<p>and especially</p>
<blockquote>
<p>[Open] Given a learner N that is prudent and always halts, can you effectively design a learner M such that there exists a set of natural numbers L such that</p>
<ul>
<li>for every text T that contains exactly L, M converges on T and</li>
<li>there exists a text S that contains exactly L, such that N diverges on S?</li>
</ul>
</blockquote>
<p>Note that the difference between the fourth and the third questions is that N is required to be prudent. But M is not required. So N can't simulate M and follow exactly what M does -- M may conjecture a set it does not always converge on.</p>
<p>Also note that a yes answer to the open problem (discussed below) will imply a no answer to the fourth question. I'm saying this because, if you follow Dave's line of thought, you are solving the open problem, which is a stronger statement than (a negative answer to) my question.</p>
<p>And a yes answer to the fourth problem implies a no answer to the open question.</p>
<p>Now come the <strong>definitions</strong>.</p>
<p>A <em>learner</em> is a Turing machine that, when the input is a (finite) sequence of natural numbers, outputs a program that enumerates a subset of natural numbers.</p>
<p>A <em>text</em> is an infinite sequence of natural numbers.</p>
<p>A learner is said to <em>converge</em> on a text if, when feeding successively longer initial segments of the text, there exists a point after which the learner outputs the same enumeration procedure that enumerates exactly the elements in the text.</p>
<p>A learner <em>diverges</em> on a text if it does not converge on it.</p>
<p>Learner A is said to <em>behave differently</em> from learner B if there exists a text on which A converges but B diverges or A diverges but B converges.</p>
<p>Learner A is said to be <em>more powerful</em> than learner B if A converges on (strictly) more texts than B.</p>
<p>A learner M is <em>prudent</em> iff, if on some initial segment of some text it conjectures a set S, it converges on all texts for S.</p>
<p><strong>Discussion</strong></p>
<p>The background of these problems is the open question whether there exists a program that when given a learner outputs a prudent learner that converges on a superset of texts. Mark Fulk proved that the prudent learner exists (in Theorem 15 of the article &quot;Prudence and other conditions on formal language learning&quot;), but his proof is non-constructive because it has a seemingly undecidable case distinction. The open problem is to give a constructive proof of this theorem.</p>

CC BY-SA 3.0
2011-06-30T13:31:16.513Z
Doesn't Rice's theorem preclude that you can construct a learner M with behavior strictly different from learner N?
Antonio Valerio Miceli-Barone
CC BY-SA 3.0
2011-06-30T15:43:41.983Z
@Antonio Valerio Miceli-Barone: Can you give more details of your argument?
Zirui Wang
CC BY-SA 3.0
2011-07-04T08:44:48.107Z
@Zirui Wang: When you say a program enumerates a subset of natural numbers, is the enumeration in order? Also, when you say that a learner converges on a text if it outputs the same enumeration procedure, does this mean that it outputs identical code, or just a series of programs that produce identical enumerations?
Dave
CC BY-SA 3.0
2011-07-04T12:12:40.310Z
@Dave: Not necessarily in order. Identical code. This is what's called explanatory learning. The other alternative is called behaviorally correct learning, which is not mentioned in this question.
Zirui Wang
CC BY-SA 3.0
2011-07-14T23:10:03.727Z
I want to add that if you use the behaviorally correct definition of convergence then the answer is no. Refer to Sanjay Jain, Frank Stephan and Nan Ye's paper, Prescribed learning of r.e. classes. There they show that the open problem is positive in the behaviorally correct case. (But the explanatory case is still open.)
Zirui Wang
<machine-learning>
Can you make a different learner?
Zirui Wang
# Can you make a different learner?

(Asked by: username_0 on 2011-06-30)

My **questions** are:

> [Solved by Dave] Given a learner N, can you design a learner M that behaves differently from N? No.

and

> [Solved by Dave] Given a learner N, can you design a learner M that is more powerful than N? No.

and

> [Solved by Dave] Given a learner N that always halts, can you design a learner M and a set of natural numbers L, such that (a) for every text T that contains exactly L, M converges on T and (b) there exists a text T' that contains exactly L, such that N diverges on T'? No.

and especially

> [Open] Given a learner N that is prudent and always halts, can you effectively design a learner M such that there exists a set of natural numbers L such that
>
> * for every text T that contains exactly L, M converges on T and
> * there exists a text S that contains exactly L, such that N diverges on S?

Note that the difference between the fourth and the third questions is that N is required to be prudent. But M is not required. So N can't simulate M and follow exactly what M does -- M may conjecture a set it does not always converge on.

Also note that a yes answer to the open problem (discussed below) will imply a no answer to the fourth question. I'm saying this because, if you follow Dave's line of thought, you are solving the open problem, which is a stronger statement than (a negative answer to) my question.

And a yes answer to the fourth problem implies a no answer to the open question.

Now come the **definitions**.

A *learner* is a Turing machine that, when the input is a (finite) sequence of natural numbers, outputs a program that enumerates a subset of natural numbers.

A *text* is an infinite sequence of natural numbers.

A learner is said to *converge* on a text if, when feeding successively longer initial segments of the text, there exists a point after which the learner outputs the same enumeration procedure that enumerates exactly the elements in the text.

A learner *diverges* on a text if it does not converge on it.

Learner A is said to *behave differently* from learner B if there exists a text on which A converges but B diverges or A diverges but B converges.

Learner A is said to be *more powerful* than learner B if A converges on (strictly) more texts than B.

A learner M is *prudent* iff, if on some initial segment of some text it conjectures a set S, it converges on all texts for S.

**Discussion**

The background of these problems is the open question whether there exists a program that when given a learner outputs a prudent learner that converges on a superset of texts. Mark Fulk proved that the prudent learner exists (in Theorem 15 of the article "Prudence and other conditions on formal language learning"), but his proof is non-constructive because it has a seemingly undecidable case distinction. The open problem is to give a constructive proof of this theorem.

**Tags:** machine-learning
> **Comments:**
> **username_1**: Doesn't Rice's theorem preclude that you can construct a learner M with behavior strictly different from learner N?  
> **username_0**: @Antonio Valerio Miceli-Barone: Can you give more details of your argument?  
> **username_2**: @Zirui Wang: When you say a program enumerates a subset of natural numbers, is the enumeration in order? Also, when you say that a learner converges on a text if it outputs the same enumeration procedure, does this mean that it outputs identical code, or just a series of programs that produce identical enumerations?  
> **username_0**: @Dave: Not necessarily in order. Identical code. This is what's called explanatory learning. The other alternative is called behaviorally correct learning, which is not mentioned in this question.  
> **username_0**: I want to add that if you use the behaviorally correct definition of convergence then the answer is no. Refer to Sanjay Jain, Frank Stephan and Nan Ye's paper, Prescribed learning of r.e. classes. There they show that the open problem is positive in the behaviorally correct case. (But the explanatory case is still open.)  

---

## 2 answers

### Answer by username_2 on 2011-07-04. Score: 4 | Accepted answer

Answer to questions 1 and 2: No. This is also the answer to 3 if $M$ is required to always halt (isn't this implied by the definition of a learner, or do you mean the program produced by $M$ must always halt?). Here's a proof for 1 (2 and 3 work pretty much the same way)

Suppose there's an algorithm $A$ which takes the description of a learner $N$ and outputs a learner $M$ which behaves differently. Let $N$ be a learner which runs $A$ on its own description, then runs the output $A(N) = M$ on the input text to produce a program that enumerates some set. By definition of $A$, $N$ and $M$ behave differently, but by construction they behave identically, contradicting the existence of $A$.

This same argument can be pretty easily modified to show that 2 is impossible. It can also be used to show that 3 is impossible if $M$ must always halt.

Not a real answer for question 4, but you might find this helpful: A prudent learner cannot converge on both every text for a finite set and on every text for the set of all natural numbers. Let $N$ be a learner that converges on every text for a finite set. Now, consider the following text for the set of all natural numbers. It contains all numbers in order, separated by differing numbers of 1s. After $i$, it contains enough 1s that $N$ will return a program which enumerates the set $1,\ldots,i$. $N$ will do this because it converges on every finite set. Because it will return a program enumerating a finite set after every prefix of this text, it does not converge on this text.

So if you let $M\_1$ be the learner which converges on all finite sets and $M\_2$ be the learner which converges on all texts for the set of all natural numbers, at least one of $M\_1,M\_2$ satisfies the criteria in question 4. You can extend this to a countably infinite set of learners in which at least all but one learner satisfies the criteria in question 4 by producing a machine $M\_i$ for each natural number $i$ which converges on all finite sets which don't contain powers of the $i$th prime and also converges on the set of all powers of the $i$th prime. By similar logic as above, $N$ can't converge on all sets that any two of these converge on.

You can use this set of learners to find an $M$ satisfying 4 with arbitrarily high probability.

> **Comments:**
> **username_0**: Thanks a lot and I think you are right on questions 1, 2, 3. Unfortunately, I found I wanted to ask the fourth question. Should I award a tick to Dave? I fear that people would think that the question is closed.  
> **username_0**: Even though the learner N from Dave's construction doesn't always halt, we can make a new learner N' from N such that (a) N' converges on exactly the same texts as N and (b) N' always halts.  
> **username_2**: Feel free to withhold the tick if you want more people to try to answer question 4.  
> **username_0**: Thanks for your generosity. I guess it will take a while for an answer to question 4 to appear, because it's too similar to the open problem.  

---

### Answer by username_2 on 2011-06-30. Score: 2

Here's an answer to your second question. Consider a learner $M$ which always produces a machine that enumerates every natural number. This converges on any text which contains every natural number. In the next paragraph, we will show that there is a one-to-one mapping from the set of all texts to the texts on which $M$ converges. Therefore, $M$ converges on as many texts as there are. It is more powerful than any text which converges on a set of smaller cardinality, and no learner can converge on more sets. So either $M$ is more powerful than $N$, or no learner is.

Let $T$ be a text. Consider the representation $T\_b$ of $T$ in binary. We match this with a text $f(T)$ which we construct as follows. If bit $i$ of $T\_b$ is equal to 0, then positions $2i-1$ and $2i$ of $f(T)$ are $2i-1$ and $2i$, in order. If bit $i$ is 0, then positions $2i-1$ and $2i$ of $f(T)$ are $2i$ and $2i-1$, reversing the order. For example, if $T\_b$ begins $01100$, then $f(T)$ begins $1,2,4,3,6,5,7,8,9,10$.

If two texts $T,T'$ are such that $f(T) = f(T')$, then they have identical binary representations, so $T=T'$. Thus, this mapping is one-to-one, so the cardinality of the set of texts on which $M$ converges is the same as that of the set of all texts.

> **Comments:**
> **username_2**: Note that the above only works if the numbers in a text are in sorted order. If texts aren't in sorted order, the learner $M$ which always outputs a program that outputs every natural number converges on the uncountably infinitely many orderings of the set of all natural numbers. As there are uncountably infinitely many texts, no learner is more powerful than $M$.  
> **username_0**: I can design a learner that converges on (a) all texts that contain n, n + 1, ... for some n and (b) all texts for the set of even numbers. So even though the number of texts in (a) is maximal, this learner is more powerful than a learner that converges on only (a).  
> **username_2**: I believe my comment addresses what you just said. If you take the learner that outputs a machine which enumerates all natural numbers, the set of texts it accepts has the same cardinality as the rational numbers. So does the set of all texts. So this learner is more powerful than any learner $N$ that converges on a set with smaller cardinality, and there is no more powerful learner for any $N$ that converges on a set with equal cardinality.  
> **username_2**: I updated my answer to better explain this comment.  
> **username_3**: I think this becomes a distinction based on what Zirui means by '(strictly) more texts' (1). If you interpret that based only on cardinality, then Dave's argument works, but cardinality is pretty coarse grained. You can also interpret (1) as strict superset, and then it seems that Zirui's comment breaks Dave's answer. But maybe I am not quiet understanding the question/answer.  
> **username_0**: @Artem Kaznatcheev: Sorry I didn't make it clear. A converges on more texts than B iff (a) A converges on all texts on which B converges and (b) there is a text on which A converges but B does not. So the superset interpretation is what I intended. Sorry about the confusion.  

---

