Skip to main content

Questions tagged [algorithm]

A puzzle related to algorithms (a main concept in computer science). Puzzles may ask for an algorithm as an answer or require the analysis of a given algorithm.

Filter by
Sorted by
Tagged with
2 votes
0 answers
96 views

I'm working on a CayleyPy project where we study the diameters of graphs that come from different combinatorial puzzles. At the moment I’m focusing on the Picture-Cube, a 3×3×3 puzzle where each move ...
1 vote
0 answers
179 views

The diamond-shaped Light Out game refers to a Light Out variant with a diamond-shaped grid, characterized by the following structural properties: Total number of rows/columns: $2k+1$ rows (where k is ...
16 votes
2 answers
797 views

There are 100 full water tanks and 100 empty ones. You are given a hose that can connect any two of them in order to equilibrate the water level between them. All the tanks are cubical in shape, of ...
3 votes
0 answers
248 views

I’ve become interested in puzzle games that combine traditional Sokoban mechanics (box pushing) with shortest-path optimization—specifically puzzles where your objective isn’t merely to reach a goal ...
12 votes
2 answers
839 views

A card shuffling machine always rearranges cards in the same way relative to the order in which they are given to it. The thirteen spades arranged in the order A, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K ...
1 vote
3 answers
393 views

This puzzle has a flavor of Hamiltonian puzzles. You are given a set of N rocks placed on a two-dimensional integer grid. The task is to find an orthogonal closed simple path with N orthogonal line ...
1 vote
2 answers
247 views

How do fix this? All other sides are fixed
3 votes
0 answers
254 views

I wonder if there is an algorithm for the worst game to keep as many pegs as possible. I tried to search for "peg solitaire worst score/ max leave" etc, but it’s not quite that. The question ...
1 vote
1 answer
173 views

I implemented the CFOP method in my Rubik's cube solver. Now I am trying to add the Roux method. I couldn't find the right CMLL algorithm for this particular case. After consulting the CMLL algorithms ...
5 votes
1 answer
473 views

You are faced with the difficult task to set up a dungeon for adventurers. However you made a deal with the guild: any adventurer brave enough to beat the dungeon and reach the treasure room will be ...
0 votes
1 answer
3k views

The swap puzzle Place small coins heads up on the squares marked H and tails up on the squares marked T. Swap the positions of the Heads for the Tails in as few moves as possible. There are two ways ...
9 votes
3 answers
1k views

Source: My school teacher, it was just given as a problem statement. Problem: You are given a binary sequence $S$ of up to $10^6$ bits. You wish to set all the bits in the string to $1$, but the catch ...
13 votes
1 answer
1k views

There are four pegs in a row; let's call them A, B, C, and D from left to right. Peg A has a stack of $n$ differently sized disks, sorted in size so the smallest disk is at the top. All other pegs are ...
-2 votes
1 answer
296 views

The problem to solve: Let's say we have a set of $n$ points on the 2D plane. Determine whether it has axial symmetry. My attempt so far: For n=2 the answer is trivially "yes". For n=3 ...
-4 votes
2 answers
1k views

I just wanna learn cubing under 30 secs. Please help me:( As i've already learned the Beginner's method. Is there any easiest way to learn the CFOP method as i am unable to understand this method. I ...
9 votes
3 answers
2k views

I've been looking at Robert Abbott's logic mazes, in particular his Dot maze, and I'm trying to understand how they can be constructed so I can write an algorithm to do this automatically for ...
9 votes
1 answer
1k views

Take a normal 3x3 rubiks cube (the Classic unmodded cube). I know the WCA method for scrambling is to pick a random (valid) cube state and calculate a sequence of moves to go from solved to that state,...
5 votes
1 answer
375 views

Imagine that you are given a box with n nuts and n screws. Each screw have different size (diameter) and on each screw there is ...
5 votes
2 answers
14k views

I have trouble with that edge. Please give algorithm or images for solutions for turning it up so that I can form a cross.
2 votes
1 answer
1k views

I have a problem with solving the "Dispersion V2" puzzle on robozzle.com: The puzzle has a robot that can be moved and turned with a program. The goal of the puzzle is to have the robot ...
user avatar
1 vote
1 answer
1k views

[companion question here] I was given an 11x11x11 Rubik's cube as a gift. It came with a guide book that I have been following to solve the cube. After solving four of the 9x9 sub-centers of the cube,...
17 votes
17 answers
2k views

A group of (possibly over-polite) people have just finished their meal at a restaurant. One of them asks, "Does anyone want dessert?" The table goes quiet. Some of the people might want ...
3 votes
1 answer
206 views

Consider the set $S := \{$ "the number of lies in the set $S$ is a multiple of $n$" $|$ $n = 1, 2, 3, ... , 120 \}$. Question: Which elements/sentences in the set $S$ are true in every ...
5 votes
1 answer
3k views

I have a very strange state on my 4x4 Pyraminx. The green side is solved and the other sides are almost solved, the problem is, on these 3 remaining sides the centers are not solved. The state looks ...
8 votes
5 answers
2k views

Imagine you have a m x n grid which is initially colored white. you can fill in a cell with black color if and only if there are no immediately neighboring black cells (no black cells to the left/...