All Questions

80 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
24
votes
0answers
1k views

Complement a POSIX Extended Regular Expression

Given a POSIX Extended Regular Expression as input, output its complement (also a POSIX ERE). If the given regular expression matches a string, its complement should not match it, and the regex: ...
18
votes
0answers
546 views

Totally Cubular

Create a program or function to unjumble a 9x9x9 cube of digits by rotating individual 3x3 cubes within it. This is similar to (but, I suspect, a bit harder than) my Flippin' Squares question. Input ...
17
votes
0answers
349 views

Acyclic orientations of an n-dimensional cube

The goal of this challenge is to check and extend the OEIS sequence A334248: Number of distinct acyclic orientations of the edges of an n-dimensional cube. Take an n-dimensional cube (if n=1, this is ...
16
votes
0answers
671 views

How should I tile my kitchen?

I recently ordered some new and colorful tiles to replace my boring old white tiling for my kitchen. However, when the tiles arrived, they were all in a weird shape! Therefore, I need a program to ...
15
votes
0answers
427 views

Write a program that checks the consistency of modern mathematics

Modern mathematics has been formalised using set theory by various systems of axioms. Zermelo Frankel set theory with the axiom of choice (ZFC) forms an intuitive set of axioms and is hence most ...
15
votes
0answers
475 views

How to golf string output in Chef

I'm attempting to solve a programming golf style programming puzzle. I need to write an 18 character phrase in Chef in less than 32 "lines" of code. In this case, a line counts as an ingredient or an ...
13
votes
0answers
204 views

Fix Brain-Flak push-pop redundancy

Brain-Flak is a stack-based esoteric language with eight commands: ...
12
votes
0answers
175 views

Score a 1 player game of Carcassonne

Carcassonne is a tile-based game, where the objective is to construct Roads, Cities and Monasteries, in order to score points. The game works by players taking turns to draw and place tiles to ...
12
votes
0answers
210 views

Compare Dowker Knotation

Dowker notation is a common way of representing mathematical knots. Dowker notation can be derived from a knot diagram in the following way (based on the description from the wikipedium): We will ...
12
votes
0answers
515 views

Please parse this aLL1en language

Background Due to some unfortunate accident during coding you are now teleported and stranded on an alien planet. You really hope that the locals will be helpful and point to the general direction of ...
11
votes
0answers
194 views

Checkerboard the Matrix

Task Given a matrix, your program/function should output a row-equivalent matrix in checkerboard form ( \$A_{ij}=0\$ if and only if \$i+j\$ is odd). Two matrices are defined to be row-equivalent if ...
11
votes
0answers
804 views

Find a Glider Synthesis (Game of Life)

Challenge Summary In summary, the challenge is to provide the glider synthesis for a Game of Life configuration, which is your input. What does this mean? Well, firstly, let me explain a few terms. ...
11
votes
0answers
436 views

Simulate a Game of Quagmire

Background Many moons ago, in a galaxy much like our own, a young BrainSteel attempted to invent a board game. He believed that he, too, could find an amazingly simple set of rules that would generate ...
11
votes
0answers
738 views

Delivery Robots and Destroyer Drones

Program your robots to deliver packages in a warehouse infested with destroyer drones. Avoid the drones and get your packages to the right place as fast as you can. Delivery Robots There are ...
11
votes
0answers
2k views

Best Scoring Scrabble Board

Challenge Your challenge is simply to write a program in the language of your choosing that when run, determines the highest possible score for a board of Scrabble - For the sake of this challenge, a ...
10
votes
0answers
220 views

Tips for Golfing in SQLite?

I was looking for this page to help me enhance my first answer with SQLite, but I couldnt find one. So here we are! What general tips do you have for golfing in SQLite? I'm looking for ideas that can ...
10
votes
0answers
243 views

Generate Menu Access Keys

This is thematically similar to Generate keyboard shortcuts for a menu, but its actually a pretty different challenge. Let's take PHPStorm's menu as an example: ...
10
votes
0answers
319 views

The knight's next tour

We've all heard of the Knight's Tour puzzle: find a route for a knight that passes through all the squares on a chess board. But let's be honest, it's a little bit boring. So, let's give the knight a ...
10
votes
0answers
480 views

mini SPICE solver

SPICE is an electrical circuit simulation program originating from UC Berkeley. Your goal is to implement a minimalistic version which can solve for the nodal voltages and branch currents of a circuit ...
9
votes
0answers
205 views

Final tribute to John Conway: FRACTRAN self-interpreter

It's time to conclude the series of John Conway challenges of mine. Background A FRACTRAN program consists of an ordered list of fractions. The program starts by taking a single integer as input. ...
9
votes
0answers
236 views

Leon's shooting range problem

Leon's story Leon is a professional sling shooter and he comes to a shooting range everyday to practice. A casual target is not a challenge for him anymore so before shooting he first covers the ...
9
votes
0answers
417 views

Total Derangement (Difficulty Level: Hard)

The problem: Write a function which, given a cycle length n and a number of cycles m, where 'm' is within ...
9
votes
0answers
234 views

Expand the variadic expression

One of the cool features introduced in the C++11 standard is the ability to declare a template parameter as being variadic; i.e. that parameter represents a sequence of an arbitrary number of ...
9
votes
0answers
278 views

Simple predictive keyboard CG

In honor of recent news of Google developing a keyboard for iPhone... Your input (for simplicity, all input is case sensitive): Location of standard dictionary file. File format is 1 valid word per ...
9
votes
0answers
556 views

Up 12 at 4 it's

Introduction On BBC Radio 2, on Saturdays there's a show hosted by Tony Blackburn called Pick of the Pops. Here, Tony selects a random week from a random year (in the range 1960-1989), and plays the ...
9
votes
0answers
557 views

Printing the Cracker Barrel Game

Revised formatting and instructions Given a list of moves for a Cracker Barrel peg board game, or as @Steveverrill stated, Peg Triangle Solitaire: ...
8
votes
0answers
128 views

Cover positions with snakes of same 'colour'

Imagine a grid where the origin square \$(0,0)\$ is at the top left of the screen, and positive \$x\$ is rightwards whereas positive \$y\$ is downwards. Coloured squares are at various positions on ...
8
votes
0answers
309 views

Morpion solitaire

Morpion solitaire This is a game that I remember having learnt from my grandparents in my childhood. Initially I didn't know the name. G B has found it to be Join Five (or less ambiguously - Morpion ...
8
votes
0answers
239 views

Make Korean Character Multi-style Ascii/Box Art

About Hangul As I'm Korean, I'm really proud of Korean character, Hangul(한글). Hangul is artificial character made by King Sejong the great, 4th king of Joseon dynasty, at 1443. Because today(...
8
votes
0answers
341 views

Recording xiangqi moves

The game of xiangqi, also known as Chinese chess, is a chess-like game popular in China, Vietnam, Taiwan, and other East Asian countries. The colours of the two sides in xiangqi are red and black. ...
8
votes
0answers
341 views

The N Queens Problem, but with Fairy Chess Pieces

Fairy Chess is a sort of generalized chess that allows unconventional pieces. The eight queens puzzle is a classic problem where you have to put 8 queens on a chess board such that no two queens ...
8
votes
0answers
343 views

Don't break the bridges!

Introduction: You are a worker, who is in charge of managing a set of bridges, connecting a square grid of "nodes": ...
8
votes
0answers
303 views

Code Golf: BlackJack - best moves

The Challenge I was looking into small code examples for a specific language as a small tutorial and came accross a simplified Blackjack that should be implemented. In this Challenge you will have to ...
8
votes
0answers
524 views

Find a dual graph

A dual graph is defined such that for every "face" in a graph G, there is a corresponding vertex in the dual graph, and for every edge on the graph ...
8
votes
0answers
621 views

Encode a steganographic encoder into a package

Introduction By steganography we mean hiding a message along an existing text or image so the result would be unsuspicious of the existence of the original message. This challenge is about hiding ...
8
votes
0answers
452 views

Chaining autograms

Write a program that takes one integer input n and one format letter and outputs n autograms in the format This sentence contains ? "A"s, ? "B"s ... and ? "Z"s. ...
8
votes
0answers
690 views

Generate Loopy puzzles

Loopy is a puzzle game from the collection of Simon Tatham. The previous link contains a javascript implementation of a Loopy puzzle generator. I suggest everybody who wants to attempt this challenge ...
8
votes
0answers
430 views

Write a FAST word equation solver

This question is similar to Write a word equation solver by David Frank but different in three important ways: (1) David asked for just the first solution found, and I am asking for all the solutions. ...
8
votes
0answers
1k views

Simple chess bot

Inspired by this Implement simple chess bot (with console or GUI) that has following features: [Pseudo-]graphically showing the board; Accepting user moves and making their own moves; Playing by ...
7
votes
0answers
211 views

Shift Tac Toe - Code Golf Challenge

Shift Tac Toe Shift Tac Toe is a game that combines Tic Tac Toe and Connect 4 together. In this game, you start with a 3 by 3 board, and each row is connected to a slider that you can move left and ...
7
votes
0answers
365 views

Finding Radical Ideals

Sandbox Finding radicals of arbitrary ideals in rings is hard! However, it's a doable task in polynomial rings, since they are Noetherian (all ideals are finitely generated) Background A quick ...
7
votes
0answers
205 views

Fastest way to iterate over sublattice of discrete lattice

I need to construct a functor that iterates over the linear representation of a sub-lattice of size \$d_x,d_y,d_z,d_q\$ embedded in a lattice of size \$n_x,n_y,n_z,n_q\$. The sub-lattice corner is ...
7
votes
0answers
296 views

Radiation is Painful

A radiation-hardened quine can take a hit and stay standing, but nobody ever said that the quine can't be a wuss about it. For this challenge, you should write a quine that: If no characters are ...
7
votes
0answers
392 views

Goldbach's Comet

Back to back challenges I guess. Hopefully this one is more clear than the last. Background I was playing around with Goldbach's conjecture, and decided to plot evens (on the x-axis) vs the number ...
7
votes
0answers
391 views

Get ERC-20 token balance

Ethereum is a blockchain platform. It has its own native cryptocurrency, ether, but in this challenge, we'll be focusing on its ability to run smart contracts. The ERC-20 standard describes an ...
7
votes
0answers
204 views

Find the smallest triangle encompassing the specified polygon

Input: An integer N which represents the polygon's vertices and a list of their x and y coordinates. Expected output: The smallest difference possible between the area of the(not necessarily convex) ...
7
votes
0answers
145 views

Tips for golfing in Subleq

Subleq is a programming language with only one instruction. Each instruction contains 3 parameters. Code and data space is the same. How it works: A B C A, B and ...
7
votes
0answers
164 views

Implement FBLint

(FB, or Functional-Basic, as found here Interpret Functional-Basic) Task Implement a linting program for FB, similar to JSLint for JavaScript. Error types Invalid identifier Identifiers can only ...
7
votes
0answers
272 views

Generate net puzzles

An acyclical grid is a mapping of an acyclical graph (that is, a tree) where each node has no more than four edges onto a toroidal rectangular grid such that each cell of the grid is occupied by a ...
6
votes
0answers
308 views

What is the simplest reversible circuit that computes conjugacy of transpositions?

Reversible computation refers to computation in which little or no information is deleted. Reversible computation a major component of quantum computation, and reversible computation is potentially ...

15 30 50 per page