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 existing challenges.

learn more… | top users | synonyms

7
votes
2answers
451 views

All Armstrong numbers

An Armstrong number (AKA Plus Perfect number, or narcissistic number) is a number which is equal to its sum of n-th power of the digits, where n is the number of digits of the number. For example, ...
10
votes
5answers
449 views

Send a cosmic call

The cosmic call is a message sent into space in 1999 and 2003. It's made of 23 127*127px monochrome bitmap images, as detailed here. Your mission is to write a program that displays the entire 127*...
1
vote
9answers
498 views

The teacher is always wrong, flip his answer

Your dumb teacher is always wrong, so flip his answer. Change these responses True -> False Yes -> No 0 -> 1 Yeah -> Nope and vice versa. Keeping punctuation and the first letter's ...
5
votes
7answers
299 views

Ain't there nothing up my sleeves

Note: reference to Nothing up my sleeve number. Your task is to take no input and generate this exact output: d76aa478 e8c7b756 242070db c1bdceee f57c0faf 4787c62a a8304613 fd469501 698098d8 ...
12
votes
4answers
265 views

Display a cribbage score in ASCII

Cribbage is an interesting game, because you need a specific board to score your game. A cribbage board looks like this: Notice how the first column is on the left as it goes up, then on the right ...
18
votes
28answers
3k views

24 and 12 Hour Times

Write a program or function with no input that prints or returns this string of 24-hour and 12-hour times: 00:00 12:00am 01:00 1:00am 02:00 2:00am 03:00 3:00am 04:00 4:00am 05:00 5:00am 06:00 6:...
0
votes
0answers
69 views

Create a 3d-like ASCII art [duplicate]

Your challenge is to convert a string to an ASCII art version of it. Input Your input is a single string, wich you should convert into the ASCII art version of it. Output Your output should be ...
3
votes
2answers
296 views

Golf me an ASCII Alphabet

Don't you find that reading simple text isn't appealing enough? Try our ##### ### ### ##### ##### ##### ##### # # ##### # # # # # # # # # # # # # #...
16
votes
4answers
570 views

Correct way to add numbers to get lots of 8's

Inspired by this question which was further inspired by this one, write a program which takes two integers and adds them in a unique way, by performing an OR operation on the segments used to display ...
11
votes
5answers
301 views

Print the AdamN tile

Adam7 is an interlacing algorithm for raster images, such as PNG. It is called the "Adam7" algorithm because it was invented by Adam M. Costello, and it is generated by following a certain pattern 7 ...
1
vote
4answers
328 views

Kolmogorov complexity Chad Gadya [duplicate]

EDIT It is not clear how answers to the question of compressing a long text, without cumulative properties are relevant to golfing a short cumulative strong, any more than general Lempel Ziv ...
42
votes
9answers
5k views

Build a triangle without any triangles

As a little kid, I liked to play with these toys a lot: They probably intended for these to be used for art, but I always used them for math! Fractals, patterns, etc. One time, I was given this ...
8
votes
3answers
504 views

420 <s>Blaze</s> Golf It

This is a pretty simple challenge, but (I hope) a fun one. Task If right now either the month is 4 and the day is 20, the hour (on a 12 hour clock) is 4 and the minute is 20, or the minute is 4 and ...
10
votes
4answers
379 views

Code a code page

Introduction A code page maps integer values to a specific character. We can visualize a code page like this: +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | 0 | 1 | 2 | ...
6
votes
22answers
2k views

Display “Happy Easter!”

Your task is to print the following: _ _ _______ _ | | | | (_______) _ | | | |__ | | ____ ...
17
votes
2answers
935 views

Fun with flags!

Write a full program with a source code of 256 bytes or less that looks at an image of a flag and determines what country that flag is from. A zip file containing the 196 different flags in the ...
6
votes
16answers
377 views

Draw an ASCII art phone keypad

