Questions tagged [kolmogorov-complexity]

Kolmogorov complexity, informally, is the amount of code it takes to describe or produce a constant object, such as a string or image. When posting a challenge in this category, please make sure it adds something new to existing challenges.

Filter by
Sorted by
Tagged with
14 votes
10 answers
858 views

Kolmogorov Flexibility. A.K.A. Sale! \$38\%\$ Off All Codegolf While Stocks Last!

This is a restricted-source, kolmogorov-complexity, code-golf challenge to produce a fixed output with no input. The output format, however, is flexible - it may be printed to standard out, printed to ...
9 votes
14 answers
947 views

Simulate a Cisco Ping

Premise: For those in networking, you've most likely sent a ping to or from some device to make sure everything's properly connected. Cisco, a popular company in networking[citation needed], has a ...
  • 4,042
36 votes
51 answers
5k views

Print all lexicographically increasing numbers under 10000

A lexicographically increasing number is an integer whose digits are in strictly increasing order. Print all lexicographically increasing numbers under 10000. Here are lines of the expected output: ...
44 votes
25 answers
12k views

Tribute to Stan Lee

Unfortunately one of the greatest comic book writers passed away yesterday afternoon. Lots of Hollywood stars, musicians, actors, and many other people are paying tribute to this awesome writer, so we ...
21 votes
46 answers
2k views

Multiplicity Test

Use any programming language to display numbers between 1 and 99 (including both) in such a way, so that: the numbers are separated by single space, if a number is divisible by 3, it should be in ...
  • 1,139
-12 votes
21 answers
485 views

Sequence and Series

Use any programming language to display numbers divisible by 1000000 that are greater than 1 and less than 10000000. Each number should be displayed in new line. Your program should display exactly: <...
  • 1,139
24 votes
17 answers
3k views

Bake me a slice of cake

My birthday is in a month, and this is a slice of tasty cake. ...
  • 43.1k
10 votes
26 answers
2k views

Let's play tennis 2: east-west game

There is a challenge Let's play tennis by Daniel. He proposes to place a court in the North-South direction. My proposal is to create a court to play tennis in the East-West direction too. You ...
  • 6,975
7 votes
61 answers
3k views

String analyser

Use any programming language to display "AWSALILAND" in such a way, so that each letter is in a new line and repeated as many times as its position in the English alphabet. For example letter, (A) ...
  • 1,139
39 votes
54 answers
10k views

List all possible titles for the Anno games

In the Anno video game series there are 6 games with a 7th one announced for early 2019. Their titles always feature a year in a specific pattern: ...
  • 25.5k
19 votes
35 answers
3k views

Text compression

With the given text below, there are some words in the text that repeats several times in the text. Use any programming language to write a short code that compresses the text to display it. Or in ...
  • 1,139
24 votes
69 answers
6k views

Display numbers lacking 2's

Display numbers from one to one-hundred (in increasing order), but number 2 shouldn’t appear anywhere in the sequence. So, for example, the numbers two (2) or ...
  • 1,139
7 votes
45 answers
2k views

Letters challenge

Using the word “conemon” print each character 2 times more than the last. The first letter, “c”, should be printed 10 times, the second 12 and so on. Each repeated-letter-string should be printed on a ...
  • 1,139
13 votes
33 answers
4k views

True color code

True color (24-bit) at Wikipedia is described in pertinent part as 24 bits almost always uses 8 bits of each of R, G, B. As of 2018 24-bit color depth is used by virtually every computer and ...
27 votes
29 answers
5k views

Output a Sudoku board

Today's challenge is simple: Without taking any input, output any valid sudoku board. In case you are unfamiliar with sudoku, Wikipedia describes what a valid board should look like: The objective ...
  • 57.9k
39 votes
37 answers
6k views

Display a clock face

Display the 12 numbers on a clock face exactly like this: ...
  • 141k
21 votes
8 answers
2k views

Belarus rushnyk

We've got quite a few national flag challenges already: AU CH FI FR GB GB IS KR NP US... Here's another, somewhat more advanced one: Return or print the decorative pattern from Belarus's national ...
  • 15.1k
17 votes
40 answers
2k views

Alpha-Numerical Bowtie

Output this exact text: ...
  • 43.1k
35 votes
66 answers
10k views

Generate a deck of cards

Here's an array representing a standard deck of cards, including two Jokers. ...
  • 11.4k
0 votes
13 answers
729 views

Beginners 10x10 multiplication matrix [duplicate]

I was looking for a very easy task to look how short of a code can be produced on a beginners exercise. The goal is to produce a simple table that looks like this common java/c# code is about 4 lines....
26 votes
57 answers
3k views

Orthodiagonal steps

It's a common problem to navigate in a 2D matrix. We've seen it many times and will see again. So let's help future us and develop the shortest solutions to generate all eight possible steps in a 2D ...
  • 3,386
1 vote
0 answers
106 views

Golf a bit-reversal table [duplicate]

