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

-1
votes
0answers
80 views

Unholy HTML parsing [duplicate]

Inspired by this classic, Your goal is to write a program that will output this exactly: You can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can ...
9
votes
5answers
422 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". ...
21
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
11answers
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 ...
30
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 ...
-4
votes
0answers
83 views

I woz ere. Ere I woz [duplicate]

In as few amount of Unicode characters as possible, print the following: I woz ere. Ere I woz. Woz I ere? Course I woz! Exact punctuation and capitalization is required. You must create the ...
-2
votes
5answers
617 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 ...
11
votes
4answers
821 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 ...
46
votes
55answers
6k 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
191 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
7k 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
383 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 ...
17
votes
8answers
2k views

Print all Country Codes

ISO 3166-1 is the standard that defines all the country codes. The well-known two-letter codes (US, GB, JP, etc.) are called Alpha-2 codes. With two letters, there are only 262 = 676 possible codes, ...
61
votes
93answers
15k views

Sing Happy Birthday to your favourite programming language

Your favourite programming language has just had a birthday. Be nice and sing the Happy Birthday song to him (or her, if you will). Of course you should accomplish this by writing a program in that ...
7
votes
3answers
447 views

Anti-aliased ASCII Aureoles

Consider the following ASCII image of five concentric anti-aliased ASCII aureoles: ........ .@..............@. ..... ..... .@.. ...
12
votes
7answers
2k views

Print the Retro Rocket

(inspired by this SO question) You are given as input a single positive integer n. In as few characters as possible, output a rocket in ASCII art with a head, a tail, and a body composed of n ...
38
votes
13answers
5k views

Periodic Table of Elements - Code Golf

Based on Practical Golf - US States Your task is to find the abbreviation (symbol) of an element given the element name, up to and including ununoctium (118). Use the periodic table on Wikipedia. ...
21
votes
9answers
2k views

The Saltine Challenge

Here is an ASCII saltine cracker: _________________ | . . . | | . . | | . . . | | . . | | . . . | |_________________| Here are two crackers ...
7
votes
3answers
424 views

Help me with trigonometry!

Thank you guys so much for your help with calculus. Now I need some help with my upcoming trigonometry test. On the test, I'll need to simplify expressions. I’ll be given input like 4sin(x)/(2cos(x)) ...
14
votes
2answers
2k views

Draw ASCII Playing Cards

Consider these 15 ASCII playing card patterns (ace through Joker, and the back side), where X is a placeholder for the suit symbol: (they look better with less line spacing) ------------- ...
8
votes
5answers
809 views

Monkey Island: The Head of the Navigator

Warning: This challenge contains some mild spoilers for The Secret of Monkey Island. Towards the end of the game, you're being led through the catacombs by a magically preserved head of a navigator: ...
8
votes
3answers
427 views

Pigpen Cipher Encryption

Pigpen Cipher Encryption Your mission is simple: to write a program which receives text as input and outputs an ASCII representation of it in the Pigpen Cipher. Input ASCII-only (no Unicode) ...
13
votes
6answers
712 views

Electron Configurations

Electron Configurations Your mission is to accept an element's atomic number as input, and output its electron configuration (e.g. 2,8,8,2 for calcium). Input An atomic number from 1 to 118. You ...
12
votes
6answers
973 views

Integer Emotions

Write a program or function that "reacts" to a given integer n (input via function parameter/args/stdin) The program doesn't care about negative numbers, likes even, dislikes odd numbers and ...
6
votes
2answers
300 views

Counting rods; count your rods

