Skip to content

Commit

Permalink
small change in problems
Browse files Browse the repository at this point in the history
  • Loading branch information
lmoss committed Jan 22, 2025
1 parent 29e23c5 commit 5882c44
Show file tree
Hide file tree
Showing 23 changed files with 727 additions and 242 deletions.
Binary file modified _build/.doctrees/environment.pickle
Binary file not shown.
Binary file modified _build/.doctrees/introOneSharp/move_copy_write.doctree
Binary file not shown.
Binary file modified _build/.doctrees/issues/problems.doctree
Binary file not shown.
Binary file modified _build/.doctrees/issues/reduction.doctree
Binary file not shown.
222 changes: 176 additions & 46 deletions _build/html/_sources/introOneSharp/move_copy_write.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _build/html/_sources/issues/problems.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@
"1. Fix a number $n$. Show that the following problem is decidable: Given $S\\in A_n$, \n",
"does $S$ have a product (allowing repetitions) which is the $0$ matrix?\n",
"\n",
"2. Now consider the a variation on the last part. Consider the problem whose inputs are a pair consisting of a number $n$ and some $S\\in A_n$, and whether we again ask whether $S$ has a product (allowing repetitions) which is the $0$ matrix. Does the last part imply that this problem is decidable? Be sure to give a clear, concise, and convincing answer.\n",
"2. Now consider the a variation on the last part. Consider the problem whose inputs are pairs $(n,S$ consisting of a number $n$ and some $S\\in A_n$. We again ask whether $S$ has a product (allowing repetitions) which is the $0$ matrix. Does the last part imply that this problem is decidable? Be sure to give a clear, concise, and convincing answer.\n",
"```"
]
},
Expand Down
2 changes: 1 addition & 1 deletion _build/html/_sources/issues/reduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"metadata": {},
"source": [
"```{exercise}\n",
"Let $P_3$ be the matrix mortality problem for $3\\times 3$ matrices. Let $P_2$ and $P_4$ be defined similarly, for the $2\\times 2$ and $3\\times 3$ matrices. Show that $P_2 \\leq P_3 \\leq P_4$. This is a straightforward algebraic argument.\n",
"Let $P_3$ be the matrix mortality problem for $3\\times 3$ matrices. Let $P_2$ and $P_4$ be defined similarly, for the $2\\times 2$ and $4\\times 4$ matrices. Show that $P_2 \\leq P_3 \\leq P_4$. This is a straightforward algebraic argument.\n",
"\n",
"Later we will see that $P_4 \\leq P_3$, but the argument will not be not as straightforward.\n",
"```"
Expand Down
22 changes: 11 additions & 11 deletions _build/html/introOneSharp/functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ <h1>Functions defined by programs<a class="headerlink" href="#functions-defined-
just like <span class="math notranslate nohighlight">\(\phifn_p\)</span> is in the other notation.</p>
<div class="exercise admonition" id="introOneSharp/functions-exercise-1">

<p class="admonition-title"><span class="caption-number">Exercise 15 </span></p>
<p class="admonition-title"><span class="caption-number">Exercise 16 </span></p>
<div class="section" id="exercise-content">
<p>Show that the following function <span class="math notranslate nohighlight">\(f:\words\to\words\)</span> is <span class="math notranslate nohighlight">\(\one\hash\)</span>-computable: <span class="math notranslate nohighlight">\(f(x) = \writeprog(x) + x\)</span>.</p>
</div>
Expand All @@ -561,7 +561,7 @@ <h1>Partial functions<a class="headerlink" href="#partial-functions" title="Perm
</div>
<div class="exercise admonition" id="introOneSharp/functions-exercise-2">

<p class="admonition-title"><span class="caption-number">Exercise 16 </span></p>
<p class="admonition-title"><span class="caption-number">Exercise 17 </span></p>
<div class="section" id="exercise-content">
<p>Find a program <span class="math notranslate nohighlight">\(q\)</span> so that <span class="math notranslate nohighlight">\(\phi_q(x)\downarrow\)</span> iff the number of symbols in <span class="math notranslate nohighlight">\(x\)</span> is an even number.</p>
</div>
Expand All @@ -586,15 +586,15 @@ <h1>Partial functions<a class="headerlink" href="#partial-functions" title="Perm
\]</div>
<div class="exercise admonition" id="introOneSharp/functions-exercise-3">

