@Lembik @Zgarb I'm looking for an equivalent of PCA on binary data. Basically: given a set of binary vectors, find the smallest set of binary vectors, which can yield the input set by XORing subsets. That must be a well studied problem, but I'm not entirely sure what to search for and I figured one of you might know.
I would be surprised if this isn't a well-studied problem, but I'm not sure what else to search for at this point: you're given a set of binary $n$-vectors $S \subset \{0,1\}^n$. The problem is to find another set of binary $n$-vectors $B \subset \{0,1\}^n$, with minimal size $|B|$, such that eve...
Usually, if you want to be able to apply lightness or darkness to a color, you would use a color model such as HSL, where Luminosity is one of the component parts of the color. Applying lightness (increasing luminosity) or darkness (decreasing luminosity) would, with respect to a HSL color model ...
Introduction
Let's observe the following string:
ABCDEFGHIJKLMNOP
If we swap the ends of the string, which are these:
ABCDEFGHIJKLMNOP
^^ ^^
We get the following result:
BACDEFGHIJKLMNPO
After that, we delete the ends of the string, which in this case are B and O. The result ...
@Zgarb yeah thanks. Figured it out in the meantime. I vaguely remembered Gaussian elimination from some lectures years ago and it also occurred to me treat the XOR as addition mod 2, but somehow I didn't connect them.
Plz Help to Solve This
Use A* algorithm to solve the 15 puzzle problem:
Your algorithm should take as input a possible configuration of the Puzzle.
The output should be the sequence of steps required to solve the problem.
Your program should also be able to generate a possible puzzle.
The pseud...
As far as byte-counting goes, I think it makes more sense to count the preceeding newline as part of the function. Otherwise it's basically the same as a snippet (might need a meta post though)
Background: Methods in Vitsy are defined by specific indices of lines of code. For example, if I wanted to call the second line of a program, I would call 1m to specify the first index of the methods.
In a recent challenge, I was also asked to count the preceding newline, which sort of made sens...
So slightly smaller than "holy cow ridiculously enormous" and just in the "really enormous" range. Pretty sure my brain can't handle numbers that big anyway.
You are provided a set of arbitary, unique 2d Cartesian coordinates:
e.g. [(0,0), (0,1), (1,0)]
Find the longest path possible from this set of coordinates, with the restriction that a coordinate can be "visited" only once. (And you don't "come back" to the coordinate you started at).
Example...
Speaking of large numbers, I watched an interesting "standup maths" video yesterday evening discussing card shuffling.
There are 52! ways to shuffle a deck of (US) cards ... which is mind-boggling huge. Let's compare that to 52! seconds. Suppose we're standing on the equator, and every billion years we take one step forward. Another billion years, another step, etc. (let's assume we can float across the water) Every time we fully circumnavigate and return to where we started, remove a 0.5mL drop of water from the Pacific Ocean and set it aside ...
Continue this process until we deplete the Pacific Ocean. Once we've done that, place a single piece of standard paper on the ground and put all the water back into the ocean. Now continue that process until we've accumulated enough paper to reach from the Earth to the Sun ...
And that's about 1/3rd of the way through 52! seconds.
The main problem with the analogy is that the number's just too damn big, even still. The steps, water, paper, just reinforces that it's a big number, but it still can't give a clear idea of how big, because meat-sacks don't think that high.
So, if you do something like 4:-3 in Python when indexing an array, it understands you want from the 4th element to the 3rd-from-the-end ... Not in PowerShell, it creates the range 4..-3 as 4,3,2,1,0,-1,-2,-3
OOC, what does python do when the range doesn't make sense? Like if you did [4:-3] on a two-element list. Just give back an empty list or go all exceptiony?
It's actually just "start from index 4, go down to index -3 (exclusive), by steps of -1". For a two element list, 4 is off the right and -3 is off the left, i.e. you get the whole list
@LegionMammal978 If you mean when putting them into the code, yes, though you can do tricks with eval to make it multi character (although using characters is just as effective).
So, for example, on an empty stack: '123'n would leave 321 (the number) on the stack.
;e declares a file as a superclass (though it's not really a superclass in Java terms, more like it's the one file that can use the shorthand K command).
;u declares a file as used by the current class and is called with k commands.
Good thing I have some experience half-heartedly attempting to read the source code of esolang interpreters because the "documentation" page only has some examples
Basically, to use separate files, you declare that you wish to use them with ;u. If the FileHandler can find them, it'll say, "Okay, then I'll add this to the list of files we might use in the future." You call methods inside the separate file with <index in use><index of line>k
this reminds me of another problem: there's a rule for integer triplets, (2, 4, 8) satisfy the rule, you can check any other triplets and once you are confident, you can try to guess the rule (but you have only one attempt)
And the only reason I was able to play Action Quake2 was because it was included on a demo CD inside an issue of PC Gamer, so I didn't need to download the couple-hundred-meg install.