Skip to main content
akalin u/akalin avatar

akalin

u/akalin

Feed options
Hot
New
Top
View
Card
Compact

Image

Advent of Code is an annual Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.


Weekly visitors Weekly contributions
r/adventofcode

Advent of Code is an annual Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.


Weekly visitors Weekly contributions

[2019 Day 16] Part Three: A fanfiction by askalski

akalin
replied to alexhaupt

A nice speed up is to realize that you can compute binomMod2 with bitwise operators:

B(n, k) mod 2 = (~n & k) ? 0 : 1


Image

Advent of Code is an annual Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.


Weekly visitors Weekly contributions
r/adventofcode

Advent of Code is an annual Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.


Weekly visitors Weekly contributions

-🎄- 2019 Day 16 Solutions -🎄-

akalin
commented

Came up with the partial sum method that most people used, but thought a bit more and came up with the binomial coefficient solution. It looks like mrhthepie got it too, as well as a few folks doing "part 3". (I didn't come up with the even slicker solution of using Lucas' theorem though!)

Someone asked me to write up the derivation for the binomial coefficient solution, so here it is (along with the rest of my Python code).

Edit: Fixed mistakes.


Image

This subreddit is for discussion of mathematics. All posts and comments should be directly related to mathematics, including topics related to the practice, profession and community of mathematics.


Weekly visitors Weekly contributions
r/math

This subreddit is for discussion of mathematics. All posts and comments should be directly related to mathematics, including topics related to the practice, profession and community of mathematics.


Weekly visitors Weekly contributions

Where does this proof come from?

akalin
commented

I asked Greg about this on Twitter and he very kindly replied: https://twitter.com/gregegansf/status/1159578583162970112?s=21

I’m on a phone right now so I can’t quote him properly, but basically it all comes down to the Euler characteristic of the sphere and a plane being different.


Image
A banner for the subreddit

All things piano related!


Weekly visitors Weekly contributions
r/piano
A banner for the subreddit

All things piano related!


Weekly visitors Weekly contributions

Anyone recognize the piece shown in the background?

akalin
commented

I e-mailed the Stage Fright folks and they replied:

This was an image I took off from a website that sold sheet music, it was a one page preview and didn't come with the title. I tried to find the same website again but I can't. Sorry I couldn't help you there!


Image
A banner for the subreddit

A community dedicated to Dark Souls I, game released for PC, PlayStation 3 and 4, Xbox 360/One, and Switch (Remastered).


Weekly visitors Weekly contributions
r/darksouls
A banner for the subreddit

A community dedicated to Dark Souls I, game released for PC, PlayStation 3 and 4, Xbox 360/One, and Switch (Remastered).


Weekly visitors Weekly contributions

Dark Souls: Remastered Mega-Thread

akalin
commented

Does anyone know of any sites where there are still pre-orders for the remastered trilogy box available? The sites I found are out. :(