Everything

Puzzle 46 / Fillomino [LITS + Extra Region + Walls + Anti-Walls + Inequality + Tapa + Masyu]

5:27 PM phenomist: do you use gridderface to make pretty puzzles?

5:52 PM phenomist: actually nvm excel is probably easier lol

Okay I’m sorry this is a horrible puzzle where the rules don’t make sense and I didn’t even get it testsolved. I just wanted an image to concisely demonstrate the capabilities of gridderface, my puzzle marking and creation program, for the project homepage, after somebody expressed interest in using the program to write a puzzle. Then I got tremendously carried away.

Thoughts at Midnight

These are the thoughts that sometimes keep me awake at night.

These are things I don’t want to think about. These are things I’ve spent hours thinking about, never productively. They are worrying, but unlike typical worries in my life, it is fundamentally impractical to take steps to resolve or mitigate them, after which I may rest assured that I’ve done my best. The reason is that they also happen to be either untestable/unfalsifiable or only testable if one incurs absurd and irreversible costs, mainly dying.

Sometimes I explain them away to myself successfully and move on. Sometimes I read what I’ve written and think about these thoughts and do the cognitive equivalent of looking at them funny, as I’m expecting most readers to feel if they get that far — why would anybody be bothered, or afraid, or soul-crushingly panicked about these things? Life is so busy, there are literally more than sixty-four items on my HabitRPG to-do list, and besides, there are so many serious global issues humanity is actually facing right now, and people who are actually deprived of basic rights and resources and have to struggle to stay alive. How can I possibly be bothered by these absurd remote thoughts?

But I know that other times I do feel those emotions exactly. And if I stare just right, I can feel those emotions bubbling beneath the surface in me. Sometimes I can’t explain the issues away to myself, and a deep soul-sucking pang grows in my stomach. I’m irrational — I’m afraid of some of these thoughts — and I have submitted to the fact that there are some edges of my irrationality that would not be worth the effort to fix if just not thinking about them is better.

Sometimes these thoughts make me wish I were not so rational. Sometimes they even make me wish I were religious; it would be easier if (I believed) consciousness were, somehow, special. I suspect if I tried really hard, I could make myself believe something like that sincerely. But I think that’s a betrayal of myself I’m not willing to take. I think there are better ways to remain happy.

I want to maximize happiness. Thinking about more general moral principles will help with that, but the remoteness of these particular thoughts is such that I doubt I’ll ever have to make a choice that would benefit from me having thought about them. At least, I think the chance is small enough to not be worth the negative utility spent thinking about them.

So: “There is nothing to fear but fear itself.”

But I feel frustrated: not thinking about something just doesn’t seem like a solution. I don’t know how to come to terms with just how irrational happiness fundamentally is. And I still can’t resist thinking about them sometimes…

2015 MIT Mystery Hunt

Well, it’s been over a week, which is a long time for blog posts to be delayed after the event they’re documenting in probably all of the world except my blog. So.

I guess this post should start with a bit of background. I’ve been puzzlehunting for… wow, three and a half years now. I was introduced to puzzlehunts from AoPS, when some fellow members got together a team for CiSRA 2011, and I think I’ve participated to some degree in every known internet Australian puzzlehunt since.

But as for my experience with the MIT Mystery Hunt in particular, I sort of hunted with a decidedly uncompetitive AoPS team in 2012 (I think we solved one puzzle exactly), but my serious hunting career began when dzaefn recruited me into the Random team (then Random Thymes) for the 2013 hunt (and I did blog obliquely about it). We didn’t win (and I actually didn’t participate that much because I was traveling with family) but the next year (as One Fish Two Fish Random Fish Blue Fish (1f-2f-17f-255f (I am evidently in a parentheses mood today because as you’ve probably noticed, the amount and depth of parentheses in this sentence are positively alarming (lol)))) we won.

And I do have a half-written post about that which will never get posted (and I also didn’t participate that much, because my family was moving that weekend) but okay, let’s just drop any semblance of chronological coherence on this blog and dump a short version of the list of puzzles and parts towards which I contributed solving, as I wrote them down one year ago:

Moon Shoes

Okay. So. These things: These things are a thing. They’re like mini-trampolines that you are supposed to strap onto your feet and jump around on to have fun, if you’re, like, six years old, maybe? Anyway, if you happen to run into a pair of these, please be careful, and please think twice before doing something like, I don’t know, immediately strapping them on after you see them and jumping as hard as you possibly can, especially not when you are jumping on a hard unforgiving surface, or when you are surrounded by a bunch of impressionable children whom you could be concerned might follow your example or be swayed by your bad influence or something.

C/C++ to D

Some notes.

I’m assuming you want to use D largely, but not entirely, for competitive programming. That’s me right now.

Basics

Syntax is very similar. Function definitions, semicolon-terminated statements, variable declarations, and so on. You can declare int main() {...} or void main() {...} or something with arguments.

Basic types like bool and int and double are all there. Wonderfully, long is 64 bits. Instead of unsigned whatever, just prefix a u, e.g. uint.

Arithmetic operators and bit operators are all there too, including unsigned right shift >>>. Although ^ is still xor, D has exponentiation as ^^. Sadly, % is still same-sign remainder; there’s no true mod.