<p class="admonition-title"><span class="caption-number">Exercise 17 </span></p>
<p class="admonition-title"><span class="caption-number">Exercise 18 </span></p>
<div class="section" id="exercise-content">
<p>Find a <a class="reference external" href="https://en.wikipedia.org/wiki/Monoid#Monoid_homomorphisms">monoid homomorphism</a>
<span class="math notranslate nohighlight">\(h: (\words, + , \eps) \to (P,\o,\id)\)</span>.</p>
</div>
</div>
<div class="exercise admonition" id="introOneSharp/functions-exercise-4">

<p class="admonition-title"><span class="caption-number">Exercise 18 </span></p>
<p class="admonition-title"><span class="caption-number">Exercise 19 </span></p>
<div class="section" id="exercise-content">
<p>Find three programs <span class="math notranslate nohighlight">\(p\)</span>, <span class="math notranslate nohighlight">\(q\)</span>, and <span class="math notranslate nohighlight">\(r\)</span> such that <span class="math notranslate nohighlight">\([\![p]\!](q)\)</span>, <span class="math notranslate nohighlight">\([\![[\![p]\!](q)]\!](r)\)</span>, <span class="math notranslate nohighlight">\([\![q]\!](r)\)</span>, and <span class="math notranslate nohighlight">\([\![p]\!]([\![q]\!](r))\)</span> are all defined, and yet</p>
<div class="math notranslate nohighlight">
Expand Down Expand Up @@ -646,7 +646,7 @@ <h1>Functions of two or more arguments<a class="headerlink" href="#functions-of-
</div>
<div class="exercise admonition" id="introOneSharp/functions-exercise-6">

<p class="admonition-title"><span class="caption-number">Exercise 19 </span></p>
<p class="admonition-title"><span class="caption-number">Exercise 20 </span></p>
<div class="section" id="exercise-content">
<p>For some purposes, the notion of <span class="math notranslate nohighlight">\(\semantics{p}^n\)</span> is not what one wants. Here is an alternative. We say that</p>
<div class="math notranslate nohighlight">
Expand All @@ -661,7 +661,7 @@ <h1>Functions of two or more arguments<a class="headerlink" href="#functions-of-
</div>
<div class="exercise admonition" id="introOneSharp/functions-exercise-7">

<p class="admonition-title"><span class="caption-number">Exercise 20 </span></p>
<p class="admonition-title"><span class="caption-number">Exercise 21 </span></p>
<div class="section" id="exercise-content">
<p>Here is an example that shows that sometimes <span class="math notranslate nohighlight">\(\semanticsalt{\ }\)</span> is more useful than <span class="math notranslate nohighlight">\(\semantics{ \ }\)</span>. Suppose we have three computable functions:</p>
<div class="math notranslate nohighlight">
Expand Down Expand Up @@ -708,7 +708,7 @@ <h1>Characteristic functions<a class="headerlink" href="#characteristic-function
</div>
<div class="exercise admonition" id="introOneSharp/functions-exercise-8">

<p class="admonition-title"><span class="caption-number">Exercise 21 </span></p>
<p class="admonition-title"><span class="caption-number">Exercise 22 </span></p>
<div class="section" id="exercise-content">
<p>Let <span class="math notranslate nohighlight">\(A\)</span> and <span class="math notranslate nohighlight">\(B\)</span> be <span class="math notranslate nohighlight">\(\one\hash\)</span>-computable sets. Show that <span class="math notranslate nohighlight">\(A\cap B\)</span>, <span class="math notranslate nohighlight">\(A\cup B\)</span>, and <span class="math notranslate nohighlight">\(\overline{A}\)</span> are also <span class="math notranslate nohighlight">\(\one\hash\)</span>-computable, where</p>
<div class="math notranslate nohighlight">
Expand All @@ -724,14 +724,14 @@ <h1>Characteristic functions<a class="headerlink" href="#characteristic-function
</div>
<div class="exercise admonition" id="introOneSharp/functions-exercise-9">

<p class="admonition-title"><span class="caption-number">Exercise 22 </span></p>
<p class="admonition-title"><span class="caption-number">Exercise 23 </span></p>
<div class="section" id="exercise-content">
<p>Is the set of <span class="math notranslate nohighlight">\(\one\hash\)</span> programs a <span class="math notranslate nohighlight">\(\one\hash\)</span>-computable set of words?</p>
</div>
</div>
<div class="exercise admonition" id="introOneSharp/functions-exercise-10">

