Kolmogorov complexity, informally, is the amount of code it takes to produce a given string of text. When posting a challenge in this category, please make sure it adds something new to the challenges that already exist.

learn more… | top users | synonyms

10
votes
1answer
295 views

XKCD Bracket Probabilities

Today's XKCD is a sports-tournament style bracket, where the contestants are well-known names, put into groups of possibly confusing names. Give the probability that a given contestant will win the ...
34
votes
11answers
3k views

ASCII Art of the Day #1 - Double Knot

Write a full program or a function that takes a positive integer N as input via STDIN/command line/ARGV or function arguments and prints an ASCII double knot corresponding to the N to STDOUT. The ...
19
votes
6answers
1k views

Thorough though Thoreau threw, Troll throws through tough troughs

To each of these nine confusingly similar words, assign a number 1-9 in any way you like: though through thorough Thoreau throw threw trough tough troll Write a program that takes in a string. If ...
34
votes
12answers
3k views

Me Want Honeycomb

Write the shortest program that prints this ASCII art section of a hexagonal tiling or honeycomb: __ __/ \__ __/ \__/ \__ / \__/ \__/ \ \__/ \__/ \__/ / \__/ \__/ \ \__/ \__/ ...
48
votes
25answers
4k views

Draw An ASCII Double Helix

Write a program that takes in an integer N via stdin or the command line. If N is 0, the single letter O must be printed to stdout. If N is positive, this horizontal ASCII art double helix, drawn ...
30
votes
30answers
3k views

Extendify the ASCII Sun