Casts look like cast(int) x;

Control Flow

if, while, for, do, and even switch all work as you’d expect, along with break and continue.

foreach is the nice addition though. Not only can you iterate over arrays and stuff, but range loops go like:

Rewind

As per item 3 of 50:

InfiniteLooper version

Well, there are better memory-triggering songs but I think this pretty much sums up how I feel about blogging right now (possibly including the very act of choosing that song.) And college apps. And life. Plus, the music video is silly in its own incredible way.

Anyway. Around this time a year ago, I made a post talking about how around a year before that,

I paused my participation in big high-school competitions, for a variety of reasons.

And then I rambled on life and programming competitions.

If you didn’t get it yet, this post so far has been written to meaningfully echo the last one. Nothing so abrupt has happened this year, but I just realized how nice it was to have a paragraph humorously listing the weird stuff I had gotten myself into over the course of 2013, so I’m going to do so again, even more completely.

College Questions (unprotected ver.)

This post, or most of it, was published password-protected once because… well, I explain that below. (To the one person who actually bothered asking me for the password, just so you know, I did add and rewrite parts. More than a few.) I forgot how distinctly powerful a disincentive a large 2300-word block of text is to the average person, especially when the subject of half of those 2300 words is teenage angst (I’ve already linked to xkcd 1370 in enough places so I’m not even going to embed it here) interweaved with an insufferable amount of rationalist jargon. This will probably filter my readership more than sufficiently already.

I have still decided to protect one detail of the thought process, though. But even after that, I guess I do care more about how many people read this than I do for most of my other posts, so here’s a primitive attempt to gauge interest; if you choose anything beyond the first choice, I would also appreciate if you leave a comment, even if you don’t think you have anything to add:

edit: This poll has been removed, it wasn’t very interesting anyway.

I haven’t posted for a long period again, but I don’t feel too bad about it.

Well, until I look carefully at my blog draft folder and remember that I have 90%-finished drafts about the two debate competitions I went to (November 2013 and March 2014), and winning the previous Mystery Hunt (January 2014), and my summer trip to Penghu (July 2013). Which will probably never get posted out of awkwardness.

Oops.

But I’ve been busy, completely righteously busy, with college apps to write and algorithm classes to teach and speeches to write and a math club to sort-of lead and all the typical homework besides.

And then (for those of you who don’t have me as a friend on Facebook) I got accepted to MIT and Caltech early.

And for a few days after that, I checked Facebook about sixteen times a day for the Class of 2019 group discussion, except for one day when I really needed not to, thanks to the power of committing to my HabitRPG party to do something. I am increasingly learning that procrastination is something that has to be actively and strategically fought. But that’s not what this post is about.

College.

HOJ 226: CP (中)

This post was written in Traditional Mandarin Chinese for my fellow competitive programmers in Taiwan.

題目在這裡,HOJ 226

有關的題目出現於NPSC 2014 高中組決賽pD。

前置要求:treap (split, merge)跟在上面實作區段操作(請參考資訊枝幹)。

這裡沒有完整的解答code,因為AC是要用血汗換來的才值得 :-)

Treap

我討厭單字母l的變數名稱(跟1太像了。我沒有被這個雷過,這只是自己對自己程式碼可讀性的要求),所以我的子樹叫做lc(left child),rc(right child)。

Commemorating Obvious Milestones Involving Chronological Sustenance

Well, there had to be something here.

Unfortunately I don’t have time for anything more complex, so here’s a low-effort illogical puzzle for the occasion. (It has been testsolved, at least. Thanks, Yoshiap.) It also features a brand new category, so as not to distract the people on LMI.

If you don’t already know what occasion it is, it’s easy to find out by looking through my archives or possibly anywhere else I’ve left a trail online. Or you could solve the puzzle! (Or you could scroll down to read the solution!) If this puzzle had an answer, it would be a nine-letter word, although like most of mathematics, it’s less about the answer than about the path you take to get there…

2017 edit: A warning that this has somewhat linkrotted and is harder to solve, but theoretically still possible.

Extreme Value Theorem

original sillier post

The “Extreme Value Theorem”, according to my old calculus textbook (Larson, Hostetler, Edwards, 8th ed.), is “A continuous function defined on a closed interval attains a minimum and a maximum on the interval.” The calculus textbook continues,

Although [it] is intuitively plausible, a proof of this theorem is not within the scope of this text.

Of course Rudin proves this, but coming from an unrigorous calculus background, the required deductions span three chapters and are very hard to motivate. That’s probably because it proves things for extremely general objects.

In particular, I have no idea why the definition of “compact” is what it is: “a set for which every open cover has a finite subcovering”. Therefore, here’s a less general but more motivated proof, from the grounds-up.

Definitions

Real numbers are hard to define. We only need to know that we can add, subtract, multiply, divide, and compare them, i.e. they’re an ordered field, and that they have the least-upper-bound property. That is, if we have a set of real numbers that are bounded above, then the set has a least upper bound, a bound that “perfectly fits” the set. Precisely, the bound must be such that every element of the set is less than or equal to it, and no smaller value satisfies the same property.