# Questions tagged [optimization]

A puzzle where you have to optimize a certain objective function (maximize profit, minimize cost). There should ideally be a provable best answer, to avoid making the puzzle into an [open-ended] game.

659 questions
Filter by
Sorted by
Tagged with
793 views

### Tic-Tac-Collatz

Have you ever heard of the Collatz conjecture? Just in case you haven't, I'll summarize it for you! Take any positive integer $n$, if it is even then simply divide it by $2$; however, if it is odd, ...
• 10.5k
1 vote
261 views

### 4x4 grid with the shortest longest path

This is an extension of this beautiful puzzle. This time your task is to find the hardest 4x4 grid. In particular, find a 4x4 grid containing every number from 0 to 9 at least once, such that the ...
• 26.7k
501 views

### Find out the longest path being alive [closed]

Start from any integer. Move horizontally or vertically (not diagonally), and if you come across the same integer more than once you will die. Moving diagonally is not allowed. What is the longest ...
• 163
123 views

### Maximize my flags - 2x2 version

Because Maximize my flags was not solved to optimality by the community, perhaps because the coding required was too harsh, I present you Maximize my four flags. The rules are exactly the same as in ...
• 5,807
810 views

### Paris and Wife Matchstick

Here are two matches dates that I hold with love in my heart: The current sum is 1970 + 1997 = 3967. You must requisition at most 10 matches so that the sum is "as big as possible". We will ...
• 5,807
312 views

### 4x4 word grid optimization

Given that each letter in the English alphabet has a position: $$a = 1, b = 2, ..., z = 26$$ Can you place 16 different letters such that: Each row, column and diagonal forms a 4-letter valid English ...
• 5,807
190 views

### Progressive Daedalian Opus

The 1990 Game Boy game Daedalian Opus is essentially a series of 36 pentomino puzzles. In the first level, however, you only have three pentominos; the rest are introduced in the levels after that, ...
• 3,906
247 views

### Move and Remove

From the initial position Black makes a regular move to an unoccupied square, and removes any piece from the board. Then repeats, alternately making a move and a removal. The objective is for Black to ...
• 6,606
2k views

### A Tetris puzzle made with love

I love designing perfect clear puzzles for my dear friend who loves Tetris. Here's a lovely puzzle I crafted today. Original Puzzle (Warm-Up) Starting with this field, place this exact sequence of ...
• 15.2k
298 views

### Merging knights and blocking rooks

A chess grid is filled with knights and rooks as shown in the following diagram. Each turn you can issue a move in one of 8 directions available to a chess knight. This will move all the knights in ...
• 26.7k
580 views

### Merging knights

A standard 8x8 chess grid is filled with knights. Each turn you can issue a move in one of 8 directions available to a chess knight. This will move all the knights in that direction. If a knight would ...
• 26.7k
320 views

### Board game: Risk (two players)