<p class="admonition-title"><span class="caption-number">Exercise 23 </span></p>
<p class="admonition-title"><span class="caption-number">Exercise 24 </span></p>
<div class="section" id="exercise-content">
<p>Show that the following function is <span class="math notranslate nohighlight">\(\one\hash\)</span>-computable:</p>
<div class="math notranslate nohighlight">
Expand All @@ -747,7 +747,7 @@ <h1>Characteristic functions<a class="headerlink" href="#characteristic-function
</div>
<div class="exercise admonition" id="introOneSharp/functions-exercise-11">

<p class="admonition-title"><span class="caption-number">Exercise 24 </span></p>
<p class="admonition-title"><span class="caption-number">Exercise 25 </span></p>
<div class="section" id="exercise-content">
<p>(a)
As a parallel to how we defined <span class="math notranslate nohighlight">\(\one\hash\)</span>-computability, define what it means for a function from words to words to be <em>Python-computable</em></p>
Expand All @@ -768,7 +768,7 @@ <h1>Computably enumerable sets<a class="headerlink" href="#computably-enumerable
</div>
</div><div class="exercise admonition" id="introOneSharp/functions-exercise-13">

<p class="admonition-title"><span class="caption-number">Exercise 25 </span></p>
<p class="admonition-title"><span class="caption-number">Exercise 26 </span></p>
<div class="section" id="exercise-content">
<p>Show that every computable set is computably enumerable. (As we shall see, the converse is false.). Show also that the family of computably enumerable sets is closed under intersection: if <span class="math notranslate nohighlight">\(A\)</span> and <span class="math notranslate nohighlight">\(B\)</span> are computably enumerable, so is <span class="math notranslate nohighlight">\(A\cap B\)</span>.</p>
</div>
Expand Down
6 changes: 3 additions & 3 deletions _build/html/introOneSharp/haltDef.html
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ <h1>When does a program halt?<a class="headerlink" href="#when-does-a-program-ha
<p>The first halts, while the second halts improperly.</p>
<div class="exercise admonition" id="on-halting">

<p class="admonition-title"><span class="caption-number">Exercise 13 </span></p>
<p class="admonition-title"><span class="caption-number">Exercise 14 </span></p>
<div class="section" id="exercise-content">
<p>Which of the following programs halt when run on all empty registers? Which stop improperly? Why?</p>
<ol class="arabic simple">
Expand All @@ -485,9 +485,9 @@ <h1>When does a program halt?<a class="headerlink" href="#when-does-a-program-ha
</div>
<div class="exercise admonition" id="introOneSharp/haltDef-exercise-1">

<p class="admonition-title"><span class="caption-number">Exercise 14 </span></p>
<p class="admonition-title"><span class="caption-number">Exercise 15 </span></p>
<div class="section" id="exercise-content">
<p><a class="reference internal" href="#on-halting"><span class="std std-numref">Exercise 13</span></a> was concerned with programs run on all empty registers. Find a program <span class="math notranslate nohighlight">\(p\)</span> and words <span class="math notranslate nohighlight">\(w_1\)</span>, <span class="math notranslate nohighlight">\(w_2\)</span>, and <span class="math notranslate nohighlight">\(w_3\)</span> so that</p>
<p><a class="reference internal" href="#on-halting"><span class="std std-numref">Exercise 14</span></a> was concerned with programs run on all empty registers. Find a program <span class="math notranslate nohighlight">\(p\)</span> and words <span class="math notranslate nohighlight">\(w_1\)</span>, <span class="math notranslate nohighlight">\(w_2\)</span>, and <span class="math notranslate nohighlight">\(w_3\)</span> so that</p>
<p>(a) When started with <span class="math notranslate nohighlight">\(w_1\)</span> in R1, <span class="math notranslate nohighlight">\(p\)</span> halts improperly.</p>
<p>(b) When started with <span class="math notranslate nohighlight">\(w_2\)</span> in R1, <span class="math notranslate nohighlight">\(p\)</span> halts improperly.</p>
<p>(c) When started with <span class="math notranslate nohighlight">\(w_3\)</span> in R1, <span class="math notranslate nohighlight">\(p\)</span> goes into an infinite loop inside <span class="math notranslate nohighlight">\(p\)</span>.</p>
Expand Down
Loading

0 comments on commit 5882c44

Please sign in to comment.