mirror of
https://github.com/RustyRaptor/compilers.git
synced 2026-12-03 15:15:17 -07:00
Merge branch 'main' of https://github.com/RustyRaptor/compilers into main
This commit is contained in:
commit
b5bba5b51d
6 files changed
+445
-2
No files matched your search
@@ -0,0 +1,409 @@
|
||||
<!DOCTYPE html><html><head>
|
||||
<title>Ch3HW</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="file:////home/doge/.vscode/extensions/shd101wyy.markdown-preview-enhanced-0.5.16/node_modules/@shd101wyy/mume/dependencies/katex/katex.min.css">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
/**
|
||||
* prism.js Github theme based on GitHub's theme.
|
||||
* @author Sam Clarke
|
||||
*/
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #333;
|
||||
background: none;
|
||||
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.4;
|
||||
|
||||
-moz-tab-size: 8;
|
||||
-o-tab-size: 8;
|
||||
tab-size: 8;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: .8em;
|
||||
overflow: auto;
|
||||
/* border: 1px solid #ddd; */
|
||||
border-radius: 3px;
|
||||
/* background: #fff; */
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
white-space: normal;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.blockquote {
|
||||
color: #969896;
|
||||
}
|
||||
|
||||
.token.cdata {
|
||||
color: #183691;
|
||||
}
|
||||
|
||||
.token.doctype,
|
||||
.token.punctuation,
|
||||
.token.variable,
|
||||
.token.macro.property {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.important,
|
||||
.token.keyword,
|
||||
.token.rule,
|
||||
.token.builtin {
|
||||
color: #a71d5d;
|
||||
}
|
||||
|
||||
.token.string,
|
||||
.token.url,
|
||||
.token.regex,
|
||||
.token.attr-value {
|
||||
color: #183691;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.number,
|
||||
.token.boolean,
|
||||
.token.entity,
|
||||
.token.atrule,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.command,
|
||||
.token.code {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.selector,
|
||||
.token.prolog {
|
||||
color: #63a35c;
|
||||
}
|
||||
|
||||
.token.function,
|
||||
.token.namespace,
|
||||
.token.pseudo-element,
|
||||
.token.class,
|
||||
.token.class-name,
|
||||
.token.pseudo-class,
|
||||
.token.id,
|
||||
.token.url-reference .token.variable,
|
||||
.token.attr-name {
|
||||
color: #795da3;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.token.title,
|
||||
.token.title .token.punctuation {
|
||||
font-weight: bold;
|
||||
color: #1d3e81;
|
||||
}
|
||||
|
||||
.token.list {
|
||||
color: #ed6a43;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
background-color: #eaffea;
|
||||
color: #55a532;
|
||||
}
|
||||
|
||||
.token.deleted {
|
||||
background-color: #ffecec;
|
||||
color: #bd2c00;
|
||||
}
|
||||
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
|
||||
/* JSON */
|
||||
.language-json .token.property {
|
||||
color: #183691;
|
||||
}
|
||||
|
||||
.language-markup .token.tag .token.punctuation {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* CSS */
|
||||
code.language-css,
|
||||
.language-css .token.function {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
/* YAML */
|
||||
.language-yaml .token.atrule {
|
||||
color: #63a35c;
|
||||
}
|
||||
|
||||
code.language-yaml {
|
||||
color: #183691;
|
||||
}
|
||||
|
||||
/* Ruby */
|
||||
.language-ruby .token.function {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* Markdown */
|
||||
.language-markdown .token.url {
|
||||
color: #795da3;
|
||||
}
|
||||
|
||||
/* Makefile */
|
||||
.language-makefile .token.symbol {
|
||||
color: #795da3;
|
||||
}
|
||||
|
||||
.language-makefile .token.variable {
|
||||
color: #183691;
|
||||
}
|
||||
|
||||
.language-makefile .token.builtin {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
/* Bash */
|
||||
.language-bash .token.keyword {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
/* highlight */
|
||||
pre[data-line] {
|
||||
position: relative;
|
||||
padding: 1em 0 1em 3em;
|
||||
}
|
||||
pre[data-line] .line-highlight-wrapper {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: transparent;
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
pre[data-line] .line-highlight {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: inherit 0;
|
||||
margin-top: 1em;
|
||||
background: hsla(24, 20%, 50%,.08);
|
||||
background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
|
||||
pointer-events: none;
|
||||
line-height: inherit;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
pre[data-line] .line-highlight:before,
|
||||
pre[data-line] .line-highlight[data-end]:after {
|
||||
content: attr(data-start);
|
||||
position: absolute;
|
||||
top: .4em;
|
||||
left: .6em;
|
||||
min-width: 1em;
|
||||
padding: 0 .5em;
|
||||
background-color: hsla(24, 20%, 50%,.4);
|
||||
color: hsl(24, 20%, 95%);
|
||||
font: bold 65%/1.5 sans-serif;
|
||||
text-align: center;
|
||||
vertical-align: .3em;
|
||||
border-radius: 999px;
|
||||
text-shadow: none;
|
||||
box-shadow: 0 1px white;
|
||||
}
|
||||
|
||||
pre[data-line] .line-highlight[data-end]:after {
|
||||
content: attr(data-end);
|
||||
top: auto;
|
||||
bottom: .4em;
|
||||
}html body{font-family:"Helvetica Neue",Helvetica,"Segoe UI",Arial,freesans,sans-serif;font-size:16px;line-height:1.6;color:#333;background-color:#fff;overflow:initial;box-sizing:border-box;word-wrap:break-word}html body>:first-child{margin-top:0}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{line-height:1.2;margin-top:1em;margin-bottom:16px;color:#000}html body h1{font-size:2.25em;font-weight:300;padding-bottom:.3em}html body h2{font-size:1.75em;font-weight:400;padding-bottom:.3em}html body h3{font-size:1.5em;font-weight:500}html body h4{font-size:1.25em;font-weight:600}html body h5{font-size:1.1em;font-weight:600}html body h6{font-size:1em;font-weight:600}html body h1,html body h2,html body h3,html body h4,html body h5{font-weight:600}html body h5{font-size:1em}html body h6{color:#5c5c5c}html body strong{color:#000}html body del{color:#5c5c5c}html body a:not([href]){color:inherit;text-decoration:none}html body a{color:#08c;text-decoration:none}html body a:hover{color:#00a3f5;text-decoration:none}html body img{max-width:100%}html body>p{margin-top:0;margin-bottom:16px;word-wrap:break-word}html body>ul,html body>ol{margin-bottom:16px}html body ul,html body ol{padding-left:2em}html body ul.no-list,html body ol.no-list{padding:0;list-style-type:none}html body ul ul,html body ul ol,html body ol ol,html body ol ul{margin-top:0;margin-bottom:0}html body li{margin-bottom:0}html body li.task-list-item{list-style:none}html body li>p{margin-top:0;margin-bottom:0}html body .task-list-item-checkbox{margin:0 .2em .25em -1.8em;vertical-align:middle}html body .task-list-item-checkbox:hover{cursor:pointer}html body blockquote{margin:16px 0;font-size:inherit;padding:0 15px;color:#5c5c5c;background-color:#f0f0f0;border-left:4px solid #d6d6d6}html body blockquote>:first-child{margin-top:0}html body blockquote>:last-child{margin-bottom:0}html body hr{height:4px;margin:32px 0;background-color:#d6d6d6;border:0 none}html body table{margin:10px 0 15px 0;border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}html body table th{font-weight:bold;color:#000}html body table td,html body table th{border:1px solid #d6d6d6;padding:6px 13px}html body dl{padding:0}html body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:bold}html body dl dd{padding:0 16px;margin-bottom:16px}html body code{font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:.85em !important;color:#000;background-color:#f0f0f0;border-radius:3px;padding:.2em 0}html body code::before,html body code::after{letter-spacing:-0.2em;content:"\00a0"}html body pre>code{padding:0;margin:0;font-size:.85em !important;word-break:normal;white-space:pre;background:transparent;border:0}html body .highlight{margin-bottom:16px}html body .highlight pre,html body pre{padding:1em;overflow:auto;font-size:.85em !important;line-height:1.45;border:#d6d6d6;border-radius:3px}html body .highlight pre{margin-bottom:0;word-break:normal}html body pre code,html body pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}html body pre code:before,html body pre tt:before,html body pre code:after,html body pre tt:after{content:normal}html body p,html body blockquote,html body ul,html body ol,html body dl,html body pre{margin-top:0;margin-bottom:16px}html body kbd{color:#000;border:1px solid #d6d6d6;border-bottom:2px solid #c7c7c7;padding:2px 4px;background-color:#f0f0f0;border-radius:3px}@media print{html body{background-color:#fff}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{color:#000;page-break-after:avoid}html body blockquote{color:#5c5c5c}html body pre{page-break-inside:avoid}html body table{display:table}html body img{display:block;max-width:100%;max-height:100%}html body pre,html body code{word-wrap:break-word;white-space:pre}}.markdown-preview{width:100%;height:100%;box-sizing:border-box}.markdown-preview .pagebreak,.markdown-preview .newpage{page-break-before:always}.markdown-preview pre.line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}.markdown-preview pre.line-numbers>code{position:relative}.markdown-preview pre.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:1em;font-size:100%;left:0;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-preview pre.line-numbers .line-numbers-rows>span{pointer-events:none;display:block;counter-increment:linenumber}.markdown-preview pre.line-numbers .line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}.markdown-preview .mathjax-exps .MathJax_Display{text-align:center !important}.markdown-preview:not([for="preview"]) .code-chunk .btn-group{display:none}.markdown-preview:not([for="preview"]Line truncated
|
||||
/* Please visit the URL below for more information: */
|
||||
/* https://shd101wyy.github.io/markdown-preview-enhanced/#/customize-css */
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body for="html-export">
|
||||
<div class="mume markdown-preview ">
|
||||
<h1 class="mume-header" id="chapter-3-homework">Chapter 3 Homework</h1>
|
||||
|
||||
<h2 class="mume-header" id="ziad-arafat-feb-20-2021">Ziad Arafat, Feb 20 2021</h2>
|
||||
|
||||
<h3 class="mume-header" id="363">3.6.3</h3>
|
||||
|
||||
<ul>
|
||||
<li>There's a lot of paths that follow aabb so I assume we don't have to literally list all of them.</li>
|
||||
<li>Here's the aabb path that goes to the end.<br>
|
||||
<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mn>0</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>a</mi><mo stretchy="false">)</mo><mn>1</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>a</mi><mo stretchy="false">)</mo><mn>2</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>b</mi><mo stretchy="false">)</mo><mn>2</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>b</mi><mo stretchy="false">)</mo><mn>3</mn></mrow><annotation encoding="application/x-tex">0 \Rightarrow (a) 1 \Rightarrow (a) 2 \Rightarrow (b) 2 \Rightarrow (b) 3</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.64444em;vertical-align:0em;"></span><span class="mord">0</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">a</span><span class="mclose">)</span><span class="mord">1</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">a</span><span class="mclose">)</span><span class="mord">2</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">b</span><span class="mclose">)</span><span class="mord">2</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">b</span><span class="mclose">)</span><span class="mord">3</span></span></span></span></span></li>
|
||||
</ul>
|
||||
<h3 class="mume-header" id="364">3.6.4</h3>
|
||||
|
||||
<ul>
|
||||
<li>Accepted<br>
|
||||
<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mn>0</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>a</mi><mo stretchy="false">)</mo><mn>1</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>ϵ</mi><mo stretchy="false">)</mo><mn>0</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>a</mi><mo stretchy="false">)</mo><mn>1</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>b</mi><mo stretchy="false">)</mo><mn>2</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>b</mi><mo stretchy="false">)</mo><mn>3</mn></mrow><annotation encoding="application/x-tex">0 \Rightarrow(a) 1 \Rightarrow (\epsilon) 0 \Rightarrow (a) 1 \Rightarrow (b) 2 \Rightarrow (b) 3</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.64444em;vertical-align:0em;"></span><span class="mord">0</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">a</span><span class="mclose">)</span><span class="mord">1</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">ϵ</span><span class="mclose">)</span><span class="mord">0</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">a</span><span class="mclose">)</span><span class="mord">1</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">b</span><span class="mclose">)</span><span class="mord">2</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">b</span><span class="mclose">)</span><span class="mord">3</span></span></span></span></span></li>
|
||||
</ul>
|
||||
<p><span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mn>0</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>ϵ</mi><mo stretchy="false">)</mo><mn>3</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>a</mi><mo stretchy="false">)</mo><mn>0</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>a</mi><mo stretchy="false">)</mo><mn>1</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>b</mi><mo stretchy="false">)</mo><mn>2</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>b</mi><mo stretchy="false">)</mo><mn>3</mn></mrow><annotation encoding="application/x-tex">0 \Rightarrow (\epsilon) 3 \Rightarrow (a) 0 \Rightarrow (a) 1 \Rightarrow (b) 2 \Rightarrow (b) 3</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.64444em;vertical-align:0em;"></span><span class="mord">0</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">ϵ</span><span class="mclose">)</span><span class="mord">3</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">a</span><span class="mclose">)</span><span class="mord">0</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">a</span><span class="mclose">)</span><span class="mord">1</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">b</span><span class="mclose">)</span><span class="mord">2</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">b</span><span class="mclose">)</span><span class="mord">3</span></span></span></span></span></p>
|
||||
<p><span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mn>0</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>ϵ</mi><mo stretchy="false">)</mo><mn>3</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>ϵ</mi><mo stretchy="false">)</mo><mn>2</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>ϵ</mi><mo stretchy="false">)</mo><mn>1</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>ϵ</mi><mo stretchy="false">)</mo><mn>0</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>a</mi><mo stretchy="false">)</mo><mn>1</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>ϵ</mi><mo stretchy="false">)</mo><mn>0</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>a</mi><mo stretchy="false">)</mo><mn>1</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>b</mi><mo stretchy="false">)</mo><mn>2</mn><mo>⇒</mo><mo stretchy="false">(</mo><mi>b</mi><mo stretchy="false">)</mo><mn>3</mn></mrow><annotation encoding="application/x-tex">0 \Rightarrow (\epsilon) 3 \Rightarrow (\epsilon) 2 \Rightarrow (\epsilon) 1 \Rightarrow (\epsilon) 0 \Rightarrow (a) 1 \Rightarrow (\epsilon) 0 \Rightarrow (a) 1 \Rightarrow (b) 2 \Rightarrow (b) 3</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.64444em;vertical-align:0em;"></span><span class="mord">0</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">ϵ</span><span class="mclose">)</span><span class="mord">3</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">ϵ</span><span class="mclose">)</span><span class="mord">2</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">ϵ</span><span class="mclose">)</span><span class="mord">1</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">ϵ</span><span class="mclose">)</span><span class="mord">0</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">a</span><span class="mclose">)</span><span class="mord">1</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">ϵ</span><span class="mclose">)</span><span class="mord">0</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">a</span><span class="mclose">)</span><span class="mord">1</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">b</span><span class="mclose">)</span><span class="mord">2</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">⇒</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">b</span><span class="Line truncated
|
||||
<h3 class="mume-header" id="365">3.6.5</h3>
|
||||
|
||||
<h4 class="mume-header" id="a">a</h4>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>State</th>
|
||||
<th>a</th>
|
||||
<th>b</th>
|
||||
<th>a + <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>ϵ</mi></mrow><annotation encoding="application/x-tex">\epsilon</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.43056em;vertical-align:0em;"></span><span class="mord mathnormal">ϵ</span></span></span></span></th>
|
||||
<th>b + <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>ϵ</mi></mrow><annotation encoding="application/x-tex">\epsilon</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.43056em;vertical-align:0em;"></span><span class="mord mathnormal">ϵ</span></span></span></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{0}</td>
|
||||
<td>{1,0}</td>
|
||||
<td>{0}</td>
|
||||
<td>{1,0}</td>
|
||||
<td>{0}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{1,0}</td>
|
||||
<td>{1,0,2}</td>
|
||||
<td>{0,1}</td>
|
||||
<td>{1,0,2}</td>
|
||||
<td>{0,1}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{1,0,2}</td>
|
||||
<td>{1,0,2}</td>
|
||||
<td>{0,1,2,3}</td>
|
||||
<td>{1,0,2}</td>
|
||||
<td>{0,1,2,3}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{0,1,2,3}</td>
|
||||
<td>{1,0,2}</td>
|
||||
<td>{0,1,2,3}</td>
|
||||
<td>{1,0,2}</td>
|
||||
<td>{0,1,2,3}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 class="mume-header" id="b">b</h4>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>State</th>
|
||||
<th>a</th>
|
||||
<th>b</th>
|
||||
<th>a + <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>ϵ</mi></mrow><annotation encoding="application/x-tex">\epsilon</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.43056em;vertical-align:0em;"></span><span class="mord mathnormal">ϵ</span></span></span></span></th>
|
||||
<th>b + <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>ϵ</mi></mrow><annotation encoding="application/x-tex">\epsilon</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.43056em;vertical-align:0em;"></span><span class="mord mathnormal">ϵ</span></span></span></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{0,1,2,3}</td>
|
||||
<td>{0,1}</td>
|
||||
<td>{2,3}</td>
|
||||
<td>{0,1,2,3}</td>
|
||||
<td>{0,1,2,3}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 class="mume-header" id="373">3.7.3</h3>
|
||||
|
||||
<h4 class="mume-header" id="a-1">a</h4>
|
||||
|
||||
<h5 class="mume-header" id="nfa-ab">NFA <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><mi>a</mi><mi mathvariant="normal">∣</mi><mi>b</mi><mo stretchy="false">)</mo><mo>∗</mo></mrow><annotation encoding="application/x-tex">(a|b)*</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal">a</span><span class="mord">∣</span><span class="mord mathnormal">b</span><span class="mclose">)</span><span class="mord">∗</span></span></span></span></h5>
|
||||
|
||||
<p><img src="thompson2.png" alt="step 2"></p>
|
||||
<h5 class="mume-header" id="transition-table">Transition Table</h5>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>State</th>
|
||||
<th>a</th>
|
||||
<th>b</th>
|
||||
<th>a + <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>ϵ</mi></mrow><annotation encoding="application/x-tex">\epsilon</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.43056em;vertical-align:0em;"></span><span class="mord mathnormal">ϵ</span></span></span></span></th>
|
||||
<th>b + <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>ϵ</mi></mrow><annotation encoding="application/x-tex">\epsilon</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.43056em;vertical-align:0em;"></span><span class="mord mathnormal">ϵ</span></span></span></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>X: {1,2,3,6}</td>
|
||||
<td>{4}</td>
|
||||
<td>{7}</td>
|
||||
<td>{4,3,2,6,8}</td>
|
||||
<td>{7,3,2,6,8}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Y: {4,3,2,6,8}</td>
|
||||
<td>{4}</td>
|
||||
<td>{7}</td>
|
||||
<td>{4,3,2,6,8}</td>
|
||||
<td>{7,3,2,6,8}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Z: {7,3,2,6,8}</td>
|
||||
<td>{4}</td>
|
||||
<td>{7}</td>
|
||||
<td>{4,3,2,6,8}</td>
|
||||
<td>{7,3,2,6,8}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h5 class="mume-header" id="dfa">DFA</h5>
|
||||
|
||||
<p><img src="thompson1.png" alt="A"></p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body></html>
|
||||
+36
-2
@@ -3,7 +3,8 @@
|
||||
|
||||
### 3.6.3
|
||||
|
||||
- Accepted
|
||||
- There's a lot of paths that follow aabb so I assume we don't have to literally list all of them.
|
||||
- Here's the aabb path that goes to the end.
|
||||
$$ 0 \Rightarrow (a) 1 \Rightarrow (a) 2 \Rightarrow (b) 2 \Rightarrow (b) 3$$
|
||||
|
||||
### 3.6.4
|
||||
@@ -14,4 +15,37 @@ $$0 \Rightarrow (\epsilon) 3 \Rightarrow (a) 0 \Rightarrow (a) 1 \Rightarrow (b)
|
||||
|
||||
$$0 \Rightarrow (\epsilon) 3 \Rightarrow (\epsilon) 2 \Rightarrow (\epsilon) 1 \Rightarrow (\epsilon) 0 \Rightarrow (a) 1 \Rightarrow (\epsilon) 0 \Rightarrow (a) 1 \Rightarrow (b) 2 \Rightarrow (b) 3$$
|
||||
|
||||
### 3.6.5
|
||||
### 3.6.5
|
||||
|
||||
#### a
|
||||
| State | a | b | a + $\epsilon$ | b + $\epsilon$ |
|
||||
|-----------|---------|-----------|----------------|----------------|
|
||||
| {0} | {1,0} | {0} | {1,0} | {0} |
|
||||
| {1,0} | {1,0,2} | {0,1} | {1,0,2} | {0,1} |
|
||||
| {1,0,2} | {1,0,2} | {0,1,2,3} | {1,0,2} | {0,1,2,3} |
|
||||
| {0,1,2,3} | {1,0,2} | {0,1,2,3} | {1,0,2} | {0,1,2,3} |
|
||||
|
||||
#### b
|
||||
| State | a | b | a + $\epsilon$ | b + $\epsilon$ |
|
||||
|-----------|-------|-------|----------------|----------------|
|
||||
| {0,1,2,3} | {0,1} | {2,3} | {0,1,2,3} | {0,1,2,3} |
|
||||
|
||||
### 3.7.3
|
||||
#### a
|
||||
|
||||
##### NFA $(a|b)*$
|
||||
|
||||

|
||||
|
||||
##### Transition Table
|
||||
|
||||
| State | a | b | a + $\epsilon$ | b + $\epsilon$ |
|
||||
|----------------|-----|-----|-------------------|-------------------|
|
||||
| X: {1,2,3,6} | {4} | {7} | {4,3,2,6,8} | {7,3,2,6,8} |
|
||||
| Y: {4,3,2,6,8} | {4} | {7} | {4,3,2,6,8} | {7,3,2,6,8} |
|
||||
| Z: {7,3,2,6,8} | {4} | {7} | {4,3,2,6,8} | {7,3,2,6,8} |
|
||||
|
||||
|
||||
##### DFA
|
||||
|
||||

|
||||
Binary file not shown.
|
After Width: | Height: | Size: 68 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 81 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
Reference in new issue
Block a user