Draw the following in the fewest bytes possible: ------------------------- | | ABC | DEF | | 1 | 2 | 3 | ------------------------- | GHI | JKL | MNO | | 4 | 5 | ...
9
votes
1answer
266 views

Golf English – using contractions

I have not laughed as much from Stack Exchange content as I have from this. I think you all will enjoy this challenge, as it is inspired by what is over there. You will write a function or program ...
8
votes
2answers
127 views

Generate E-series of preferred numbers

Resistors and other electronic components are typically manufactured with values that conform to one of the E-series of preferred numbers. IEC 60063 defines the following E-series: E6: 10 15 ...
13
votes
3answers
431 views

How many sides does this polygon have?

So in 1st grade math, you learn the names of polygons. Three sides is a triangle, 4 is a square, and 5 is a pentagon. However, in 1st grade honors, you go a bit further. Your challenge There is a ...
4
votes
5answers
390 views

Electoral votes from state name

Given a the name of a state of the United States as a string (with case), return the number of votes the state has in the Electoral College. Write a full program or function, and take input and output ...
16
votes
5answers
759 views

Is this number random?

I asked random.org for 128 random integers between 0 and 232 - 1. Since the random number generator was so eager to give the first 64 numbers first, they're obviously more random than the other 64. ...
21
votes
15answers
2k views

Code Golf Golf Score

It's Friday... so let's go golfing! Write code that determines the player's scoring on a hole in a game of golf. The code can be either a function or entire program. As the genre suggests, shortest ...
18
votes
5answers
2k views

How many characters are there on the icon of a Stack Exchange site?

Given the name of a Stack Exchange site which doesn't have their own design yet, decide how many ASCII characters (non-ASCII ones are counted separately) are there on their icons. Your code should ...
19
votes
8answers
1k views

Draw an ASCII house

This is a window: --- | | --- Let's add some walls |. Put two spaces on either side of it so that the window has plenty of room. | --- | | | | | | --- | Now let's add a roof and a ceiling. ...
26
votes
7answers
713 views

Surrounding Countries

Ever wonder what countries surround another? I do too, sometimes, and, well, here's the challenge for it. I have provided a list of countries and the countries that they touch that you must recognize ...
50
votes
10answers
3k views

Quack the Angry Duck

No one is quite certain what the emoticon >:U is intended to represent, but many scholars believe it looks like an angry duck. Let's assume that's the case. Task Given an integer n between 0 and ...
6
votes
1answer
173 views

It's the end, but the code-golf has been prepared for

Welcome to BBC Casting. We need a program that we can use to select a new actor to play The Doctor on Doctor Who. In the spirit of the show, your program will perform a regeneration from one actor's ...
31
votes
9answers
4k views

Picture of an old friend in ASCII art

I hope this picture looks familiar to you. It's one of Pacman's ghosts in his "vulnerable" state, after Pacman has eaten a power pill. The challenge Picture our ghost in a little frame, using ...
6
votes
3answers
187 views

LaTeX Table Generator

Write a function or program which, given a number of lines and columns, generates a corresponding tabular environment for LaTeX with no data in it. Table format and tabular Environment Here is an ...
7
votes
6answers
454 views

Put on your sunglasses

Introduction You are probably familiar with the "puts on sunglasses" emoticon-meme: (•_•) ( •_•)>⌐■-■ (⌐■_■) In this challenge, your task is to take the first line as input, and output the last ...
1
vote
1answer
147 views

Output the given English pronoun table

Output the provided table of English pronouns exactly, in as few bytes as possible. Code rules The code will take no input The table is tab-delimited Each line begins with a single tab \t if there ...
7
votes
2answers
128 views

Convert to ASCII Agrippa Numbers

Challenge Given a natural number, output it in the ASCII form of Agrippa's number system. Description I like odd alphabets and numeral systems. My favorite numeral system is one given by Heinrich ...
28
votes
27answers
3k views

Output all the white or black squares of a chessboard