Some background Counting rods are small bars (3-14 cm long) that were used by mathematicians from many asian cultures for more than 2000 years to represent any whole number or fraction. (In this ...
27
votes
30answers
9k views

Output the legendary Yggdrasil

Your task is to output a representation of the legendary tree of life, Yggdrasil. You must write a program whose output is exactly that : /\ ...
17
votes
2answers
663 views

DNA: Deoxyribonucleic ASCII

Given a sequence of the bases Adenine, Cytosine, Guanine and Thymine (encoded as ACGT), you're to produce an ASCII art representation of a corresponding double strand of DNA. The strand will extend ...
47
votes
6answers
2k views

ASCII Art Calendar

Let's make an ASCII art clock and calendar that tells us the current month, day of the month, day of the week, hour, minute, and whether it's night or day (but not the year or second). At any ...
15
votes
8answers
2k views

Draw the Stickman Wars

Picture of me drafting this challenge with my advanced drawing skills. Background The Stickman wars happened long ago, when Earth's dominant species was made of nothing but sticks. Historians ...
13
votes
15answers
2k views

Output Graham's Number

Write a program that outputs all 64 layers of this representation of Graham's number from Wikipedia:    Your output must exactly match this ASCII version (in which ^ represents Knuth's ...
11
votes
11answers
3k views

Make me an alphabet tree

Intro In most fonts all of the uppercase alphabet characters besides BDO have single lines approximately touching some of the four corners of the character's bounding rectangle: ...
18
votes
2answers
2k views

Fill the Screen with Wang Tiles

It has been proven that the following 13 square Wang tiles always tile the plane aperiodically. This means that when the squares are arranged in a grid with all neighboring sides the same color, a ...
10
votes
10answers
871 views

Quoting Big Brother

Task: Have your program randomly choose one of the following two quotes at runtime and print that one quote, exactly as shown. 1: Under the spreading chestnut tree I sold you and you sold me. There ...
10
votes
2answers
473 views

Write a book writer

Here is a fairly simple ASCII depiction of an open book: |\ | \ | \ | \ | \__________ | || | | || Lorem i | \ || psum do | \ || lor sit | \ || amet, | \ || consect | ...
27
votes
49answers
6k views

The Real Slim Shady

Echo the following in as few bytes as possible: I'm Slim Shady. Yes, I'm the real Shady. All you other Slim Shadys are just imitating. So, won't the real Slim Shady please stand up? Please stand up. ...
14
votes
8answers
1k views

Spell out numbers in French

There was a challenge to convert a number to its numeral in English, but that was too straightforward. Given a number 0–100, your task is to output the corresponding numeral in French. The French ...
10
votes
8answers
1k views

What is your star-sign?

Write a program that takes a birth date (month and day-of-month) as input and outputs the corresponding sign, element and quality of the western zodiac. For the purposes of this challenge, these are ...
38
votes
9answers
3k views

ASCII Train Golf

Consider these seven ASCII train cars. Engine (E) __ ====== \/ | [] |========= | ) ================ O-O-O O-O-O \\ Passenger car (P) =============== | [] [] [] ...
12
votes
3answers
805 views

Who wants to be a Kolmogorov complexity winner?

You mission today is to invent a text compressor. Task You'll write two functions: The packer is a function that accepts a string of ASCII characters (U+0000 to U+007F) and outputs a Unicode ...
42
votes
48answers
6k views

Rock Around the Clock

In as few Unicode characters as possible, print the following (144 characters): 1, 2, 3 o'clock, 4 o'clock rock, 5, 6, 7 o'clock, 8 o'clock rock, 9, 10, 11 o'clock, 12 o'clock rock, We're gonna rock ...
25
votes
20answers
3k views

Golfing ASCII-art

Let's try to golf this piece of ascii-art representing a golfing man: '\ . . |>18>> \ . ' . | ...
0
votes
2answers
222 views

Low Entropy Literature [duplicate]

This is one of my favourite poems I wanted to share. Especially because it looks good for compressing. Who cares about literature in the 21st century anyway. Goal Your goal is to write the shortest ...
38
votes
65answers
10k views

Convert 1, 2, 3, 4, 5, 6, 7, 8, and 9 to “one”, “two”, “three”, etc

Winner: professorfish's bash answer! An entire 9 bytes! Wow! You may continue to submit your answer, however you can no longer win. Original post kept for posterity: Your goal is to convert a ...
5
votes
1answer
306 views

What a wonderful world [duplicate]

The challenge is programming a program that prints following lyrics of Louis Armstrong's 'What A Wonderful World' with as few characters as possible. The key is obviously kind of a 'compression'. I ...
54
votes
14answers
7k views

Draw the € sign

The goal is to output or display an image with an € (euro) sign according to the following specs (ignoring the border of the sign). Source: http://en.wikipedia.org/wiki/File:Euro_Construction.svg ...
16
votes
24answers
4k views

Old MacDonald function

Create a function in your chosen language that prints out the following: Old MacDonald had a farm, E-I-E-I-O, And on that farm he had a cow, E-I-E-I-O, With a moo moo here and a moo moo there, Here a ...
23
votes
4answers
3k views

May the 4th be with you!

In honor of Star Wars day, write a program to display the following text, scrolling like the Star Wars opening crawl: It is a period of civil war. Rebel spaceships, striking from a hidden ...
29
votes
9answers
3k views

Kolmogorov-mania

The Kolmogorov complexity of a string s is defined as the length of the shortest program P that outputs s. If the length of P is shorter than the length of s, then s is said to be compressible, ...