Import Hugo

This commit is contained in:
Smaug123
2023-09-30 18:30:52 +01:00
parent 85d784d889
commit 1f3e107106
250 changed files with 59591 additions and 48 deletions

1
hugo/static/CNAME Normal file
View File

@@ -0,0 +1 @@
www.patrickstevens.co.uk

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -0,0 +1,343 @@
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 12.0' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 158, 7]
NotebookDataLength[ 12714, 335]
NotebookOptionsPosition[ 11238, 306]
NotebookOutlinePosition[ 11576, 321]
CellTagsIndexPosition[ 11533, 318]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell["Faster version of a function that converts from base 256", "Text",
CellChangeTimes->{{3.788755483394623*^9,
3.788755490602293*^9}},ExpressionUUID->"cc39b8c9-5f16-48be-bd34-\
d6c82fc6ffe0"],
Cell[BoxData[
RowBox[{
RowBox[{"from", "=",
RowBox[{"Compile", "[",
RowBox[{
RowBox[{"{",
RowBox[{"{",
RowBox[{"x", ",", "_Integer", ",", "1"}], "}"}], "}"}], ",",
RowBox[{"Module", "[",
RowBox[{
RowBox[{"{",
RowBox[{"i", ",",
RowBox[{"exp", "=", "1"}], ",",
RowBox[{"ans", "=", "0"}]}], "}"}], ",",
RowBox[{
RowBox[{"For", "[",
RowBox[{
RowBox[{"i", "=", "1"}], ",",
RowBox[{"i", "\[LessEqual]",
RowBox[{"Length", "[", "x", "]"}]}], ",",
RowBox[{"i", "++"}], ",",
RowBox[{
RowBox[{"ans", "=",
RowBox[{"ans", "+",
RowBox[{"exp", "*",
RowBox[{"x", "[",
RowBox[{"[", "i", "]"}], "]"}]}]}]}], ";",
RowBox[{"exp", "=",
RowBox[{"exp", "*", "256"}]}]}]}], "]"}], ";",
"\[IndentingNewLine]", "ans"}]}], "]"}], ",",
RowBox[{"CompilationTarget", "\[Rule]", "\"\<C\>\""}]}], "]"}]}],
";"}]], "Input",
CellChangeTimes->{{3.7887551815762043`*^9, 3.7887552168967*^9}, {
3.788755264622891*^9, 3.788755273542343*^9}, {3.788755312072075*^9,
3.788755502547472*^9}},
CellLabel->"In[42]:=",ExpressionUUID->"ec1ef9c0-9cb8-4653-bb0e-1489c586d5b5"],
Cell["Faster version of a function that extracts the data segment", "Text",
CellChangeTimes->{{3.7887556639557953`*^9,
3.788755671083427*^9}},ExpressionUUID->"eb466430-8c2a-4295-b4af-\
31056f648c76"],
Cell[BoxData[
RowBox[{
RowBox[{"getData", "=",
RowBox[{"Compile", "[",
RowBox[{
RowBox[{"{",
RowBox[{"{",
RowBox[{"x", ",", "_Integer", ",", "1"}], "}"}], "}"}], ",",
"\[IndentingNewLine]",
RowBox[{"from", "/@",
RowBox[{"Partition", "[",
RowBox[{
RowBox[{"x", "[",
RowBox[{"[",
RowBox[{"45", ";;",
RowBox[{"-", "1"}]}], "]"}], "]"}], ",", "2"}], "]"}]}], ",",
RowBox[{"CompilationOptions", "\[Rule]",
RowBox[{"{",
RowBox[{"\"\<InlineExternalDefinitions\>\"", "\[Rule]", "True"}],
"}"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input",
CellChangeTimes->{{3.788755576209704*^9, 3.7887556472507544`*^9}},
CellLabel->"In[51]:=",ExpressionUUID->"edfe0e44-7b88-4c5b-95cd-a8b1c3204c01"],
Cell["\<\
This file happens to have only one data chunk, so we can cheat by just \
returning that chunk.\
\>", "Text",
CellChangeTimes->{{3.7887548358517103`*^9,
3.788754854499514*^9}},ExpressionUUID->"0c6dea3a-20ea-467f-ac76-\
7069e369c20c"],
Cell[BoxData[
RowBox[{
RowBox[{"parse", "[", "file_", "]"}], ":=",
RowBox[{"With", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"channelsNum", "=",
RowBox[{"from", "@",
RowBox[{"file", "[",
RowBox[{"[",
RowBox[{"23", ";;", "24"}], "]"}], "]"}]}]}], ",",
RowBox[{"sampleRate", "=",
RowBox[{"from", "@",
RowBox[{"file", "[",
RowBox[{"[",
RowBox[{"25", ";;", "28"}], "]"}], "]"}]}]}], ",",
RowBox[{"n1", "=",
RowBox[{"from", "@",
RowBox[{"file", "[",
RowBox[{"[",
RowBox[{"29", ";;", "32"}], "]"}], "]"}]}]}]}], "}"}], ",",
"\[IndentingNewLine]",
RowBox[{
RowBox[{"Assert", "[",
RowBox[{
RowBox[{"file", "[",
RowBox[{"[",
RowBox[{"1", ";;", "4"}], "]"}], "]"}], "\[Equal]",
RowBox[{"ToCharacterCode", "@", "\"\<RIFF\>\""}]}], "]"}], ";",
"\[IndentingNewLine]",
RowBox[{"Assert", "[",
RowBox[{
RowBox[{"file", "[",
RowBox[{"[",
RowBox[{"9", ";;", "12"}], "]"}], "]"}], "\[Equal]",
RowBox[{"ToCharacterCode", "@", "\"\<WAVE\>\""}]}], "]"}], ";",
"\[IndentingNewLine]",
RowBox[{"Assert", "[",
RowBox[{
RowBox[{"file", "[",
RowBox[{"[",
RowBox[{"13", ";;", "15"}], "]"}], "]"}], "\[Equal]",
RowBox[{"ToCharacterCode", "@", "\"\<fmt\>\""}]}], "]"}], ";",
"\[IndentingNewLine]",
RowBox[{"Assert", "[",
RowBox[{
RowBox[{"file", "[",
RowBox[{"[", "16", "]"}], "]"}], "\[Equal]", "0"}], "]"}], ";",
"\[IndentingNewLine]",
RowBox[{"Assert", "[",
RowBox[{
RowBox[{"from", "@",
RowBox[{"file", "[",
RowBox[{"[",
RowBox[{"35", ";;", "36"}], "]"}], "]"}]}], "\[Equal]", "16"}],
"]"}], ";", "\[IndentingNewLine]",
RowBox[{"Assert", "[",
RowBox[{
RowBox[{"file", "[",
RowBox[{"[",
RowBox[{"37", ";;", "40"}], "]"}], "]"}], "\[Equal]",
RowBox[{"ToCharacterCode", "@", "\"\<data\>\""}]}], "]"}], ";",
"\[IndentingNewLine]",
RowBox[{"<|",
RowBox[{
RowBox[{"\"\<DataSize\>\"", "\[Rule]",
RowBox[{"from", "@",
RowBox[{"file", "[",
RowBox[{"[",
RowBox[{"41", ";;", "44"}], "]"}], "]"}]}]}], ",",
RowBox[{"\"\<BitsPerSample\>\"", "\[Rule]",
RowBox[{"8", " ",
FractionBox["n1",
RowBox[{"channelsNum", " ", "sampleRate"}]]}]}], ",",
RowBox[{"\"\<Channels\>\"", "\[Rule]", "channelsNum"}], ",",
RowBox[{"\"\<SampleRate\>\"", "\[Rule]", "sampleRate"}], ",",
RowBox[{"\"\<FormatType\>\"", "\[Rule]",
RowBox[{"from", "@",
RowBox[{"file", "[",
RowBox[{"[",
RowBox[{"21", ";;", "22"}], "]"}], "]"}]}]}], ",",
RowBox[{"\"\<FileSize\>\"", "\[Rule]",
RowBox[{"from", "@",
RowBox[{"file", "[",
RowBox[{"[",
RowBox[{"5", ";;", "8"}], "]"}], "]"}]}]}], ",",
RowBox[{"\"\<DataSize\>\"", "\[Rule]",
RowBox[{"from", "@",
RowBox[{"file", "[",
RowBox[{"[",
RowBox[{"41", ";;", "44"}], "]"}], "]"}]}]}], ",",
RowBox[{"\"\<FormatSize\>\"", "\[Rule]",
RowBox[{"from", "@",
RowBox[{"file", "[",
RowBox[{"[",
RowBox[{"17", ";;", "20"}], "]"}], "]"}]}]}], ",",
"\[IndentingNewLine]",
RowBox[{"\"\<Data\>\"", "\[Rule]",
RowBox[{"Hold", "[",
RowBox[{"getData", "@", "bytes"}], "]"}]}]}], "|>"}]}]}],
"\[IndentingNewLine]", "]"}]}]], "Input",
CellChangeTimes->{{3.788754557234763*^9, 3.7887547459779367`*^9}, {
3.788754818973762*^9, 3.788754826684957*^9}, {3.78875495590418*^9,
3.78875498911036*^9}, {3.788755035509864*^9, 3.788755049891622*^9}, {
3.788755082396351*^9, 3.788755087299266*^9}, {3.7887556749656487`*^9,
3.788755676692823*^9}},
CellLabel->"In[53]:=",ExpressionUUID->"7da46baf-5bdb-43bd-b024-05c98ea9193a"],
Cell[BoxData[
RowBox[{
RowBox[{"bytes", "=",
RowBox[{"BinaryReadList", "[", "\"\<tiny_planet.wav\>\"", "]"}]}],
";"}]], "Input",
CellChangeTimes->{{3.788443785975236*^9, 3.788443787372821*^9}, {
3.7887548080466843`*^9, 3.788754808819531*^9},
3.78875598010133*^9},ExpressionUUID->"5fa0b5d9-7f23-464a-9bc9-\
91c11a17d3ae"],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"parsed", "=",
RowBox[{"parse", "[", "bytes", "]"}]}]], "Input",
CellChangeTimes->{{3.7884437981748037`*^9, 3.7884438022852917`*^9}, {
3.788754929220993*^9, 3.78875492979454*^9}},
CellLabel->"In[55]:=",ExpressionUUID->"261940ac-42c1-4617-9125-1d6263ce6651"],
Cell[BoxData[
RowBox[{"\[LeftAssociation]",
RowBox[{
RowBox[{"\<\"DataSize\"\>", "\[Rule]", "43076000"}], ",",
RowBox[{"\<\"BitsPerSample\"\>", "\[Rule]", "16"}], ",",
RowBox[{"\<\"Channels\"\>", "\[Rule]", "2"}], ",",
RowBox[{"\<\"SampleRate\"\>", "\[Rule]", "44100"}], ",",
RowBox[{"\<\"FormatType\"\>", "\[Rule]", "1"}], ",",
RowBox[{"\<\"FileSize\"\>", "\[Rule]", "43076036"}], ",",
RowBox[{"\<\"FormatSize\"\>", "\[Rule]", "16"}], ",",
RowBox[{"\<\"Data\"\>", "\[Rule]",
RowBox[{"Hold", "[",
RowBox[{"getData", "[", "bytes", "]"}], "]"}]}]}],
"\[RightAssociation]"}]], "Output",
CellChangeTimes->{
3.788754810775655*^9, 3.788754866269807*^9, {3.788754907306995*^9,
3.78875495088076*^9}, {3.7887549947380457`*^9, 3.788754997318452*^9},
3.788755052012539*^9, 3.788755098786127*^9, 3.7887556791251593`*^9},
CellLabel->"Out[55]=",ExpressionUUID->"6211ae28-04c5-4899-ae53-96f302d09f88"]
}, Open ]],
Cell[BoxData[
RowBox[{
RowBox[{"d", "=",
RowBox[{
RowBox[{
RowBox[{"FromDigits", "[",
RowBox[{"#", ",", "2"}], "]"}], "&"}], "/@",
RowBox[{"Partition", "[",
RowBox[{
RowBox[{"Mod", "[",
RowBox[{
RowBox[{"ReleaseHold", "[",
RowBox[{"parsed", "[",
RowBox[{"[", "\"\<Data\>\"", "]"}], "]"}], "]"}], ",", "2"}], "]"}],
",", "8"}], "]"}]}]}], ";"}]], "Input",
CellChangeTimes->{{3.788755052986875*^9, 3.788755067154623*^9}, {
3.788755152010872*^9, 3.78875515676903*^9}},
CellLabel->"In[56]:=",ExpressionUUID->"ad0c0683-2671-494c-ae86-34cd97290166"],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"With", "[",
RowBox[{
RowBox[{"{",
RowBox[{"stream", "=",
RowBox[{"OpenWrite", "[",
RowBox[{"BinaryFormat", "\[Rule]", "True"}], "]"}]}], "}"}], ",",
"\[IndentingNewLine]",
RowBox[{
RowBox[{"PrintTemporary", "[", "\"\<Writing to disk\>\"", "]"}], ";",
"\[IndentingNewLine]",
RowBox[{"BinaryWrite", "[",
RowBox[{"stream", ",", "d"}], "]"}], ";", "\[IndentingNewLine]",
RowBox[{"PrintTemporary", "[", "\"\<Written.\>\"", "]"}], ";",
"\[IndentingNewLine]",
RowBox[{"Close", "[", "stream", "]"}]}]}], "]"}]], "Input",
CellChangeTimes->{
3.788443744924877*^9, {3.7887549272750597`*^9, 3.7887549274832077`*^9}, {
3.788755007853631*^9, 3.788755015790111*^9}, {3.788755538195241*^9,
3.788755538363368*^9}, {3.788755716726057*^9, 3.788755764202235*^9}, {
3.788755801862311*^9, 3.78875583977623*^9}, {3.788755924672439*^9,
3.7887559274946747`*^9}},ExpressionUUID->"de066680-4402-4342-baeb-\
32da122aa990"],
Cell[BoxData["$Aborted"], "Output",
CellChangeTimes->{3.7887558569340963`*^9},
CellLabel->"Out[73]=",ExpressionUUID->"69cfddca-9f83-423f-9581-d5dac1e4bbfe"]
}, Open ]],
Cell["\<\
Open this up and you get an image of Audacity\[CloseCurlyQuote]s Nyquist \
prompt with the command \[OpenCurlyDoubleQuote](mult *track* (hsosc 17500.0))\
\[CloseCurlyDoubleQuote] ready to run.\
\>", "Text",
CellChangeTimes->{{3.788755932718027*^9,
3.788755973087599*^9}},ExpressionUUID->"1bfa83f7-069c-49a2-a8f8-\
bac8b32b80f8"]
},
WindowSize->{808, 655},
WindowMargins->{{Automatic, 127}, {42, Automatic}},
FrontEndVersion->"12.0 for Mac OS X x86 (64-bit) (April 8, 2019)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)
(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[558, 20, 198, 3, 35, "Text",ExpressionUUID->"cc39b8c9-5f16-48be-bd34-d6c82fc6ffe0"],
Cell[759, 25, 1307, 35, 94, "Input",ExpressionUUID->"ec1ef9c0-9cb8-4653-bb0e-1489c586d5b5"],
Cell[2069, 62, 203, 3, 35, "Text",ExpressionUUID->"eb466430-8c2a-4295-b4af-31056f648c76"],
Cell[2275, 67, 815, 21, 94, "Input",ExpressionUUID->"edfe0e44-7b88-4c5b-95cd-a8b1c3204c01"],
Cell[3093, 90, 246, 6, 35, "Text",ExpressionUUID->"0c6dea3a-20ea-467f-ac76-7069e369c20c"],
Cell[3342, 98, 4098, 107, 360, "Input",ExpressionUUID->"7da46baf-5bdb-43bd-b024-05c98ea9193a"],
Cell[7443, 207, 338, 8, 30, "Input",ExpressionUUID->"5fa0b5d9-7f23-464a-9bc9-91c11a17d3ae"],
Cell[CellGroupData[{
Cell[7806, 219, 287, 5, 30, "Input",ExpressionUUID->"261940ac-42c1-4617-9125-1d6263ce6651"],
Cell[8096, 226, 947, 18, 60, "Output",ExpressionUUID->"6211ae28-04c5-4899-ae53-96f302d09f88"]
}, Open ]],
Cell[9058, 247, 631, 17, 30, "Input",ExpressionUUID->"ad0c0683-2671-494c-ae86-34cd97290166"],
Cell[CellGroupData[{
Cell[9714, 268, 1002, 22, 115, "Input",ExpressionUUID->"de066680-4402-4342-baeb-32da122aa990"],
Cell[10719, 292, 158, 2, 34, "Output",ExpressionUUID->"69cfddca-9f83-423f-9581-d5dac1e4bbfe"]
}, Open ]],
Cell[10892, 297, 342, 7, 58, "Text",ExpressionUUID->"1bfa83f7-069c-49a2-a8f8-bac8b32b80f8"]
}
]
*)

Binary file not shown.

View File

@@ -0,0 +1,406 @@
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 12.0' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 158, 7]
NotebookDataLength[ 23661, 398]
NotebookOptionsPosition[ 22328, 369]
NotebookOutlinePosition[ 22666, 384]
CellTagsIndexPosition[ 22623, 381]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell["Lots of data contained in the following un-Open cell.", "Text",
CellChangeTimes->{{3.822501195789774*^9,
3.822501206196813*^9}},ExpressionUUID->"e5aca7b5-45b8-4062-aff1-\
fa62224df1b4"],
Cell[BoxData[
RowBox[{
RowBox[{"s", "=",
RowBox[{"{",
RowBox[{
"\"\<I still remember the first time I ever visited the house. My friend \
Emmett - from the Jazz lounge where I played sometimes Friday nights - had \
lived there for years and invited me over for house dinner and to watch a \
movie with him. When I arrived, he gave me a tour through the maze of rooms \
and muralled hallways, even the treehouse out back with a drawbridge and a \
fire pole from the third floor to the first. Just about every room in the \
house (and there were a lot!) had a story attached to it, which made the tour \
both really interesting and really long. When we finally heard the shouts for \
dinnertime, I served myself the lentil curry, roasted brussels sprouts, and \
quinoa, and wandered toward the tables. \\\"Sit over here!\\\" a guy wearing \
an xkcd shirt called to me. I squeezed in beside him as he explained, \\\"we \
call this the inductive table. If it can fit n people, it can fit n+1.\\\" \
The conversation over the next half hour covered a Martian rover, raising \
chickens, and principal ideal domains...I kind of felt like I'd known these \
people my whole life. \\\"I wish I lived here,\\\" I said offhandedly as I \
gathered my empty plate to wash. \\\"You totally should!\\\" said xkcd-guy \
(whose name, it turned out, was Oliver). And I got to thinking. Much later, \
in the darkness of a starless night as I walked home, the idea of moving in \
seemed completely natural. I turned back to the house to see the rainbow \
\\\"you are welcome here\\\" sign (on which someone had scrawled \\\"straight \
people welcome on alternate Thursdays\\\") and the flower bed containing a \
pinwheel masquerading as a pansy. I was sold.\>\"", ",",
"\"\<The day I moved in, I was welcomed by a girl with lavender hair and \
a pocket protector who gave me the unofficial tour. She pointed at a whip on \
a hook by the door. \\\"That's in case of burglars and the like. Alice found \
it at Goodwill along with a pair of handcuffs and a leather thong after this \
sex dungeon went out of business.\\\" Next, she pointed at an alcove with a \
public computer. \\\"That's to look up directions or to check facts on \
Wikipedia if you get in an argument with someone and have to prove you're \
right.\\\" I was entranced by the fractal screensaver that kept drawing \
itself in exponentially multicolored smaller iterations until it was too \
small to detect, then zoom in and keep going. The girl followed my stare. \
\\\"Oh yeah, Ethan programmed the screensaver,\\\" she said, \\\"he could \
keep a genius occupied for hours with math questions.\\\" As she led me up \
the stairs, the wood floors creaked beneath our feet. \\\"It's an old house, \
but it's totally safe,\\\" she told me. She tilted her head to the side. \
\\\"I think,\\\" she added. \\\"And this is you!\\\" She dramatically opened \
the door to my new room, which was super-duper tiny, but there was this prism \
hung in the window and the late afternoon sun made shards of light dance \
around the room. I looked at the rainbow lights hopping across the wood floor \
and I was home. I moved the desk to the center of the room, directly below \
the skylight in the ceiling, so I would feel like a princess in a spotlight \
while doing psets, and plunked myself down on the chair. \\\"Seems like \
you're all good here,\\\" she said with a smile, and it was only as she \
turned to go that I noticed the tiny Rubik's cube earring in the loeb of her \
left ear. Definitely at home.\>\"", ",", "\[IndentingNewLine]",
"\"\<When Emmett and Savanah (also from the Jazz lounge) came to visit \
the next week, I took them on a tour of my own through the maze of staircases \
and rooms. \\\"This place is really cool,\\\" Savanah gushed, investigating \
our hallway murals. \\\"It has so much charact -\\\" she stopped short and \
stared open-mouthed at a guy dissecting an octopus and wearing exactly \
nothing. I tugged at her elbow and led her through our common room and \
towards our central staircase. \\\"That's Jacob,\\\" I explained. But I guess \
that wasn't much of an explanation because she still looked like she was in \
shock. \\\"He's course 7. He's doing his senior thesis on sea animals or \
something.\\\" Savanah looked at me like I was crazy. \\\"But he wasn't \
wearing anything!\\\" she exclaimed. \\\"Oh right. We're clothing-optional \
here.\\\" She stared at me. \\\"It's really great when you forget to bring \
your towel with you to the shower.\\\" Light from the skylight fell across \
her skeptical face. How was it that in just a week I'd come to feel like I'd \
lived here my whole life?\>\"", ",",
"\"\<Sleep deprivation being the drug of choice in my life at the time, \
it wasn't unusual for me to wake up disoriented with the imprint of my laptop \
keyboard on my cheek and late afternoon sunlight streaming in through the \
skylight above my desk. Such was my half-awake and dazed state the day I \
walked outside and saw the pirate ship in the backyard, like a beacon \
vertically aligned with the shed. I kind of blinked for a minute, because I \
swear the yard was empty that morning and now there was this sailboat in it, \
complete with a skull-and-crossbones flag. \\\"Ahoy matey!\\\" Oliver called \
to me as he took a running start, leapt into the boat, and struck a pose. \
\\\"Ahoy?\\\" I called back, a little confused by where this was going with \
no water. The compass he held in his hand glinted in the sun. \\\"What's a \
pirate's favorite mathematical field?\\\" he asked me. I stared at him. \
\\\"Arrrr!\\\" called Ethan as he hurdled himself from \
I'm-not-even-sure-where into the boat and gave Oliver a high five.\>\"", ",",
"\[IndentingNewLine]",
"\"\<By the end of the day, the boat, which Oliver had completely fixed \
up from an old crumbling dinghy, was ready for its big debut in open water. \
We got it loaded onto a makeshift cart-thingy and about a dozen of us walked \
it down to the river for moonlight sail. Ethan and Oliver eased it into the \
water and hopped on board, while the rest of us split into twos and threes \
and boarded other sailboats at the dock. Soon we were all out on the river, \
gliding peacefully through the crisp night air and gazing at Orion in the \
southeastern skies. That is, until Alice and Jacob slid in close to Ethan and \
Oliver and splashed them with a bucket of river water. Within minutes, all \
five of our boats were in a water war, each of us attempting to get close \
enough to another to throw water at one another and then sail quickly away. \
We were all relatively evenly matched and relatively evenly soaked until the \
pirate ship started pirating. Ryan and I watched it coming towards us and \
prepared our bucket for attack. But just as it got within feet of our boat, \
and before we could even lift the bucket, Ethan leapt off his vessel and \
landed beside me. He grabbed hold of the sail of our boat with each hand and \
leaned back with all his weight. Within moments I was in the river, coughing \
and spluttering and looking around for our capsized dinghy. It only took me a \
few seconds to locate it and swim towards it, and as I grabbed hold of the \
side and began trying to right it with Ryan's help, I saw a dripping wet \
Ethan grinning and waving at us beneath his black flag as he sailed away. My \
teeth were chattering when we all walked home together about an hour later, \
and I was desperately looking forward to the toastie warmth of home and a \
promised fire in the fireplace. The rainbow sign on the door could not have \
come soon enough. By the time I was dry and changed into fresh clothes, the \
fire was crackling and half a dozen people gathered around it singing. I \
joined in \\\"Maxwell's Silver Hammer\\\", warmed by the music of this cozy \
little group gathered in the darkness lit only by the twisting flames. \
\\\"Anyone want cookies?\\\" Amy asked as she came in from the kitchen with a \
heavenly smelling tray, and my evening was complete.\>\"", ",",
"\[IndentingNewLine]",
"\"\<Despite all the warm-fuzzies of the fireplace and singing and \
kumbaya and all that, Ethan was not off the hook. Oh no. I mean, it was all \
in good fun, and yeah it was a pretty badass move, but Ryan and I knew we had \
to plot a comeback. The idea came to me when Ryan sent out an email asking \
all the cooks to send him their menus, since he was in charge of the shopping \
(usually he tried to do his house job as early as possible in the week, but \
he'd been hosed.) See, I knew that while Ethan loved broccoli and cauliflower \
for their repetitive geometry, he hated tropical fruit. So I just suggested \
we replace at least one requested item from each day's menu with a tropical \
fruit as a little surprise. I figured the cooks would be totally down to \
experiment with how to incorporate an unexpected ingredient...and I happen to \
love papaya. By the time the last menu came in that evening, we only had \
about a half hour before the grocery store closed for the night and in the \
rush to go, I tripped over the flower bed outside the front door. By the time \
we had scooped the soil back in, we had twenty minutes left. We literally ran \
to the store, breathlessly grabbed a cart, and practically sailed through the \
maze of aisles, trying to find each one of the dozens of items listed, not \
always very helpfully (like seriously, somebody had written \\\"granola from \
a brand that's called nature something or maybe something nature and I think \
the package is red but it might be green\\\"). Anyway, by 10:59 our mission \
was accomplished: all weekly food had been bought plus two bags of fruit. The \
next day, Priya looked at the twenty mangoes we had bought her instead of her \
requested bell peppers, read the note we had enclosed with it, and laughed. \
We all enjoyed the mango pilaf that night...except Ethan. But the best part \
was the look on his face when he tried the dragon fruit pudding (and the rush \
he was in to rinse his mouth after he spit it out). Priceless.\>\"", ",",
"\[IndentingNewLine]",
"\"\<Ethan prepared his response that night. He crept out to the back \
yard in the darkness with a pineapple in tow. He had decorated it to look \
like a face with wild carrot-spirals for hair and a superman cape. He placed \
his artwork at the end of the bow with a sign that said, \\\"I may not be \
delicious but I am the captain of the pirate ship and I contain the Fibonacci \
sequence. Mwahahaha.\\\"\>\"", ",", "\[IndentingNewLine]",
"\"\<I noticed Captain Pineapple the following morning as I went out for \
a run. Several of my housemates were already outside doing pushups and \
sweating profusely. \\\"We're doing the Murph,\\\" Amanda gasped as she \
rested for a moment. \\\"It's a CrossFit workout...next exercise is 300 \
squats; want to join?\\\" she asked, with a can-do attitude. I watched Carlos \
collapse into the grass and roll onto his back. \\\"I'm good,\\\" I said and \
took off toward the Esplanade. The rush of blood felt good throughout my body \
after a long week of psets and the early morning world seemed exceptionally \
alive. I watched the T glide across the Longfellow bridge like a caterpillar \
on ice skates and thought about all the people inside going places, thinking \
thoughts, experiencing experiences...it just kind of suddenly felt like I was \
this simultaneously insignificant and all-consuming being, like everything I \
did and said was the entirety of my own life but it was all a speck of dust \
in the world at large. I gazed at the sparkling river in the morning sunlight \
that just days ago I had fallen into in the darkness of night, and I planned \
my next move. As soon as I got home, I went to the fridge and took out all \
the dragon fruit left over from the pudding. I cut it up and arranged the \
pieces on the seat of the boat, forming the word, \\\"truce?\\\"\>\"", ",",
"\[IndentingNewLine]",
"\"\<After that, the pirate ship moved to the shed. In the years to \
follow, it would go on many more journeys, but this is the tale we still tell \
first to curious visitors. I had a professor that semester that always used \
to say, \\\"this isn't fun-and-games topology; this is point-set \
topology!\\\" And I guess I could say the same thing about that house. I mean \
sure, it was fun, and sure there were games, but it wasn't just fun-and-games \
coop life, and over time I would discover layers of depth in this group of \
people that I hadn't noticed on first meeting. My housemates were the compass \
that got me through each day that year. And sure, it was kind of annoying to \
find that the Coke someone had left open on the side counter was still there \
and still open 10 days later. And then to discover a lightened ring in the \
wood of the countertop 14 days after that, and the Coke still there and still \
open. And then to discover 9 days after that that was an intentional \
experiment, not to see if it would grow mold (which it did!) but to see if \
someone would take the initiative to throw it away (which obviously no one \
did, but honestly we were just trying to be respectful of someone else's \
drink/experiment!). And yeah, it's kind of fun to take a break at 3am from my \
automorphic forms project and hear someone tell the story of the superman \
Fibonacci fruit (and have someone else argue that it wasn't superman \
Fibonacci fruit, it was electric bluegaloo Fibonacci fruit). But it wasn't \
just about the games and it wasn't just about the pranks. It was about living \
a life worth living with people worth living it with. And peace and love and \
all that hippie stuff. So yeah, that's my story. The end.\>\""}],
"\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
CellOpen->False,
CellChangeTimes->{{3.788327478627075*^9, 3.788327482238841*^9}, {
3.7883275163281107`*^9, 3.7883275574939413`*^9}, {3.788327634016327*^9,
3.788327707163948*^9}, {3.788327824264697*^9, 3.7883278255098248`*^9}, {
3.788327861859837*^9, 3.7883279849607973`*^9}},
CellLabel->"In[20]:=",ExpressionUUID->"3261cd16-9da6-4984-af70-d8fbf8373601"],
Cell["\<\
And lots more data, this time from the page\[CloseCurlyQuote]s source (not \
displaying directly).\
\>", "Text",
CellChangeTimes->{{3.822501261987989*^9,
3.822501272826807*^9}},ExpressionUUID->"09eaa486-1096-409f-b05d-\
8ff56391e9ce"],
Cell[BoxData[
RowBox[{
RowBox[{"numbers", "=",
RowBox[{"StringSplit", "[",
RowBox[{
"\"\<434203285909121529492351699858568010896672212032596087103693584899938\
295500191928673654685515776394732832181233227434959359103349439893793967925716\
934406421392675753141302149004139344716517264183499759568038134785354737130419\
511915695267199479049762451832960098254760553513192825744015396159623242415539\
225652248987563299811422414680145585296244710302552272451005909231803120668062\
547788053609211532374263873371348159607936796288761582173864681307817908560355\
07731879635110068223\n\
704535069691257218994199738784815385507620130913341483504800862075077397984633\
512199311861547399075452552540044872374386224842117367119335920414129579710019\
230868175034698462310251945883473666910683479614413002176371228729111431124903\
575580292159282138998947145645297640250545623114100366140505648332587882715501\
706137522350807042505468936154494182604667651316452523280600373441344107965279\
550245166552423402684340792413713321003100077890033118203117949959453745909511\
4566091455917381089681258491114205527146495\n\
224711641857789488466163148848628091702247121108236006986872825712407947922001\
657252627808586960822862747085345073459590168125115214086843129445621939389391\
671156430957114064478348987741095096500383385272309618317511227138038881849120\
70821710725847605732265929103232617232844274471668730648435417823097913343\n\
653996952628334664419640714071875639352485221183517515587744354856330060478799\
634069398698119958847928429592522990501410049241974911342249144246034971846889\
406908732956816156859213118172099431843734179520708620289122650452140893058646\
224773974209259988029118218997919686519982874024286209125122047\n\
386919278893906063546095664402592745674787840900954156815958114353612673231061\
537537301647806649399210168119192041736033368959126760933959863683765134104951\
760657961815480191467344248167923533181337021248748276779565529553549439505511\
113892769107170396121844318246349071555731218624316188040896809028924375733859\
455928748220846745818999406153569350260984253301615112924705158144649655557204\
767962014173434567539380685615837032340420577039574772600254570218382357133353\
512271519464046444662209362158128240713451190212330884844920443259374342721961\
811670540279763335425232022378349384515580181612520176294354218209748811526163\
645387742558857287699911127042682774146244607\n\
326318370092125895846730032069922877287056450412456659759453015973580955579461\
079729024927063635627015330293736239618827750133258754367742695121124965631607\
676130282548943608244498321644981179494092511356080393660155599981617808524150\
797496393912633219162602648573986320963438371318937845049381481227040149733773\
629590317128229717406564474686914919716046763702617063723402781250789991873211\
569463366018902598270192153849476362036333274444171707510223862866272545350744\
531213577084025678004786675310111930574104289541368003044838617286198107119125\
0611901477000128712730564878749658534379519\n\
157608024785577916849049410805701926780244112653543988167408370078529746549157\
016349242039351847916049076529234182143\n\
457745697060271970690364893308572017003250952766821778295312230851275919557715\
086191117031964761119386609415351851836954116639068765506916451816756865411859\
242167560535110836705999835855685476727480660081631160557450034037354181928161\
041826121681701760472573993569517162754624482353646955367287643142770143156592\
048905024667165581374728486286921306633645505263263151228818758816217777110983\
46078207\n\
220167222401506572266383890825000394729582449398655433009737834636077712715218\
534125730042826022576704199467346121228872898255202520455295985060846700450860\
341466337869102080849492156034738613995337893537637371005470210654068070655789\
551749435003558768479728456164008210918168553985601029835141668172450321329149\
425134691570444585227686732385019522871509867189546137931553812777341387519499\
998541197917052098325428146723379786052077153957923851028314168539035975442565\
859867553894174416504787828421836027199486\>\"", ",", "\"\<\\n\>\""}],
"]"}]}], ";"}]], "Input",
CellOpen->False,
CellChangeTimes->{{3.788327198086376*^9, 3.788327207845333*^9}, {
3.788328735484106*^9, 3.788328751677046*^9}, 3.822501311272709*^9},
CellLabel->"In[23]:=",ExpressionUUID->"baa54d0d-c4e6-41fa-8c62-fb2632ef6fb1"],
Cell["\<\
The numbers have useful binary expansions: there are exactly as many bits in \
each number as there are characters in the corresponding paragraph.\
\>", "Text",
CellChangeTimes->{{3.822501321325976*^9, 3.82250134539002*^9}, {
3.822501389339737*^9,
3.822501401355956*^9}},ExpressionUUID->"dc34c127-3664-4bb9-b692-\
84724d23fd7f"],
Cell[BoxData[
RowBox[{
RowBox[{"numbers", "=",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"IntegerDigits", "[",
RowBox[{"#", ",", "2"}], "]"}], "&"}], "@*", "FromDigits"}], "/@",
"numbers"}]}], ";"}]], "Input",
CellChangeTimes->{{3.822501326781706*^9, 3.822501329844915*^9}},
CellLabel->"In[25]:=",ExpressionUUID->"b6d1f33e-2123-43a5-8b6a-5921f74febcf"],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{"StringLength", "/@", "s"}], "==",
RowBox[{"Length", "/@", "numbers"}]}]], "Input",
CellChangeTimes->{{3.788327558212542*^9, 3.788327560323099*^9}, {
3.78832783194746*^9, 3.788327833041628*^9}, {3.788328770179057*^9,
3.788328770437743*^9}},
CellLabel->
"In[208]:=",ExpressionUUID->"5bde14ce-d407-41aa-929d-cf1501174d5d"],
Cell[BoxData["True"], "Output",
CellChangeTimes->{
3.7883275604538937`*^9, 3.788327709202705*^9, 3.788327833450037*^9,
3.7883279169298687`*^9, {3.788327962029283*^9, 3.788327987237184*^9}, {
3.788328765500535*^9, 3.788328770760858*^9}},
CellLabel->
"Out[208]=",ExpressionUUID->"1c7dccf7-33cf-4d2f-8596-a685193a7a42"]
}, Open ]],
Cell["\<\
There turn out to be very few 0 bits in those numbers, and they indicate \
letters.\
\>", "Text",
CellChangeTimes->{{3.82250145610256*^9,
3.822501469622552*^9}},ExpressionUUID->"031e64a2-e956-4b37-98d0-\
7f3450286bff"],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"StringJoin", "[",
RowBox[{"Flatten", "[",
RowBox[{
RowBox[{
RowBox[{"Pick", "[",
RowBox[{
RowBox[{"Characters", "@",
RowBox[{"#", "[",
RowBox[{"[", "1", "]"}], "]"}]}], ",",
RowBox[{"#", "[",
RowBox[{"[", "2", "]"}], "]"}], ",", "0"}], "]"}], "&"}], "/@",
RowBox[{"Transpose", "@",
RowBox[{"{",
RowBox[{"s", ",", "numbers"}], "}"}]}]}], "]"}], "]"}]], "Input",
CellChangeTimes->{{3.82250140707827*^9, 3.822501449606085*^9}},
CellLabel->"In[29]:=",ExpressionUUID->"44ebcf57-e6aa-4452-9063-be1ec8cfe4c6"],
Cell[BoxData["\<\"Which sMall mammal's name sounds like a typesetting \
measurement? Once you know, find the rooms and trace them.\"\>"], "Output",
CellChangeTimes->{{3.8225014408234987`*^9, 3.822501450002359*^9}},
CellLabel->"Out[29]=",ExpressionUUID->"a2997ab2-9183-4328-8f2d-3614ef5a659b"]
}, Open ]]
},
WindowSize->{1295, 705},
WindowMargins->{{Automatic, 41}, {Automatic, 27}},
FrontEndVersion->"12.0 for Mac OS X x86 (64-bit) (April 8, 2019)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)
(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[558, 20, 195, 3, 35, "Text",ExpressionUUID->"e5aca7b5-45b8-4062-aff1-fa62224df1b4"],
Cell[756, 25, 14267, 193, 19, "Input",ExpressionUUID->"3261cd16-9da6-4984-af70-d8fbf8373601",
CellOpen->False],
Cell[15026, 220, 248, 6, 35, "Text",ExpressionUUID->"09eaa486-1096-409f-b05d-8ff56391e9ce"],
Cell[15277, 228, 4399, 63, 19, "Input",ExpressionUUID->"baa54d0d-c4e6-41fa-8c62-fb2632ef6fb1",
CellOpen->False],
Cell[19679, 293, 344, 7, 35, "Text",ExpressionUUID->"dc34c127-3664-4bb9-b692-84724d23fd7f"],
Cell[20026, 302, 382, 10, 30, "Input",ExpressionUUID->"b6d1f33e-2123-43a5-8b6a-5921f74febcf"],
Cell[CellGroupData[{
Cell[20433, 316, 366, 8, 30, "Input",ExpressionUUID->"5bde14ce-d407-41aa-929d-cf1501174d5d"],
Cell[20802, 326, 329, 6, 34, "Output",ExpressionUUID->"1c7dccf7-33cf-4d2f-8596-a685193a7a42"]
}, Open ]],
Cell[21146, 335, 232, 6, 35, "Text",ExpressionUUID->"031e64a2-e956-4b37-98d0-7f3450286bff"],
Cell[CellGroupData[{
Cell[21403, 345, 612, 16, 30, "Input",ExpressionUUID->"44ebcf57-e6aa-4452-9063-be1ec8cfe4c6"],
Cell[22018, 363, 294, 3, 34, "Output",ExpressionUUID->"a2997ab2-9183-4328-8f2d-3614ef5a659b"]
}, Open ]]
}
]
*)