Introduction This is how a chessboard looks like. You can see that a1 is a dark square. However, b1 is a light square. The Task The challenge is, given dark, light or both, output all the dark,...
14
votes
6answers
764 views

Output the current time in ascii art

Challenge Your task is to output the time (in 12 hour time) in ascii art. All characters that will be used are as follows: ___ __ ___ ____ _ _ _____ __ ______ / _ \ /_ | ...
10
votes
3answers
662 views

How many words of power did I shout?

In Skyrim, the player character can use powerful magic shouts (Thu'ums) to achieve their goals. Every shout consists of three words, however, the player can use the first one or two words to achieve ...
12
votes
11answers
2k views

Convert English to a number without built-ins or libraries

This challenge is similar to this other, however I made a restriction (see bold text below) that I think would made it much diffent and (I hope) fun either. The Challenge Write a program or a ...
4
votes
11answers
698 views

Print cos(2π/17) exactly

One way to construct a regular heptadecagon starts with drawing a horizontal line of length 1 from the center to a vertex. Then the distance along that line from the center to the second vertex is cos(...
11
votes
31answers
3k views

Go generate some Java

Your boss wants you to write code like this: public static boolean isPowerOfTen(long input) { return input == 1L || input == 10L || input == 100L || input == 1000L || input == 10000L |...
31
votes
51answers
4k views

Generate 100 Java Tuple classes

Write a script that writes to standard output, or your language's equivalent, 100 lines of (valid) Java code that begins with: class Tuple1 {public Object _0;} class Tuple2 {public Object _0,_1;} ...
9
votes
2answers
190 views

Output all valid classful public unicast IPv4 addresses

IPv4 addresses are 32 bits wide, and thus the size of the address space is 232, or 4,294,967,296. However, this is only a theoretical upper-bound. It is not an accurate representation of all the ...
12
votes
4answers
368 views

Strategies for representing a given large integer using arithmetic expression

I have a specific number in mind, but it's part of a challenge I'm doing, and I don't want people to do (all) the work for me. Here is a number which has the same digits, but shuffled: ...
11
votes
12answers
2k views

Eeny, meeny, miny, moe

Introduction The childhood song Eeny, meeny, miny, moe was often used to select who was "it" when playing tag. Everyone would stand in a circle and point at one person selected at random. They ...
5
votes
1answer
120 views

Encode bytes to PGP wordlist format

The PGP Word List is a set of 512 English words for verbally communicating strings of bytes, such as authentication codes or hashes. It is used in secure VoIP software as well as in some other ...
6
votes
2answers
243 views

Build an English word syllable counter

Write a program or function to estimate as closely as possible the number of syllables in English words. The input list is here: 1000 basic English words. There are only 997 words because a few ...
22
votes
13answers
2k views

Create an ASCII-to-hex table for Mark Watney

Inspired by this SciFi.SE question. Background (with minor spoiler): Challenge With no input, output the following ASCII table exactly like this: Dec Hex Dec Hex Dec Hex Dec Hex Dec ...
8
votes
15answers
466 views

Chinese Zodiac of the year

2015 was the year of the goat! In this challenge, you will figure out which animal represents the year. To avoid making this challenge to complex you won't need to calculate Chinese new year. Because ...
5
votes
6answers
231 views

Using Symbols for Letters

Input: A single word as a string (matches [a-zA-Z]+). If the input doesn't follow these guidelines, print "Error" (but no error should be thrown) Output: The NATO pronunciation of the word. Print ...
25
votes
6answers
408 views

What song is playing?

Inspired by this xkcd You work for Shazam and they have a project for you. Some customers are complaining about their app taking up too much space on their phone, so they want you to code a lite ...
1
vote
0answers
52 views

Merry Christmas (and a Happy New Year) [duplicate]

The goal of this challenge is to create a program that outputs a string depending on the time of year. Output If the date is December 25, output: Merry Christmas! If the date is December 31 or ...