Consider a game of two players: Player A and Player B. Each of them is assigned with the same number of soldiers. There is a battlefield (like a board game) with 7 tiles numbered 1 through 7 (a single ...
• 51
611 views

### A Complicated Exercise In Addition

Another day, another walk down to the cafe. I was waiting in line for my coffee, wondering what the barista could do this time to make my name look whack. But as I waddled in line, a curious site ...
• 7,940
2k views

### Longest infinite loop of 5 states

This is based on a question I posed in The Nineteenth Byte: What group of 5 states have the longest total name, under the constraint that you must be able to travel from one state to another in the ...
421 views

### How many squares can a limp queen move to?

Consider a large chessboard. A limp rook is a chess piece that moves one step orthogonally, but it turns $90$ degrees after every move. The limp rook makes some moves, not crossing over its own path, ...
• 333
218 views

### Quickest chess stalemate with Queens exchange

Continuing my previous puzzle. If both players cooperate, what is the quickest stalemate in chess that includes a Queens exchange, in a legal game?
• 5,807
237 views

### Quickest mate with Queens exchange

If both players cooperate, what is the quickest mate in chess that includes a Queens exchange, in a legal game?
• 5,807
204 views

### Insert Plus Signs and Add

If you take any integer (in base 10) and insert plus signs, "+", in between its digits (as few or as many as you like), and carry out the indicated sum, you will end up with a smaller number ...
144 views

### A Complex Dash To Stalemate

For today's contribution to PSE, I present a sliding block puzzle! I have a series-helpstalemate in 26 for you all with a relevant question attached. The illegal position is intentional. Objective #1: ...
• 7,940
148 views

### What's the best path through a garden that maximises the ground you can reach but minimises the steps taken?

I'm messing around with this toy problem I came up with. Say you have a yard that's 16 x 16 feet. Each square foot of the grid can either be a paving square for the path or a soil square for plants. A ...
1k views

### An overcomplicated Boat Puzzle

Based on Xkcd's Boat Puzzle At the riverbank, a succession of people have given you a large lump of objects to transport across the river. These are: 101 cabbages 2 goats, one of which eats wolves 4 ...
• 941
1k views

### Laser and mirrors on a 4x4 grid

You are given an empty 4x4 grid. You can place some diagonal mirrors into the cells of the grid. You then fire a laser from some location outside of the grid. The laser travels in a straight line. ...
• 26.7k
147 views

### How can we allocate when we have 150 open slots every day (5 days a week) for those 200 arrivals every day

My question is to solve a very basic problem related to the allocation of slots. Say there are 20 teams with 10 persons in each team. I have 150 open slots every day (5 days a week) for those 20 teams ...
• 101
691 views

### Introducing S-sequences: which is the shortest to contain all integers 1 to 20?

Consider a sequence (finite or infinite) of different positive integers, such as the following, in which the first term is 1, and thereafter the nth term is either the previous term plus n, minus n, ...
193 views

### 42 lines on a chessboard with associated numbers

The 64 squares of a chessboard can be associated with 42 lines as follows: the 8 rows the 8 columns 13 diagonals from north-west to south-east 13 diagonals from north-east to south-west Those ...
• 11.5k
619 views

### All distances different on a chess board

Here is a simple formulation for, I believe, a quite difficult problem. I have played with it, I don't have the answer yet. The question: How many pawns can you put on a standard 8x8 chess board in ...
• 20.9k
375 views

### Minimum number of questions?

This is an interesting puzzle which I've been racking my brain to solve for some time. I've found different variations of this puzzle but it does not seem like this one has been asked before. Here it ...
1 vote
129 views

### Alice and Bob play neighboring sums game version 2

Alice and Bob are playing the neighboring game which is originally a single person game with the aim of getting the highest points at the end. You start with an empty 4x4 grid. At each turn, you can ...
• 1,541
3k views

### Social distancing in a 5x5 room [duplicate]

I have booked a square meeting room that is 5 by 5 meters. Our Covid-19 policy says that each person must be at least 1.5 meters away from any other person. What is the highest number of people that ...
• 26.7k
186 views

### Some blissfully ignorant math?

I was playing around with the code for my game the other day in an effort to create some unique effects. One thing I created was what I called an "ignorant assignment" in which I applied ...
• 10.5k
549 views

### A piece of paper repeatedly cut into 8 or 12 pieces

You are given a piece of paper. It will be cut into 8 or 12 pieces. Each of those new pieces can be cut again into 8 or 12 pieces or left uncut. This process is (theoretically) repeated as often as ...
• 11.5k
283 views

### Pawns and kings, what is the optimal play for white?

White to move. Source: wu riddles
228 views

### The cow and the butcher

Let’s have 12 stalls spaced equidistantly, and a cow traveling between them. In the 12th stall a butcher is waiting with a sharp knife. So the farthest stall a cow wants to reach is the 11th stall. ...
• 2,789
768 views

### Most efficient way for people along the edges of a grid to move to the center

I'm considering a $2k\times 2k$ square grid ($k\in\mathbb Z^+$) with $8k$ highly rational people standing along the vertices forming the perimeter. All of these people want to go to the centre of the ...
• 309
171 views

### Fold the plane four times to get the maximum number of cross points

You have a straight line $l$ in an infinite plane. You can fold the plane along any straight line so the line $l$ becomes two rays with a common starting point. In the picture we fold along line $a_1$...
• 5,145
1 vote
87 views

### How can I find the shortest path solution or even begin to finding the most optimal solution to a weld robot sequencing problem? [closed]

Not sure this belongs here, but I thought I'd ask: How should I come to an understanding of an optimal weld sequence for a weld robot that welds a physical item on a revolving carousel (the gray T ...
347 views

### Filling a grid with skinny trominoes which have arrows on their ends

Let's have a 10x10 square grid with 7 empty small squares. This grid is to be filled with skinny trominoes which have arrows at their ends (see figure 1). What is the maximum number of arrows which ...
• 2,789
715 views

### Spot that puzzle

This diagram solves an occasionally seen member of a well-known family of optimization puzzles.  Spots ● generalize a component that is represented variously in different statements of these puzzles.  ...
• 21.5k
1 vote
332 views

### Egg drop problem for infinite floors [closed]

This is a modification of the infamous egg drop problem, which I have seen formulated as in the following manner: Given $e$ eggs and a building of $f$ floors, how can we find the lowest floor at ...
• 309
472 views

### Clash of the Robinsons

"Ridiculous!" you think "What can be the odds? Either I'm hallucinating or the amateur writing this story plunged to new depths of incompetence." Both being equally likely you don'...
• 13.2k
468 views

### A number like waldo?

What is the smallest whole number that when its individual digits are summed, produces a number 4 digits long? For example, the number $5357$ is no where close since $5 + 3 + 5 + 7 = 20$. Note: I'm ...
• 10.5k
200 views

### What is the most STAMINA-efficient strategy to escape the well?

You are roleplaying as an adventurer under the direction of a sadistic DM who has just thrown your character down a well. In order to escape, you have unlimited chances at a STAMINA check, difficulty ...
• 1,768
305 views

### It's kind-of like Minesweeper

Have you ever played "Minesweeper" or "Lights Out!" and wondered what it would be like to reverse the process? Me too! Say hello to a 10 by 10 grid that I like to call "Number ...
• 10.5k
189 views

### Powerful Octagon

Place different integers on the vertices of an octagon so that the sum of the integers in any two vertices joined by one of its edges is a power of 2. Do so in such a way that the largest integer used ...
461 views

### Longest chain of checks and captures

On a standard size chessboard, with white to move, make a configuration of chess pieces and moves, so that with every move by white the black king repeatedly becomes checked. With every move black ...
• 6,606
522 views

### Find the most unfortunate compact combination of coins to have in LOLandia

You live in LOLandia. Its currency is called 'lulz' and comes in the form of coins and paper banknotes. The smallest paper banknote has a nominal value of 500 lulz. There are six types of coins, each ...
• 448
1k views

### Attacking diagonal queens

What is the least number of queens you need to place on the main diagonal of a 8x8 chess board such that every square is under attack?
• 26.7k
294 views

My students claim that this disconnect four puzzle (fill the grid with crosses and zeros, such that no four equal symbols appear in a row. Rows can be horizontal, vertical, or diagonal) does not have ...