Binary file not shown.

View File

@@ -0,0 +1,98 @@
(* ::Package:: *)
BeginPackage["Z3Interop`"]
Assertion::usage="Assertion[condition] is a symbolic representation of the assertion that the given condition holds.";
Declare::usage="Declare[var_Symbol, Integer] is a symbolic representation of the integer variable named var.";
CheckSat::usage="CheckSat is a symbolic representation of the command to check satisfiability at the current point in the model specification.";
GetModel::usage="GetModel is a symbolic representation of the command to print out a satisfying model.";
getDefinitions::usage="getDefinitions extracts the integer variables from a Z3 output and converts them into Wolfram Language expressions."
toString::usage="toString[symbols_, expr] converts a line of Z3 program (given as a specification either as a Wolfram Language expression or in terms of Z3Interop primitives) into a string.";
Begin["`Private`"]
toString[symbols_, Equal[i_,j_]]:=StringJoin["(= ",toString[symbols, i]," ",toString[symbols,j],")"]
toString[symbols_, Greater[i_,j_]]:=StringJoin["(> ",toString[symbols,i]," ",toString[symbols,j],")"]
toString[symbols_, Less[i_,j_]]:=StringJoin["(< ",toString[symbols,i]," ",toString[symbols,j],")"]
toString[symbols_, GreaterEqual[i_,j_]]:=StringJoin["(>= ",toString[symbols,i]," ",toString[symbols,j],")"]
toString[symbols_, LessEqual[i_,j_]]:=StringJoin["(<= ",toString[symbols,i]," ",toString[symbols,j],")"]
toString[symbols_, Or[a_,b_]]:=StringJoin["(or ",toString[symbols,a]," ",toString[symbols,b],")"]
toString[symbols_, Xor[a_,b_]]:=StringJoin["(xor ",toString[symbols,a]," ",toString[symbols,b],")"]
toString[symbols_, And[a_,b_]]:=StringJoin["(and ",toString[symbols,a]," ",toString[symbols,b],")"]
toString[symbols_, Not[a_]]:=StringJoin["(not ", toString[symbols,a], ")"]
toString[symbols_, Unequal[a_, b_]]:=StringJoin["(not ",toString[symbols,a==b],")"]
toString[symbols_, i_Integer]:=ToString[i]
toString[symbols_, a_+b_]:=StringJoin["(+ ",toString[a]," ",toString[b],")"]
toString[symbols_, Integer]="Int";
toString[symbols_, Declare[var_,type_]]:=StringJoin["(declare-fun ",toString[symbols,var]," () ",toString[symbols,type],")"]
toString[symbols_, Assertion[expr_]]:=StringJoin["(assert ",toString[symbols,expr],")"]
toString[symbols_, CheckSat]:="(check-sat)"
toString[symbols_, GetModel]:="(get-model)"
toString[symbols_, h_[tail___]] /; MemberQ[First/@symbols,h]:=StringJoin[h/.symbols, "_", Riffle[toString[symbols, #]&/@{tail},"_"]]
r=RegularExpression["\\(define-fun (.+?) \\(\\) Int\\s+([0-9]*)\\)"];
getDefinitions[symbols_, output_]:=(First[#][Sequence@@(FromDigits[#,10]&/@Most[Rest[#]])]->FromDigits@Last[#])&/@(MapAt[#/.(Reverse/@symbols)&,StringSplit[#,"_"],1]&/@StringCases[StringReplace[output,"\n"->""],r->"$1_$2"]);
End[]
Protect[Assertion];
Protect[Declare];
Protect[CheckSat];
Protect[GetModel];
Begin["`Nonogram`"]
gapsToConstraints::usage="gapsToConstraints[column_List, columnIndex_Integer, totalNumberOfRows_Integer, variableHead_Symbol] converts the data from the given column (which is column number `columnIndex`) into a set of constraints on that column (without reference to any rows). The same is true interchanging the notion of 'row' and 'column'.";
constrainedCells::usage="constrainedCells[rowGap_Symbol, colGap_Symbol, cellVariable_Symbol, rows_, cols_, constraintsFromRows_, constraintsFromCols_,colourMapping_] uses the data from `gapsToConstraints` applied to the rows and columns, and produces the additional constraint which tie the rows and columns together. The output omits the original input constraints. `rows` and `cols` should be the actual data of the shape {{{index, colour}, {index, colour}}}.";
Begin["`Private`"]
Z3Interop`Nonogram`gapsToConstraints[column_,colNum_Integer,totalRows_Integer,variable_Symbol]:=
With[{lhs=MapIndexed[variable[colNum,First@#2]+First@#1&,column]},
With[{rhs=Append[variable[colNum,#+1]&/@Most@Range[Length@lhs],totalRows+1]},
With[{operations=Append[If[#[[1]]===#[[2]],Less,LessEqual]&/@Partition[Last/@column,2,1],LessEqual]},
With[{middle=#[[1]][#[[2]],#[[3]]]&/@Transpose[{operations,lhs,rhs}]},
Join[{1<=variable[colNum,1]},middle]]]]]
Z3Interop`Nonogram`constrainedCells[rowGap_Symbol, colGap_Symbol, cell_Symbol, rowsIn_, colsIn_, constrainedRows_, constrainedColumns_,mapping_] :=
Join[
(* Constraints on the rows *)
Flatten[Table[
Xor@@Prepend[
(rowGap[row,#]<=col&&col<rowGap[row,#]+rowsIn[[row,#,1]] && cell[row,col]==rowsIn[[row,#,2]])&/@Range[Length@constrainedRows[[row]]-1],
And@@Prepend[rowGap[row,#]>col||col>=rowGap[row,#]+rowsIn[[row,#,1]] &/@Range[Length@constrainedRows[[row]]-1],cell[row,col]==White]
],
{row,1,Length@rowsIn},{col,1,Length@colsIn}],1],
(* Constraints on the columns *)
Flatten[Table[
Xor@@Prepend[
(colGap[col,#]<=row&&row<colGap[col,#]+colsIn[[col,#,1]] && cell[row,col]==colsIn[[col,#,2]])&/@Range[Length@constrainedColumns[[col]]-1],
And@@Prepend[colGap[col,#]>row||row>=colGap[col,#]+colsIn[[col,#,1]] &/@Range[Length@constrainedColumns[[col]]-1],cell[row,col]==White]
],
{row,1,Length@rowsIn},{col,1,Length@colsIn}],1]
]/.mapping;
End[]
Protect[gapsToConstraints];
Protect[constrainedCells];
End[]
EndPackage[]

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,5 @@
<!DOCTYPE html>
<html>
<head><title>Project Euler work</title></head>
<body>This folder contains some of my work on <a href="https://projecteuler.net">Project Euler</a>. Append "problem.pdf" to the directory, so Problem 1 can be accessed at www.patrickstevens.co.uk/ProjectEuler/1.pdf .</body>
</html>

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,781 @@
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 9.0' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 157, 7]
NotebookDataLength[ 37242, 772]
NotebookOptionsPosition[ 35775, 717]
NotebookOutlinePosition[ 36130, 733]
CellTagsIndexPosition[ 36087, 730]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell["\<\
We were given only the following image:\
\>", "Text",
CellChangeTimes->{{3.581938999950985*^9, 3.581939024218194*^9}}],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"origImg", "=",
RowBox[{
RowBox[{"ImageCrop", "[",
GraphicsBox[
TagBox[RasterBox[CompressedData["
1:eJztklFqpVUQhIP64DZcii5hXMEM6KswCjKbdSs6ik/3BnLy/VXVndz6ICGB
09VV1f8Pn3778Os3T09Pv3//9deHj3/++Pnzxy8/f/f1n5++/PHLp2+//vHX
/z///v13KaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRy
gadS/mP6S7xluo+yhekv8ZbpPsoWpr/EW6b7KFuY/hJvme6jbGH6S7xluo+y
hekv8RZfClV2lcNkUuZHpcw8Mx0fJ9lZCl+HzGEyKfOjUmaemY6Pk+wsha9D
5jCZlPlRKTPPTMfHSXaWwtchc5hMyvyolJlnpuPjJDtL4euQOUwmZX5Uyswz
0/Fxkp2l8HXIHCaTMj8qZeaZ6fhQdZjcVc+v9XwC2+VjtrHZN4/j+QS2y8ds
Y7NvHsfzCWyXj9nGZt88jucT2C4fs43NvnkczyewXT5mG5t98zieT2C7fDCH
vp5911HpnMB2qRz6ppL4cs025tM5ge1SOfRNJfHlmm3Mp3MC26Vy6JtK4ss1
25hP5wS2S+XQN5XEl2u2MZ/OCWyXyqFvKokv12xjPp0T2C6VQ99UksfpWfWG
+UluZw59uxisw6Qf1VTy22CtJptP7mKwDpN+VFPJb4O1mmw+uYvBOkz6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lUnlVvVFNJfI35/DDPSVSeVW9UU0l8jfn8MM9JVJ5Vb1RTSXy5fLdQ7fLp
+FD52ZbrHtUFT96wKeZnVseHys+2XPeoLnjyhk0xP7M6PlR+tuW6R3XBkzds
ivmZ1fGh8rMt1z2qC568YVPMz6yOD5WfbbnuUV3w5A2bYn5mdXyo/GzLdU/S
4cku1Rfl87w/hc9hkqTD/Tc9Ud6fwucwSdLh/pueKO9P4XOYJOlw/01PlPen
8DlMknS4/6YnyvtT+BwmSTrcf9MT5f0pfA6TJJv3+ZnVUSkn3zDPSZhnXy5V
h0kdlXLyDfOchHn25VJ1mNRRKSffMM9JmGdfLlWHSR2VcvIN85yEefblUnWY
1FEpJ98wz0mYZ18uVYdJHZVy8g3znESVPTnl69l3L5XnE50TZV9SFb4Uvil2
C59npqzqhyn7kqrwpfBNsVv4PDNlVT9M2ZdUhS+Fb4rdwueZKav6Ycq+pCp8
KXxT7BY+z0xZ1Q9T9iVV4Uvhm2K38Hlmyqp+mLIvqQpfCtaYartKeVuKbTo+
2HWY8uxNmfK2FNt0fLDrMOXZmzLlbSm26fhg12HKszdlyttSbNPxwa7DlGdv
ypS3pdim44NdhynP3pQpb0uxTcfHSfPlEZj+Em+Z7qNsYfpLvGW6j7KF6S/x
luk+yhamv8RbpvsoW5j+Em+Z7qNsYfpLLKWUUkoppZRSSimllFJKKaWUUkop
pZRSSimllFJKKaWUUkoppZTytvkHUPdFpg==
"], {{0, 222}, {222, 0}}, {0, 255},
ColorFunction->RGBColor],
BoxForm`ImageTag["Byte", ColorSpace -> "RGB", Interleaving -> True],
Selectable->False],
BaseStyle->"ImageGraphics",
ImageSize->Automatic,
ImageSizeRaw->{222, 222},
PlotRange->{{0, 222}, {0, 222}}], "]"}], "//", "Binarize"}]}]], "Input",
CellChangeTimes->{{3.580225267189543*^9, 3.580225279812866*^9}}],
Cell[BoxData[
GraphicsBox[
TagBox[RasterBox[CompressedData["
1:eJzt0FFKA0EQhOFVfPAaHkWPEE+QgL4KiSC5lGc0og+BpouamZ1ehb9B2cz2
VH+9D4e33evtsiyn+8u/3f7j8Xjcn5/vLj+ezu8vh+9Xn79/FEVRum6uKp5c
n8dbTlrsz97qiWjRop2ndWz+87p39ZdBixbtPK2T46j0xNjjpKFFi7ZSO56j
n7O5uhMtWrR/TZsl61lOmp8Zb6FFi3a2Npvl5ESVs7XeLjtBixZtpXZkerbj
+KZo0aLdSpvNGp+ik3WhRYu2XpsZtNPZPev3d0SLFm291r+b3cr28v36GS1a
tJVap9PZyNklu9WXjxYt2hlaPznr8T3O3ewELVq09Vpdfds5E7ONllBo0aKd
rc3eZpl9u/uZjhktWrTztE6aM9dPbp2OFi3aSq2+62tjDlq0aP+jNvb0mWO/
zl83DS1atOtq+/Jj6R49S3eiRYt2W23rW72Xc5LloEWLtlLrpGlDtpf/rUYy
0aJFu67WVzm7ZP1a4vSjRYu2RqvvZjn+vjqh1Y8WLdrZ2nie9bTm9O2id0SL
Fm2lVifo7ZwpfoL+bmjRop2n1Wl6un+unfoZLVq0ldrM6eRn241vrWehRYt2
K62zRetGrTuiRYu2UktRFPVTX+hqR/w=
"], {{0, 174}, {174, 0}}, {0, 1},
ColorFunction->GrayLevel],
BoxForm`ImageTag["Bit", ColorSpace -> Automatic, Interleaving -> None],
Selectable->False],
BaseStyle->"ImageGraphics",
ImageSizeRaw->{174, 174},
PlotRange->{{0, 174}, {0, 174}}]], "Output",
CellChangeTimes->{3.580225281488415*^9, 3.580284228626562*^9,
3.5819388485687923`*^9}]
}, Open ]],
Cell["Pixelate:", "Text",
CellChangeTimes->{{3.581939028491666*^9, 3.581939036817438*^9}}],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"bitImg", "=",
RowBox[{"Image", "[",
RowBox[{
RowBox[{
RowBox[{"ImageData", "[", "origImg", "]"}], "\[LeftDoubleBracket]",
RowBox[{
RowBox[{"2", ";;",
RowBox[{"-", "2"}], ";;", "6"}], ",",
RowBox[{"2", ";;",
RowBox[{"-", "2"}], ";;", "6"}]}], "\[RightDoubleBracket]"}], ",",
"\"\<Bit\>\""}], "]"}]}]], "Input",
CellChangeTimes->{{3.580225285917824*^9, 3.580225306649431*^9}}],
Cell[BoxData[
GraphicsBox[
TagBox[RasterBox[CompressedData["
1:eJyFUkEOwjAMSxAHPsGBp7AnjBdsElyRxiS039PS2E53gAKjaRrHdnaZn+Pj
YGavU3mM0/u6LNN2O5Zg2Nb7XFPn+P1b7uXrddOC8l8fsavZ9ul2UYfiAPgu
2+1Z4u3QCK56RIBFUbsYOILQZZ54427pwCUxejrQgzPY8r7oQqzJD/fklnoK
2CVJsM4ctQCWPpBQks86gMp56xr2SU90yJsB4xh1aLY8ARkgyhBK9uIq+1QG
gpgRO9JF5KnWdo6lqfQ2YLI8xOTTyHr96WLXLQ+d7+GP9QF6Xgma
"], {{0, 29}, {29,
0}}, {0, 1},
ColorFunction->GrayLevel],
BoxForm`ImageTag["Bit", ColorSpace -> Automatic, Interleaving -> None],
Selectable->False],
BaseStyle->"ImageGraphics",
ImageSize->{152.02734375, Automatic},
ImageSizeRaw->{29, 29},
PlotRange->{{0, 29}, {0, 29}}]], "Output",
CellChangeTimes->{3.5802253087001257`*^9, 3.580284229837761*^9,
3.5819388514387693`*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"bitImgNoBorder", "=",
RowBox[{"ImageTake", "[",
RowBox[{"bitImg", ",",
RowBox[{"{",
RowBox[{"2", ",",
RowBox[{"-", "2"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"2", ",",
RowBox[{"-", "2"}]}], "}"}]}], "]"}]}]], "Input",
CellChangeTimes->{{3.580225314583444*^9, 3.5802253263821363`*^9}}],
Cell[BoxData[
GraphicsBox[
TagBox[RasterBox[CompressedData["
1:eJxdUVsOwjAMsxEf3IEvjgJHGCcYEvwiDSS029PRxHHZo03axHGc0+05PXYA
Xoe2TPPnvCzzet0357K+77ft6hg/QLaPm9Gdtm8L4zzewUL34rgnMzLcUjgo
PIRfRRMrLUYJr0ARs6COUO7vuj9iPDRTWxwLLJqr3mnKsFKNeljGRXQhvQIu
xS1EC2bBpWAYCvkVjYS4ElU2RUlx1ZQLDKep6SRJzddHKiQ6DkodR1c7o3qq
MzQt+VkpqOn8dWth1UWVlUpfnYIJlg==
"], {{0, 27}, {27, 0}}, {0, 1},
ColorFunction->GrayLevel],
BoxForm`ImageTag["Bit", ColorSpace -> Automatic, Interleaving -> None],
Selectable->False],
BaseStyle->"ImageGraphics",
ImageSize->{251.35546875, Automatic},
ImageSizeRaw->{27, 27},
PlotRange->{{0, 27}, {0, 27}}]], "Output",
CellChangeTimes->{3.580225327015736*^9, 3.580284231121207*^9,
3.581938852055385*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"dat", "=",
RowBox[{"ImageData", "[", "bitImgNoBorder", "]"}]}]], "Input",
CellChangeTimes->{{3.580225347629425*^9, 3.580225351607979*^9}, {
3.5802253908611526`*^9, 3.5802253916927347`*^9}}],
Cell[BoxData[
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{
"0", ",", "0", ",", "1", ",", "1", ",", "0", ",", "1", ",", "1", ",", "1",
",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0",
",", "1", ",", "1", ",", "0", ",", "0", ",", "1", ",", "0", ",", "1",
",", "0", ",", "0", ",", "1", ",", "1", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"1", ",", "0", ",", "1", ",", "1", ",", "1", ",", "0", ",", "1", ",", "0",
",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "1", ",", "1",
",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0",
",", "1", ",", "1", ",", "1", ",", "0", ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"1", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "1", ",", "0",
",", "1", ",", "1", ",", "1", ",", "0", ",", "1", ",", "1", ",", "1",
",", "0", ",", "0", ",", "0", ",", "1", ",", "1", ",", "1", ",", "1",
",", "1", ",", "1", ",", "0", ",", "1", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"0", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "0",
",", "1", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0",
",", "1", ",", "1", ",", "1", ",", "0", ",", "0", ",", "1", ",", "0",
",", "1", ",", "1", ",", "1", ",", "1", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"0", ",", "1", ",", "1", ",", "1", ",", "0", ",", "0", ",", "1", ",", "0",
",", "0", ",", "1", ",", "0", ",", "1", ",", "1", ",", "0", ",", "1",
",", "1", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0",
",", "0", ",", "1", ",", "0", ",", "1", ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"1", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0", ",", "1", ",", "0",
",", "1", ",", "0", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1",
",", "1", ",", "0", ",", "0", ",", "1", ",", "1", ",", "1", ",", "0",
",", "1", ",", "1", ",", "0", ",", "1", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"1", ",", "0", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1",
",", "0", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0",
",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "1",
",", "1", ",", "1", ",", "1", ",", "1", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"1", ",", "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0",
",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1",
",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0",
",", "0", ",", "0", ",", "0", ",", "0", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"0", ",", "1", ",", "1", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1",
",", "1", ",", "0", ",", "1", ",", "0", ",", "0", ",", "1", ",", "1",
",", "1", ",", "1", ",", "0", ",", "1", ",", "1", ",", "1", ",", "1",
",", "1", ",", "1", ",", "0", ",", "1", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "0", ",", "1", ",", "0",
",", "0", ",", "1", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1",
",", "0", ",", "1", ",", "1", ",", "1", ",", "1", ",", "0", ",", "1",
",", "0", ",", "1", ",", "0", ",", "1", ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0", ",", "1", ",", "1",
",", "1", ",", "1", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1",
",", "1", ",", "0", ",", "1", ",", "1", ",", "1", ",", "0", ",", "0",
",", "1", ",", "1", ",", "1", ",", "1", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"1", ",", "1", ",", "0", ",", "1", ",", "1", ",", "1", ",", "0", ",", "1",
",", "0", ",", "1", ",", "1", ",", "0", ",", "1", ",", "1", ",", "1",
",", "0", ",", "0", ",", "1", ",", "0", ",", "1", ",", "1", ",", "0",
",", "1", ",", "1", ",", "0", ",", "1", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "0",
",", "1", ",", "1", ",", "0", ",", "1", ",", "1", ",", "1", ",", "0",
",", "1", ",", "1", ",", "0", ",", "0", ",", "1", ",", "1", ",", "1",
",", "0", ",", "1", ",", "0", ",", "1", ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"0", ",", "1", ",", "0", ",", "0", ",", "1", ",", "1", ",", "1", ",", "0",
",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1", ",", "1",
",", "1", ",", "1", ",", "0", ",", "1", ",", "1", ",", "1", ",", "0",
",", "0", ",", "1", ",", "1", ",", "0", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"1", ",", "0", ",", "1", ",", "1", ",", "1", ",", "0", ",", "1", ",", "1",
",", "0", ",", "1", ",", "1", ",", "1", ",", "1", ",", "0", ",", "0",
",", "1", ",", "0", ",", "1", ",", "1", ",", "0", ",", "0", ",", "1",
",", "0", ",", "1", ",", "1", ",", "1", ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"0", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "1",
",", "0", ",", "1", ",", "1", ",", "1", ",", "0", ",", "0", ",", "1",
",", "1", ",", "0", ",", "1", ",", "1", ",", "0", ",", "0", ",", "1",
",", "0", ",", "1", ",", "1", ",", "1", ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"1", ",", "1", ",", "1", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1",
",", "1", ",", "0", ",", "1", ",", "1", ",", "0", ",", "1", ",", "0",
",", "0", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1",
",", "0", ",", "1", ",", "1", ",", "0", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"1", ",", "0", ",", "0", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1",
",", "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "1", ",", "1",
",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "1",
",", "1", ",", "0", ",", "0", ",", "1", ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"1", ",", "0", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0",
",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "1", ",", "1",
",", "1", ",", "0", ",", "1", ",", "1", ",", "0", ",", "1", ",", "1",
",", "0", ",", "0", ",", "1", ",", "1", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"0", ",", "1", ",", "1", ",", "0", ",", "1", ",", "1", ",", "1", ",", "1",
",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0",
",", "0", ",", "1", ",", "1", ",", "1", ",", "0", ",", "0", ",", "1",
",", "1", ",", "0", ",", "1", ",", "0", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "0", ",", "1", ",", "1",
",", "0", ",", "1", ",", "1", ",", "1", ",", "1", ",", "0", ",", "1",
",", "1", ",", "0", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0",
",", "1", ",", "1", ",", "0", ",", "0", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"0", ",", "1", ",", "0", ",", "1", ",", "1", ",", "1", ",", "1", ",", "0",
",", "0", ",", "0", ",", "0", ",", "1", ",", "1", ",", "1", ",", "1",
",", "1", ",", "1", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1",
",", "0", ",", "1", ",", "0", ",", "1", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"1", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0", ",", "1", ",", "0",
",", "1", ",", "1", ",", "0", ",", "0", ",", "1", ",", "1", ",", "0",
",", "0", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1",
",", "1", ",", "0", ",", "1", ",", "1", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "0", ",", "1", ",", "0",
",", "1", ",", "1", ",", "0", ",", "1", ",", "1", ",", "1", ",", "1",
",", "0", ",", "0", ",", "1", ",", "0", ",", "1", ",", "1", ",", "0",
",", "1", ",", "1", ",", "1", ",", "0", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"0", ",", "1", ",", "0", ",", "1", ",", "1", ",", "1", ",", "1", ",", "0",
",", "0", ",", "1", ",", "1", ",", "0", ",", "0", ",", "1", ",", "1",
",", "0", ",", "0", ",", "0", ",", "1", ",", "1", ",", "0", ",", "1",
",", "0", ",", "1", ",", "0", ",", "1", ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"1", ",", "0", ",", "1", ",", "1", ",", "0", ",", "1", ",", "1", ",", "0",
",", "1", ",", "0", ",", "0", ",", "1", ",", "1", ",", "1", ",", "0",
",", "1", ",", "1", ",", "1", ",", "1", ",", "0", ",", "0", ",", "1",
",", "1", ",", "0", ",", "0", ",", "0", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
"1", ",", "0", ",", "1", ",", "1", ",", "0", ",", "0", ",", "1", ",", "1",
",", "0", ",", "1", ",", "1", ",", "1", ",", "1", ",", "0", ",", "1",
",", "0", ",", "0", ",", "1", ",", "1", ",", "0", ",", "1", ",", "1",
",", "1", ",", "0", ",", "1", ",", "1", ",", "1"}], "}"}]}],
"}"}]], "Output",
CellChangeTimes->{3.580225352176868*^9, 3.580225392000617*^9,
3.58193885439426*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"Dimensions", "[", "%", "]"}]], "Input",
CellChangeTimes->{{3.5802253558455563`*^9, 3.580225357663239*^9}}],
Cell[BoxData[
RowBox[{"{",
RowBox[{"27", ",", "27"}], "}"}]], "Output",
CellChangeTimes->{3.580225358100492*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"FromCharacterCode", "@",
RowBox[{"Map", "[",
RowBox[{
RowBox[{
RowBox[{
RowBox[{
RowBox[{"FromDigits", "[",
RowBox[{"#", ",", "2"}], "]"}], "&"}], "/@",
RowBox[{"Partition", "[",
RowBox[{"#", ",", "8"}], "]"}]}], "&"}], ",",
RowBox[{"1", "-", "dat"}]}], "]"}]}]], "Input",
CellChangeTimes->{{3.580225369944318*^9, 3.580225447652417*^9}}],
Cell[BoxData[
RowBox[{"{",
RowBox[{"\<\"\[CapitalEGrave]\[IHat]k\"\>", ",", "\<\"EQT\"\>",
",", "\<\")\.11\[CapitalAGrave]\"\>", ",", "\<\"\.81*4\"\>",
",", "\<\"\.8d\[Currency]v\"\>", ",", "\<\"-@\[CapitalADoubleDot]\"\>",
",", "\<\"@\[Times]P\"\>", ",", "\<\"=\.01\.7f\"\>", ",", "\<\"\.8aX@\"\>",
",", "\<\"\.05\.95\\n\"\>", ",", "\<\"\[Not]\.1c\.8c\"\>",
",", "\<\"\\\"\.91\[Currency]\"\>", ",", "\<\"\.01\\\"b\"\>",
",", "\<\"\[PlusMinus]\[Cedilla]F\"\>", ",", "\<\"D\.86\.9a\"\>",
",", "\<\"\[CapitalOHat]\.8c\.9a\"\>", ",", "\<\"\\nK\.02\"\>",
",", "\<\"`y\[CapitalUGrave]\"\>", ",", "\<\"kP\.93\"\>",
",", "\<\"\.90W\.19\"\>", ",", "\<\"\.04\.84\[CapitalOHat]\"\>",
",", "\<\"\[DownExclamation]\[AGrave]:\"\>", ",", "\<\"-3\.01\"\>",
",", "\<\"\.05!\[Currency]\"\>",
",", "\<\"\[DownExclamation]\.99\[CapitalEHat]\"\>", ",", "\<\"Ib\.19\"\>",
",", "\<\"L\.85\.91\"\>"}], "}"}]], "Output",
CellChangeTimes->{{3.5802254131587553`*^9, 3.580225447839507*^9}}]
}, Open ]],
Cell["\<\
It\[CloseCurlyQuote]s not ASCII directly - I\[CloseCurlyQuote]ve tried \
reading down the rows/columns and negating the image.\
\>", "Text",
CellChangeTimes->{{3.580225458488744*^9, 3.580225475040761*^9}}],
Cell[BoxData[
GraphicsBox[{
TagBox[RasterBox[CompressedData["
1:eJztklFqpVUQhIP64DZcii5hXMEM6KswCjKbdSs6ik/3BnLy/VXVndz6ICGB
09VV1f8Pn3778Os3T09Pv3//9deHj3/++Pnzxy8/f/f1n5++/PHLp2+//vHX
/z///v13KaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRy
gadS/mP6S7xluo+yhekv8ZbpPsoWpr/EW6b7KFuY/hJvme6jbGH6S7xluo+y
hekv8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+Z7qNsYfpLvGW6j7KF6S/x
luk+yhamv8RbpvsoW5j+Em+Z7qNsYfpLLKWUUkoppZRSSimllFJKKaWUUkop
pZRSSimllFJKKaWUUkoppZTytvkHUPdFpg==
"], {{0, 222}, {222, 0}}, {0, 255},
ColorFunction->RGBColor],
BoxForm`ImageTag["Byte", ColorSpace -> "RGB", Interleaving -> True],
Selectable->False],
{StrokeForm[RGBColor[1, 0.0645609, 0.0641947]], EdgeForm[GrayLevel[0]],
EdgeForm[None], LineBox[CompressedData["
1:eJx11DFIHEEUBuAh4gVRhJzYaJENBIuEsxDtPJwqCCJJDrTLZc64e0RYA0E8
bJIhhRBCRAikSDURC5Ej2ASOVBMSDWKTVrhiCz1RrOwj0Zs3xf/cXVgeH/O/
nbezsPfmXpXCW0KIlav7uravJ1XZrjuuymbUrsGkc/KD+Qtar6CDaWdVJhfQ
ttvZvkXzdVEkP0y3HSRPoYPYWXcyH0fg4HcE83r759/wEVq/pPfvp/U62izR
/qchngfZv4+3n9f+Qct1dLKI1tPp9vPqQrpNHS0/oMUCy0+y9TtofRjifo0Q
5/GOqX+D+Z2ryRrtp9Bygs5xj/pmqO8Sre5GYCPRySx9r4/kZebPaNlA68MM
x2g7hVYPWL6L5U/mcX0HnayhdcxcQMse1n/2AvP7aLmFTlbR6jFaDDuLXBUs
x9H6GTp5w/Imw71ocz4HDr6j7Se0eu2sf1L+KdrcR6sOtD2oOH9FS41Oyixf
ZP4XYX8z3XobHbxn+SrLP2IeclYX5JZyzldTHeySR+i/8g2tamgxizajLN+H
tq3n2L+J1hW0vCi7XA5t6L/lLX+hxQba6HSLMbefUWg1gba3I5yvFcL88i85
r+jcMjxC51HLcIl5oCL/AyeLcbc=
"]]},
{StrokeForm[RGBColor[1, 0.0645609, 0.0641947]], EdgeForm[GrayLevel[0]],
EdgeForm[None], LineBox[CompressedData["
1:eJx11csrBVEcB/ATJVncjcdOjVKUshIpXcdGdCPv92NcbsrCzUbchU5slPdK
sbklFqKQFDZngZSSx8pCZiF/AFHKe34/i+8vpqZfn77fOWeaqZmscLQukqCU
6v8+f6Z/OBHtzwvXn/FM9mAPzYc+f7pz7DW0GUQ7VWibJ/opaO+qF6zn0fEq
tJdCtlvcPw2DvWW0iaGdVtEvEv0M0X/uAas79jzajaJVtXBAeN1Fl6PdRLTd
7EYH0eqti+YnWjthcLwM7YyKfJVscml974S93wW2w2hVIHzcCdbjaFuKVu8d
2D8QDpHNEvr3/n/tNYt+oeini/yK33sy59v8/E7aab25v60n2NF/nIY2l220
/gK/v9k22M8G2Jfs81awnkabSrRNEv2jFsyDwmPN2C9Bm9cm7O+RzSPaSw2D
3ZDwFNpuoPW9cHYvuo/9wvvHyKaY7tcsCXOud0V/CG3zRT7eiHkpWr03YP9A
OEZWO9yvFg6Q3eu/rc/qwXaS/cSuINs0+n6amzqwWmQXoFUTOj7D1w9wf4Xz
j1p/OsdkfUg2/P23I+ykCNjm8P+ikKyCZH1bw/twf6tGfwEOBkjo
"]]}},
BaseStyle->"ImageGraphics",
ImagePadding->{{0., 0.}, {0., 0.}},
ImageSize->Automatic,
ImageSizeRaw->{222, 222},
PlotRange->{{0., 222.}, {0., 222.}},
PlotRangePadding->Automatic]], "Input",
CellChangeTimes->{{3.580225517681717*^9, 3.580225519218809*^9}, {
3.580225555184123*^9, 3.58022558165454*^9}}],
Cell["\<\
Doesn\[CloseCurlyQuote]t seem to be a maze, either\
\>", "Text",
CellChangeTimes->{{3.5802255930497828`*^9, 3.580225596516082*^9}}],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{
RowBox[{"FromDigits", "[",
RowBox[{"#", ",", "2"}], "]"}], "&"}], "/@",
RowBox[{"(",
RowBox[{"1", "-", "dat"}], ")"}]}]], "Input",
CellChangeTimes->{{3.580226397964094*^9, 3.580226429570969*^9}}],
Cell[BoxData[
RowBox[{"{",
RowBox[{
"105345880", ",", "36342435", ",", "21532164", ",", "67719584", ",",
"74261429", ",", "23725604", ",", "33995392", ",", "31984638", ",",
"72532484", ",", "2926677", ",", "90236000", ",", "18124068", ",",
"594709", ",", "93176370", ",", "35927249", ",", "111437009", ",",
"5396498", ",", "50581197", ",", "56263832", ",", "75675850", ",",
"2369190", ",", "84869588", ",", "23697416", ",", "2690338", ",",
"84725333", ",", "38473934", ",", "40119432"}], "}"}]], "Output",
CellChangeTimes->{{3.580226399140126*^9, 3.5802264300097313`*^9}}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"Flatten", "[", "%", "]"}]], "Input",
CellChangeTimes->{{3.580226399685554*^9, 3.5802264008457203`*^9}}],
Cell[BoxData[
RowBox[{"{",
RowBox[{
"1", ",", "1", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0",
",", "1", ",", "1", ",", "1", ",", "0", ",", "1", ",", "1", ",", "1", ",",
"0", ",", "0", ",", "1", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1",
",", "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",",
"0", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0",
",", "1", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "1", ",",
"0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1",
",", "1", ",", "0", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",",
"0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0",
",", "0", ",", "1", ",", "1", ",", "1", ",", "0", ",", "0", ",", "0", ",",
"0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "1", ",", "0",
",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",",
"0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0",
",", "0", ",", "1", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0", ",",
"0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1",
",", "1", ",", "0", ",", "1", ",", "1", ",", "0", ",", "1", ",", "0", ",",
"0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1", ",", "1", ",", "1",
",", "0", ",", "1", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",",
"0", ",", "0", ",", "1", ",", "0", ",", "1", ",", "1", ",", "0", ",", "1",
",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",",
"0", ",", "1", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0",
",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",",
"0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "1", ",", "1", ",", "0",
",", "1", ",", "0", ",", "1", ",", "1", ",", "1", ",", "0", ",", "1", ",",
"0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0",
",", "0", ",", "0", ",", "0", ",", "1", ",", "1", ",", "1", ",", "1", ",",
"0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0",
",", "0", ",", "1", ",", "0", ",", "1", ",", "1", ",", "1", ",", "1", ",",
"1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "0", ",", "1", ",", "0",
",", "0", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0", ",",
"1", ",", "0", ",", "1", ",", "1", ",", "0", ",", "0", ",", "0", ",", "0",
",", "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",",
"1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0",
",", "1", ",", "0", ",", "1", ",", "1", ",", "0", ",", "0", ",", "1", ",",
"0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "0",
",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",",
"1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "1", ",", "0", ",", "0",
",", "0", ",", "0", ",", "0", ",", "1", ",", "1", ",", "1", ",", "0", ",",
"0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1", ",", "1", ",", "0",
",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "1", ",",
"0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0",
",", "1", ",", "0", ",", "0", ",", "0", ",", "1", ",", "1", ",", "0", ",",
"1", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "1", ",", "0",
",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",",
"0", ",", "1", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0",
",", "1", ",", "0", ",", "0", ",", "1", ",", "1", ",", "0", ",", "0", ",",
"0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "1", ",", "0",
",", "1", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1", ",", "1", ",",
"0", ",", "1", ",", "1", ",", "1", ",", "0", ",", "0", ",", "0", ",", "0",
",", "1", ",", "0", ",", "0", ",", "0", ",", "1", ",", "1", ",", "0", ",",
"0", ",", "1", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0",
",", "1", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",",
"0", ",", "1", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0", ",", "1",
",", "1", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1", ",",
"1", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0",
",", "1", ",", "0", ",", "0", ",", "0", ",", "1", ",", "1", ",", "0", ",",
"0", ",", "1", ",", "0", ",", "0", ",", "1", ",", "1", ",", "0", ",", "1",
",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",",
"0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0", ",", "1", ",", "0",
",", "0", ",", "1", ",", "0", ",", "1", ",", "1", ",", "0", ",", "0", ",",
"0", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "1",
",", "0", ",", "0", ",", "1", ",", "1", ",", "0", ",", "0", ",", "0", ",",
"0", ",", "0", ",", "0", ",", "1", ",", "1", ",", "1", ",", "1", ",", "0",
",", "0", ",", "1", ",", "1", ",", "1", ",", "0", ",", "1", ",", "1", ",",
"0", ",", "0", ",", "1", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1",
",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "1", ",", "0", ",",
"1", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "1",
",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "1", ",", "1", ",",
"0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "1", ",", "0",
",", "0", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "1", ",",
"0", ",", "1", ",", "1", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1",
",", "1", ",", "0", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",",
"0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0",
",", "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",",
"0", ",", "1", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0",
",", "0", ",", "1", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",",
"0", ",", "0", ",", "0", ",", "0", ",", "1", ",", "1", ",", "1", ",", "1",
",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",",
"1", ",", "1", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0",
",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "1", ",", "1", ",",
"0", ",", "1", ",", "0", ",", "0", ",", "1", ",", "1", ",", "0", ",", "0",
",", "1", ",", "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",",
"0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0",
",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",",
"0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "0", ",", "1", ",", "1",
",", "0", ",", "1", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",",
"0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0",
",", "0", ",", "0", ",", "1", ",", "1", ",", "0", ",", "0", ",", "1", ",",
"1", ",", "0", ",", "0", ",", "1", ",", "1", ",", "1", ",", "0", ",", "0",
",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "1", ",",
"0", ",", "1", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "1",
",", "0", ",", "1", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1", ",",
"0", ",", "0", ",", "0", ",", "0", ",", "1", ",", "1", ",", "0", ",", "0",
",", "1", ",", "1", ",", "1", ",", "0", ",", "0", ",", "1", ",", "0", ",",
"0", ",", "1", ",", "1", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0",
",", "0", ",", "0", ",", "1", ",", "0", ",", "1", ",", "1", ",", "0", ",",
"0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0",
",", "0"}], "}"}]], "Output",
CellChangeTimes->{3.580226401307309*^9}]
}, Open ]],
Cell["\<\
This was as far as we got - turned out to be the Game of Life:\
\>", "Text",
CellChangeTimes->{{3.581938747359436*^9, 3.58193878589634*^9}}],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{"CellularAutomaton", "[",
RowBox[{
RowBox[{"{",
RowBox[{"224", ",",
RowBox[{"{",
RowBox[{"2", ",",
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{"2", ",", "2", ",", "2"}], "}"}], ",",
RowBox[{"{",
RowBox[{"2", ",", "1", ",", "2"}], "}"}], ",",
RowBox[{"{",
RowBox[{"2", ",", "2", ",", "2"}], "}"}]}], "}"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"1", ",", "1"}], "}"}]}], "}"}], ",",
RowBox[{"1", "-",
RowBox[{"ImageData", "@", "bitImg"}]}]}], "]"}], "//",
"ArrayPlot"}]], "Input",
CellChangeTimes->{{3.581938792419304*^9, 3.581938961719907*^9}}],
Cell[BoxData[
GraphicsBox[RasterBox[CompressedData["
1:eJylUskRAjEMk+mDBy1RwjZA/z9mY+vILK8lmZyWYtnO6/i8jweA54z6o6Hb
rOV1GYtz35y4orvFWbOuasg2Dk0eGkSjHTZg90ng4Da1vS/3DCmHmfNgE6mG
yYsDNxIUaJkd9LpG5LJkhGRO+BRgjzXs3M+qp6I8DKK5SmIIEkbhFrGRJYSQ
y09wZ0Cuisqx1UnFtkuEIOuUGL4Ufwi4MFVN5NfDL7WVau+2L4niA90=
"], {{0, 0}, {29,
29}}, {0, 1}],
Frame->Automatic,
FrameLabel->{None, None},
FrameTicks->{{None, None}, {None, None}}]], "Output",
CellChangeTimes->{3.5819389620312*^9}]
}, Open ]]
},
WindowSize->{740, 652},
WindowMargins->{{Automatic, 39}, {3, Automatic}},
FrontEndVersion->"9.0 for Mac OS X x86 (32-bit, 64-bit Kernel) (January 25, \
2013)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)
(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[557, 20, 129, 3, 30, "Text"],
Cell[CellGroupData[{
Cell[711, 27, 4125, 73, 73, "Input"],
Cell[4839, 102, 1071, 22, 189, "Output"]
}, Open ]],
Cell[5925, 127, 91, 1, 30, "Text"],
Cell[CellGroupData[{
Cell[6041, 132, 455, 12, 28, "Input"],
Cell[6499, 146, 766, 18, 167, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[7302, 169, 351, 10, 28, "Input"],
Cell[7656, 181, 737, 17, 266, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[8430, 203, 219, 4, 28, "Input"],
Cell[8652, 209, 9108, 167, 471, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[17797, 381, 131, 2, 28, "Input"],
Cell[17931, 385, 117, 3, 28, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[18085, 393, 420, 12, 28, "Input"],
Cell[18508, 407, 1020, 16, 75, "Output"]
}, Open ]],
Cell[19543, 426, 216, 4, 30, "Text"],
Cell[19762, 432, 5638, 100, 237, "Input"],
Cell[25403, 534, 142, 3, 30, "Text"],
Cell[CellGroupData[{
Cell[25570, 541, 246, 7, 28, "Input"],
Cell[25819, 550, 603, 10, 80, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[26459, 565, 128, 2, 28, "Input"],
Cell[26590, 569, 7776, 101, 471, "Output"]
}, Open ]],
Cell[34381, 673, 151, 3, 30, "Text"],
Cell[CellGroupData[{
Cell[34557, 680, 720, 21, 46, "Input"],
Cell[35280, 703, 479, 11, 408, "Output"]
}, Open ]]
}
]
*)
(* End of internal cache information *)

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B