Skip to content

Commit

Permalink
fix: make sure for plausible to also works on notes and tinymorph docs
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
  • Loading branch information
aarnphm committed Feb 1, 2025
1 parent cdd6c74 commit a95d6c8
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ id: A1
tags:
- sfwr2fa3
date: "2024-02-16"
modified: 2025-02-01 05:36:37 GMT-05:00
title: DFAs, NFAs, and regular languages
---

see also [[thoughts/university/twenty-four-twenty-five/sfwr-2fa3/rev1/a1/sol.pdf|solutions]]

## Q1.

For each statement below, state if it is true or false, and explain why. The explanation does not need to be a formal proof, but the argument should be sound.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ id: A2
tags:
- sfwr2fa3
date: "2024-03-18"
description: and second assignment.
modified: 2025-02-01 05:36:05 GMT-05:00
title: Regex, pumping lemma
---

> [!note]- solutions
>
> <iframe src="thoughts/university/twenty-four-twenty-five/sfwr-2fa3/rev1/a2/sols.html"></iframe>
## Problème 1.

Give regular expression for the languages bellow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
<!DOCTYPE html>
<html><head></head><body style="color: rgb(32, 33, 34); font-family: undefined;"><p>1) Note there are more than one way to do these.</p>
<p>i) (aa)*(bb)* + a(aa)*b(bb)*<br>ii) b*a*((bb)b*a*)*b*<br>iii) (a*ba*b)*a*</p>
<p></p>
<p>3) We need to show that if we assume L is finite, that the pumping lemma is equivalent to True. If you select a k' such that k' &gt; |x| for all x in L, then the range of the first "for all" quantification becomes False. Applying the empty range axiom on forall results in True. From here it's relatively straight forward to show that even for finite languages the pumping lemma holds.&nbsp;&nbsp;</p>
<p>4)&nbsp;</p>
<p>a) Let x = a^(k^2), y = b^k, and z = a^k. Then no matter what is chosen for v, you can pump b's into the string to break the balance and produce a string outside the language</p>
<p>b) Let x = a^kb, y = a^k, z = b. Because one can never choose a v which is not a sequence of a's and that the first b must be halfway through the string, you can then pump outside the language. Note Letting x = a^k, y = a^k, z = empty would not work.</p>
<p>c) Applying the exact proof from lecture (for the perfect square example) works for this language as well.&nbsp;</p></body></html>
<!doctype html>
<html>
<body style="color: rgb(32, 33, 34); font-family: undefined">
<p>1) Note there are more than one way to do these.</p>
<p>i) (aa)*(bb)* + a(aa)*b(bb)*<br />ii) b*a*((bb)b*a*)*b*<br />iii) (a*ba*b)*a*</p>
<p></p>
<p>
3) We need to show that if we assume L is finite, that the pumping lemma is equivalent to
True. If you select a k' such that k' &gt; |x| for all x in L, then the range of the first
"for all" quantification becomes False. Applying the empty range axiom on forall results in
True. From here it's relatively straight forward to show that even for finite languages the
pumping lemma holds.&nbsp;&nbsp;
</p>
<p>4)&nbsp;</p>
<p>
a) Let x = a^(k^2), y = b^k, and z = a^k. Then no matter what is chosen for v, you can pump
b's into the string to break the balance and produce a string outside the language
</p>
<p>
b) Let x = a^kb, y = a^k, z = b. Because one can never choose a v which is not a sequence of
a's and that the first b must be halfway through the string, you can then pump outside the
language. Note Letting x = a^k, y = a^k, z = empty would not work.
</p>
<p>
c) Applying the exact proof from lecture (for the perfect square example) works for this
language as well.&nbsp;
</p>
</body>
</html>

2 changes: 1 addition & 1 deletion quartz/plugins/emitters/componentResources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function addGlobalPageResources(ctx: BuildCtx, componentResources: ComponentReso
componentResources.afterDOMLoaded.push(`
const plausibleScript = document.createElement("script")
plausibleScript.src = "${plausibleHost}/js/script.outbound-links.manual.js"
plausibleScript.setAttribute("data-domain", location.hostname)
plausibleScript.setAttribute("data-domain", [location.hostname, "notes.aarnphm.xyz", "tinymorph.aarnphm.xyz"].join(','))
plausibleScript.defer = true
document.head.appendChild(plausibleScript)
Expand Down
10 changes: 7 additions & 3 deletions quartz/styles/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -693,12 +693,16 @@ ol.overflow {
overflow-y: hidden;
}

iframe {
border-radius: var(--border-radius);
border: 1px solid var(--lightgray);
width: 100%;
}

.external-embed.youtube,
iframe.pdf {
aspect-ratio: 16 / 9;
height: 100%;
width: 100%;
border-radius: 5px;
aspect-ratio: 16 / 9;
}

.navigation-progress {
Expand Down

0 comments on commit a95d6c8

Please sign in to comment.