Write a program that takes in (via STDIN/command line) a non-negative integer N. When N is 0, your program should print O (that's capital Oh, not zero). When N is 1, your program should print \|/ ...
22
votes
35answers
2k views

List all times in the day at a half hour rate

Shortest answer wins. It must be sorted, and in 24hr time. The final line does not have a comma. Output should be as follows: '00:00', '00:30', '01:00', '01:30', '02:00', '02:30', '03:00', '03:30', ...
120
votes
19answers
11k views

Do you want to code a snowman?

Here is a simple ASCII art snowman: _===_ (.,.) ( : ) ( : ) Let's make him some friends. This will be the general pattern for our ASCII art snowpeople: HHHHH HHHHH X(LNR)Y X(TTT)Y (BBB) The ...
17
votes
2answers
313 views

Can you fold a hexomino into a cube?

One of my kid's favorite toys is a set like this. Actually its one of my favorite toys - I've been playing with it and its been giving me some PPCG challenge ideas. Here's one: Write a program or ...
21
votes
5answers
431 views

StickStack Numbers

StickStack is a very simple stack-based programming language with only two instructions: | pushes the length of the stack onto the stack - pops the top two elements from the stack and pushes back ...
47
votes
24answers
5k views

Golf Your Language's Identicon

Identicons are small images of geometric patterns that represent the hash value of a string. Stack Exchange uses the identicons from Gravatar as each user's default avatar image. In this challenge, ...
10
votes
5answers
262 views

Princely Prefix by a Program in Pattern

You should write a program or function which outputs or returns as much of Chapter I of The Little Prince as it can. Your program or function has to be an M-by-N block of code containing only ...
12
votes
1answer
548 views

Two-zero-one-five puzzle

Background This puzzle is a variation on the four fours puzzle (itself the topic of a past question). Like that puzzle, the aim is to find mathematical expressions for different whole numbers, using ...
60
votes
21answers
5k views

Interpreting Fish (no, not that Fish)

Consider these five ASCII art sea creatures: Standard fish: ><> or <>< Speedy fish: >><> or <><< Sturdy fish: ><>> or <<>< Stretchy ...
16
votes
15answers
1k views

Generate MathJax for the Golden Ratio Continued Fraction

In anticipation of MathJax being temporarily disabled, the rendered MathJax in this question has been replaced with images. You are still welcome to post answers but you'll have to view the rendered ...
14
votes
32answers
3k views

Print the first character of the previous answers

The accepted winner is isaacg, with his 7-bit ASCII answer. However, the challenge isn't over yet - this bounty is awarded to the shortest answer. If, somehow, you get all the first characters of all ...
27
votes
11answers
2k views

Official Ruby Inspector

Here is a simple ASCII art ruby: ___ /\_/\ /_/ \_\ \ \_/ / \/_\/ As a jeweler for the ASCII Gemstone Corporation, your job is inspect the newly acquired rubies and leave a note about any ...
7
votes
4answers
634 views

Write an URL compressor

Today your goal is to invent URL compression. You must write two programs: a compressor and a decompressor. The compressor will be called with one URL on stdin and its output will be read on stdout. ...
9
votes
4answers
240 views

Row, Column, Diagonal, Block

Write a square block of code that is N characters wide and N characters tall, for some positive integer N. For instance, your N may be 5 and the block look like this: ThisI sMy5B y5Cod eBloc kOkay ...
21
votes
3answers
874 views

How do I craft that?

There are 21 items in Minecraft that you can craft using only wood and items crafted from wood: axe boat bowl button chest crafting table door fence gate hoe ladder pickaxe ...
10
votes
4answers
397 views

Encoding an URL in brainfuck

Inspired by this question, your goal today is to encode an URL in brainfuck. My browser has been hacked! The location bar has been turned into a brainfuck interpreter. I need a program that turns an ...
11
votes
7answers
557 views

Generate a Brainf_ck program that outputs a string of given length

Your friend is trying to break into a vault that has a peculiar locking system: it requires a certain number of gentle knocks in a particular spot. Your friend discovered the number (which is in the ...
10
votes
3answers
282 views

Golfing every ASCII character in 99

99 is a programming language I invented earlier this week for my challenge Write an interpreter for 99. (Invented but never needed to implement thanks to half a dozen of you. ;) ) The full language ...
7
votes
6answers
642 views

Writing code for three tasks

When you run your program first, it should print an integer sequence. The second run should print the 'Mary had a little lamb' song. The third run should produce an ASCII image file. Scoring Your ...
9
votes
2answers
290 views

ICS Maritime Flag alphabet

The International Code of Signals flag alphabet is used by ships for communication, particularly for static signals. Your challenge is to write a program or function that will take a string from ...
13
votes
1answer
472 views

Write a Kolmogorov Complexity Solver

The Kolmogorov complexity of a string S is the length of the shortest program P, written in some programming language L, whose output is exactly S. (Yes, the real definition is more formal but this ...
15
votes
9answers
1k views

Keep the unique characters down

It's very simple: Your program or function should generate the following text: Elizabeth obnoxiously quoted (just too rowdy for my peace): "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG," giving me a ...
18
votes
21answers
5k views

The Staircase Challenge

Your work is to recreate this piece of art: _____ | | | | _____| ...
8
votes
6answers
309 views

List the Cases of Two Finnish Nouns

Introduction In this challenge, your task is to correctly list the cases of two Finnish nouns. The twist is that you may use one of the listings as a guide to produce the other. The Nouns We use ...
32
votes
8answers
4k views

One hundred passwords

I have one hundred vaults, each one within another. Each vault has a password, consisting of a single number. 95 43 81 89 56 89 57 67 7 45 34 34 78 88 14 40 81 23 26 78 46 8 ...
15
votes
3answers
835 views

Words within words within words within words . . .

In this pixelated font of uppercase letters of the alphabet, all the characters are 5 units wide and 5 tall. ███ ████ ███ ████ █████ █████ ████ █ █ █████ █ █ █ █ █ █ █ █ █ █ ...
10
votes
4answers
623 views

Put the line in the code you nut and shake it all up

Using one programming language write 5 single-line programs, each of which outputs a different line of the first verse to Harry Nilsson's 1972 song "Coconut" when run individually: Brother bought ...
3
votes
3answers
561 views

Generate all 4-perfect numbers

Your program or function should output all the 36 4-perfect numbers in increasing order separated by newlines. An n positive integer is a k-perfect number (multiply perfect number) if the sum of its ...
37
votes
14answers
4k views

Automate Saving the World

You are Desmond Hume. For the last 3 years, you and your partner, Kelvin, have been slave to a computer that requires a very specific sequence to be entered into it every 108 minutes to save the ...
30
votes
13answers
3k views

Morse the New Year

This is Weekly Challenge #1. Theme: Audio Processing Your task is to write a program, which writes an audio file to disc (in a format of your choice), which contains the Morse code for 2015, i.e. ...
12
votes
6answers
1k views

Output 2015 as QR code

Mission is simple. Just output number 2015 as QR code and write it to file named newyear.png in PNG format. Code must be valid any day, so maybe you shall not use current year. QR code as text looks ...
51
votes
9answers
4k views

Draw the Warm Welcome Secret Hat

Winter Bash 2014 is on its prime and don't we all love the hats ? Especially the secret hats! So why not draw one of secret hats ? The challenge Your task is to draw the Warm Welcome Hat in ...
61
votes
5answers
5k views

Recognise Stack Exchange Sites by Their Icon

After spending a while on Stack Exchange, I can recognise most sites in the Hot Network Questions by their little icon (which is also their favicon), but certainly not all of them. Let's write a ...
12
votes
6answers
630 views

12 Days of Golfmas

Challenge On each of the 12 days of Christmas, output the appropriate verse of "12 days of Christmas", according to the date, otherwise output the chorus of "I Wish It Could Be Christmas Everyday". ...
23
votes
13answers
2k views

DVI Connector Pins

This is supposed to be a code golf challenge on the simpler end of the spectrum. But I figured it could be nice to bring out some micro-optimisation here. There are three basic types of DVI ...
23
votes
13answers
2k views

It's Spanish Time!

I have a simple task that should be relatively easy to implement by means of code. Your goal is to write a program that will output the time written in Spanish, given the time in HH:MM format. Many ...
32
votes
8answers
2k views

How Many Guineas in a Gross of Threepennies?

Until decimalization in 1971, British money was based on dividing the pound into 240 pennies. A shilling was 12 pennies so 20 shillings made a pound. The smallest denomination was the farthing at one ...
-3
votes
5answers
693 views

The Most Complex Chinese Character

Challenge You must output the Chinese character for biáng. Your program must not access any external sources and must exactly reproduce this SVG in every way. Note that the image below is just a gif ...
12
votes
5answers
922 views

Convert x-illion into standard form

Given a string, consisting of a prefix and then "illion", convert this number into standard form. For example: "million" -> 10^6 "trillion" -> 10^12 "quattuordecillion" -> 10^45 The ...
47
votes
56answers
7k views

Write lines in detention

Introduction Bad news guys - you got detention. Your English teacher doesn't understand this site and wants you to "stop doing math on your digital dohickeys, this is English class!" She sentenced ...
-6
votes
1answer
218 views

Print Hamlet's monologue using as few characters as possible [duplicate]

The task here is to print the text below, using as few characters as possible in your code. You can't use any external resource. (file, stdin, network) To be, or not to be: that is the question: ...
41
votes
8answers
8k views

Draw the South Korean flag

When I stumbled upon this question I remembered that I had also once seen precise rules for the construction of the South Korean flag. And this is quite a different construction. Source: Wikipedia ...
18
votes
8answers
2k views

Pixel art, episode 2: Display the map 1-1 of Super Mario Bros

Last challenge (Pixel-art, episode 1: display Super Mario) was just a training... (and you completed it in amazing ways, thanks!) This time, you have to work a little bit more. You have to display ...
26
votes
20answers
5k views

Pixel-art, episode 1: display Super Mario

it's a-me! Today's task is simple: write a program, or a function that displays the idle small Mario sprite, from Super Mario Bros, on NES, over a blue background. Any kind of entry is valid as long ...
6
votes
2answers
408 views

Turn nouns into plurals

Your task is to take as input an English noun and output its plural. To win the challenge you must trade off code length against accuracy. Entries will be scored according to this comma-separated ...