Compressing the Atomic Ionization Energies
This is a new type of compression challenge. In a normal compression challenge, you are required to recreate a list exactly. Here, you are allowed to round the values in any way you wish. What's the catch? Your errors are penalized based on how wron...
I was more concerned with loop(print(1)) type answers. It only adds a couple points to each penalty (over truncating), but it saves a huge amount of bytes total, since that's the whole thing.
(or whatever number gives the least penalty overall)
Hmm. Maybe you could add a rule that each number has to be +-1 from true to be considered a valid submission. Doesn't help truncating, but it should prevent any serious loop abuse, right?
Zeckendorf Number Representation
Zeckendorf's Theorem states the every positive integer can be uniquely represented as a sum of one or more distinct
Fibonacci numbers in such a way that does not include any two consecutive Fibonacci numbers.
For example a valid Zeckendorf representation is:
...
A number of times now I have posted challenges where a rectangular block of text is the submission requirement. These are usually source-layout challenges.
Examples: (other users surely have some too)
Sierpinskified Code
Reading Code in 8 Ways to Output 8 Numbers
Code that runs the Game of Life ...
Currently, all tips questions on the main site are Community Wiki. Furthermore, there are not many other non-challenge questions on the main site. These types of questions are generally supressed on PPCG.
This should change.
The first point I'm going to attack is the fact that tips questions ar...
Python 2 - 12 characters
print 8**999
The decimal representation of all even numbers from 0 to 100 can be found in the output:
1537789902701396471164448516595940643300892369671042144707647536450073500768341185969200084798241824478037061567564756135641105226122796029481353102581685414043699187...
Lenguage, M = ∞
All of the programs start at the beginning of the string. The following poorly written Python program calculates how many characters are needed for a given M.
def program_length(n):
PLUS, MINUS, DOT = '000', '001', '100'
i = 1
s = ''
while n > 0:
i += 1
...
@MartinBüttner Also I'm not sure how the ><> quine would help because 1) You'll be opening/closing strings as you go and 2) I'd assume you'd need to take a log somewhere?
hmm, no answers? ok, how about this: do you think the list of all permutations should be sorted? should it start with the given array? or doesn't matter?
delighted you asked :) suppose empty string had a palindrome degree n, then its half prefix and half suffix which are also the empty string also have degree n, then the string has degree n+1
I should be deleting my challenge in the sandbox for proposed challenges. Just a heads up to those who may edit the submission directory that I'll remove "Grandes complications" :-)
One of the key parts of PNG's compression algorithm is the Paeth transformation, which transforms the image in a way that makes it compress better (usually). In this challenge, your task is to write a function to compute a Paeth transformation. The operation of a Paeth transformation is described...
I think I've figured out how to quine in Prelude. It's not going to be nice though and it won't be adaptable for CH's challenge. I'll have to try it out when I get home.
@aditsu there are applications where you do want count all permutations, treating duplicate elements as different.
It helps whenever you want to count the number of permutations of distinct elements where the permutations are restricted based on properties shared by multiple elements
I think simply the fact that both interpretations are perfectly valid in the presence of duplicates, and one is much easier to compute based on the other, speaks for including duplicates by default.
@PeterTaylor I'm almost inclined to think it'd be better for you to post that as a separate answer, considering the tricks you used to remove 2 chars from the bottom row