The Premise: You are writing a C driver for a screen for use on an embedded system. The screen uses a tortured version of SPI that requires data to be sent LSb (least-significant-bit) first, but MSB (...
25 votes
34 answers
4k views

You must construct ASCII Pylons!

Cross posted from my anagolf post (note: may contain spoilers, post mortem). Output the following text exactly. You may have additional trailing whitespace on each line, and trailing newlines as ...
25 votes
4 answers
527 views

Race Around the Track

I'm looking to find the fastest racer around. Show me your fastest lap around this 18x14 track shown below. ...
  • 913
11 votes
16 answers
2k views

find the pattern in this number sequence of 1's and 0's

Write the shortest program or function which generates these 1000 numbers or a sequence (0- or 1-indexed) which begins with them. ...
9 votes
9 answers
679 views

99 Varieties of Dosa

99 Varieties of Dosa is a popular chain of roadside dosa stalls across South India. This is inspired by a combination of this chain and the classic CodeGolf challenge "99 Bottles of Beer". Recreate ...
  • 133
4 votes
6 answers
927 views

The house that Jack built [duplicate]

So, there's a famous children's rhyme... ...
  • 11.4k
-1 votes
5 answers
307 views

Yet another "draw a box" Question [duplicate]

The following problem is a common interview question, thus dull answers are discouraged. Go short or creative, best if both: Create the following pattern ...
  • 147
21 votes
9 answers
2k views

Fizz Buzz with unique characters in columns

Inspired by Digits in their lanes and 1, 2, Fizz, 4, Buzz Introduction Your task is to generate exactly the following output: ...
  • 3,627
21 votes
42 answers
4k views

The next colour

Challenge Consider the rainbow as seven colours, represented by strings as Red Orange Yellow Green Blue Indigo Violet. Your task is to create a program that ...
  • 846
29 votes
46 answers
4k views

Which Card is it?

Introduction Long ago, when I used to code card games with usual playing cards, I used to specify a number for each card and call a function with some number to get a card. This somewhat inspired me ...
  • 5,250
5 votes
3 answers
638 views

Make a hammer animation

The goal is to make a two frame animation with ASCII art of a hammer smacking a table. Trailing white-space is allowed and the frames need to repeat continuously. The program should iterate over both ...
user avatar
18 votes
15 answers
2k views

Golf the Chinese 9*9 multiple table

Output the following table: ...
  • 17k
33 votes
5 answers
2k views

Left Hand vs. Right Hand — Typists Challenge

Your task is to pit each side of the keyboard against each other and build two programs, in the same language, one using only keys on the left-hand side of a standard keyboard that outputs ...
  • 22.7k
36 votes
33 answers
9k views

Create a Magic 8 Ball

As a child, my friend had a magic 8 ball that we would ask questions to and see what the fate of that question was. Challenge Your challenge is to write a program (or function) that when run (or ...
37 votes
39 answers
4k views

Hast Thou Slain the Jabberwock?

Your task is to output the exact string The Jabberwocky without taking input. Normal rules for input and output apply, so both functions and programs are ...
  • 94.1k
10 votes
5 answers
423 views

Continued Fraction of Digit-wise Sum of Square Roots

Introduction Your task is to generate the first 1000 terms in the continued fraction representation of digit-wise sum of square root of 2 and square root of 3. In other words, produce exactly the ...
  • 3,627
-5 votes
6 answers
356 views

Print the numbers -1, 0, 1

This is a very simple challenge, and it is to print the numbers -1, 0, and 1. The following ...
  • 467
29 votes
14 answers
8k views

Print "Hey Jude" from The Beatles

Your task is to write a program which prints following four verses extracted from the lyrics from The Beatles' song "Hey Jude" (© Sony/ATV Music Publishing LLC): ...
  • 793
39 votes
45 answers
7k views

Kolmogorov shifter

Output or display the following three lines of text, exactly as they are shown below. A trailing newline is accepted. ...
13 votes
4 answers
842 views

A Zealous "Quick Brown Fox" "Jumped" Along the Groovy Spiral

Introduction Write a program to output the outgoing spiral of the famous pangram following given rules. Challenge A pangram is a sentence using every letter of a given alphabet at least once. One ...
  • 3,627
44 votes
10 answers
6k views

Falcon Heavy stages

Choose a set of four bytes without replacement (i.e. no byte repeated), and not necessarily in any particular order, from any one of the following four sets: The characters of any one single-byte ...
  • 29k
72 votes
205 answers
18k views

The Programming Language Quiz, Mark II - Cops

A repost of this challenge. Meta discussion. Sandbox post. Body of the question similar to the original Robber's challenge This cops and robbers is now (08/03/2018) closed to further competing cop ...
11 votes
13 answers
2k views

List all palindromic prime dates between 0000-01-01 and 99999-12-31

You know what a palindrome, a prime and a date are. Your task is to list all dates in 100 thousands of years that fulfill all three characteristics. Nevermind anything but the numbers, use the ...
25 votes
49 answers
2k views

Confusing Alphabet Staircase

Given no input, output this interesting alphabet pattern in either case (the case has to be consistent) via an accepted output method: A AB ACBC ADBDCD AEBECEDE AFBFCFDFEF AGBGCGDGEGFG AHBHCHDHEHFHGH ...
  • 1,544
25 votes
24 answers
4k views

Traffic direction

Rules Given an ISO3166-1-Alpha-2 country code your task is to decide on the traffic direction for that country: Input will be a valid country code (valid as in it's an element of the two lists ...
  • 16.6k
6 votes
10 answers
589 views

Print the alphabet Christmas tree [duplicate]

I know it's 1.5 weeks after Christmas but trying to print an isosceles triangle in a monospaced font makes it look weird. Challenge Print the alphabet from A to Z so that it forms a filled triangle ...
  • 6,242
42 votes
44 answers
3k views

A Programming Puzzle of Mode Golf

Your task is to print the text Good morning, Green orb!, with every character repeated in place as many times as the most frequent byte in your source (the mode). ...
  • 94.1k
1 vote
31 answers
862 views

Exponential-ish number sequence

Your program must print out this exact sequence: 1 2 4 10 24 54 116 242 496 1006 2028 4074 8168 16358 32740 65506 131040 262110 NOPE! As usual, shortest program ...
  • 9,861
22 votes
3 answers
671 views

Draw an ASCII key signature

Given an input of a note, output an ASCII drawing of the corresponding major key on the treble clef. Here are all the major keys (that don't include double-sharps or double-flats) and their ...
  • 71.2k

1 2 3
4
5
14