Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [optimization]

A mathematical puzzle where you have to optimize a certain objective function (maximize profit, minimize cost).

17
votes
3answers
3k views

Knights and jokers

There are $N$ men. $K$ of them are knights, $M$ of them are jokers. $N$ is known, $K$ and $M$ are unknown. You know that: $K + M = N$, $K \gt M$, $M \ge 1$, $N$ is odd. Knights always tell ...
54
votes
10answers
40k views

A camel transporting bananas

A somewhat well-known puzzle is described as such: You have a pile of 3,000 bananas. You wish to transport them to a place 1,000 miles away on the back of a camel; however, the camel can only carry ...
30
votes
7answers
5k views

Dinosaur egg drop

Archeologists discover two dinosaur eggs, and you are given the chance to test the durability of these eggs (bad move on their part). Suppose that these eggs will absorb a specific amount of force ...
10
votes
6answers
7k views

1 Fake Coin among N Amount of coins

You are given $N$ coins which consists of only $1$ fake coin. You also have a sensitive old-fashioned Pan Balance Scale. You are asked to find the fake coin in totally 5 times weighing on the Pan ...
53
votes
8answers
5k views

Find a straight tunnel

There is a circular area with radius 1 km. And there is a tunnel, which is just under the surface, but invisible - unless you dig. It is known that the tunnel goes under the area (at least touches it ...
2
votes
2answers
2k views

The case of the 4 campers and the rickety bridge! [duplicate]

Four people need to cross a rickety rope bridge to get back to their camp at night. Unfortunately, they only have one flashlight and it only has enough battery left for seventeen minutes. The bridge ...
10
votes
1answer
255 views

Barrel - Part 3

An entry in Fortnightly Topic Challenge #35: Restricted Title 1. Title based on this xkcd. This is a continuation of Barrel - Part 1 and Barrel - Part 2, but this puzzle is still self-contained. ...
12
votes
7answers
3k views

Fastest way to collect an arbitrary army

I am looking for solution of this puzzle: There is a kingdom with a square shape with sides of length 1. The castle is located at the center of the square. At the castle the king lives under the ...
7
votes
3answers
787 views

Dinosaur Egg Drop v2

This question is a little different and kinda follow-up version of Dinosaur Egg Drop 1- You have 100 story building and 6 Apatosaurus dinosaur eggs. 2- You have 81 story building and 3 ...
19
votes
6answers
2k views

Trapped in my Cellar

I have taken Doorknob hostage in my cellar. He is "perfectly" trapped - solid walls, solid floor, solid roof, no windows, etc. The only way out is a steel door and the only way to unlock the door is ...
8
votes
1answer
2k views

99 chips into more chips

You are at a casino in Vegas and you have earned 99 chips by playing poker! While you are checking out a slot machine, someone comes to you and congratulates you that you have a chance to make more ...
12
votes
3answers
806 views

Day and night of the two timers

            Make a non - 24 - hour day /  night cycle       &...
7
votes
3answers
731 views

Odd hours with two timers

Two motorized 24-hour light timers are daisy chained between a power outlet and a light bulb. For these timers, devise schedules and choose initial times that produce the following repeated 9-hour ...
9
votes
2answers
356 views

Third timer's a charm

Three motorized 24-hour light timers are arranged between a power outlet and a light bulb, with timer A parallel to a daisy chain of timers B and  C. For these timers, devise schedules that ...
8
votes
3answers
531 views

Halve time with two timers

Two motorized 24-hour light timers are daisy chained between a power outlet and a light bulb. For these timers, devise schedules and choose initial times that produce the following repeated lighting ...
46
votes
6answers
4k views

Eight coins for the fair king

You are responsible for creating new types of coins for the court. King respects the forgetful: he wants you to create 8 coins of different value, no more. King respects the feeble: he wants that any ...
29
votes
5answers
6k views

Two spies throwing stones into a river

There is a puzzle about two spies: Two spies must pass each other two secret numbers (one number per spy), unnoticed by their enemies. They have agreed on a method for doing this using only 26 ...
35
votes
11answers
4k views

Sudoku net that is always solvable

A sudoku net is a 9x9 grid where every cell is either (blank) or has a cross (block). A random solved sudoku is chosen. The net is placed on top of the sudoku (in any of the 4 ways). We can only see ...
20
votes
7answers
2k views

How much water do you need to cross the desert?

This question is inspired by Terry Pratchett's "Small Gods," in which an army crosses a vast desert by making multiple trips and caching water along the way. 1. Provide an answer. 2. I doubt I'm the ...
12
votes
2answers
4k views

Connect four towers by roads

Four guard towers are situated in a square formation of side length 1km. A general wants to build roads to connect the towers so that one can walk from any tower to any tower along the roads, possibly ...
11
votes
4answers
1k views

Get 6 pawns in file A or H

This is somehow inspired by my other chess related question: Possible pawn combinations How can you get 6 pawns (white or black) on a chessboard on the files A or H using legal moves? Start with a ...
10
votes
2answers
413 views

Turn on all squares

Take a square grid of size $a\times b$, with all squares being off. You can tap a square, to reverse the state of that square and all squares located in the same column and row as the tapped square. ...
14
votes
2answers
1k views

How many clues are required to ensure Einstein's Puzzle is solvable?

I used to play Einstein's puzzles a lot when I was younger, and very quickly learned to assess quite rapidly whether I thought a puzzle would be a quick solve or more time-consuming, but I never ...
9
votes
3answers
2k views

$n$ couples crossing a river

There are $n$ couples on one side of the river. Nobody is on the other side. They have a boat that accommodates up to 2 people. For every trip across, someone(s) must bring the boat back as well. The ...
1
vote
1answer
270 views

The counterfeit coin [duplicate]

You have 9 coins. One of the nine is counterfeit. The counterfeit coin can be distinguished by weight - it is heavier than the rest. Using a balance scale only twice, find the counterfeit coin.
27
votes
10answers
3k views

One prize, infinitely many choices

Having reached the final stage of a game show, you face an endless row of doors labelled $1$, $2$, $3$, ... The game show host has selected a whole dollar amount, and has put this exact amount as a ...
31
votes
6answers
5k views

Will a greedy algorithm solve Tatham's Flood?

I was just investigating some of the puzzles on Simon Tatham's website, and came across Flood, in which we start with an $n\times n$ grid of cells each of which is filled with one of $k$ predetermined ...
26
votes
6answers
5k views

A Special Parking Lot

There is a special kind of parking lot that stores special 1x1 cars that only can move to adjacent squares not including diagonals if they are empty (provided no car occupies the square). Every car ...
11
votes
4answers
968 views

30 fake coins out of 99 coins

You are given 99 coins which consists of 30 fake ones. You also have a digital balance scale with perfect precision that shows how much difference between weighs you put on. For example, if you put 10 ...
23
votes
3answers
946 views

How much money can we make?

My five friends and I used to loan each other money all the time. But over the past several years we have moved apart. We don't trust PayPal, banks, or the postal service so transferring money over ...
16
votes
5answers
760 views

Maximize the number of paths

You have exactly 990 edges. Assemble them into a simple undirected graph with two distinguished vertices A and B, such that the number of different simple paths from A to B is as large as you can make ...
11
votes
1answer
563 views

Blindfolded and disoriented near a space station

Following on from the recent blindfolded near the great Wall of China puzzle. Suppose you are floating in space a mile away from a huge space station (the death star perhaps). Assume that the death ...
9
votes
6answers
729 views

Lots of Gold Stacks and a Balance Scale

You are given X amount of stacks of golden coins, each stack consisting of ten (10) golden coins and a digital balance scale with perfect precision that shows how much difference between weights you ...
8
votes
2answers
358 views

16 Two Colored Line up

We have a different type of puzzle which consists of 4x4 board with numbers on it; Your task is to put numbers in the correct order as given in the diagram above. In each step, you can take one ...
30
votes
5answers
3k views

Biggest army on a chessboard

Reminder: Everybody knows that we can place 8 queens in a chessboard without threatening each other (see here). Same reasoning can be applied for knights, bishops, rooks and kings. Giving ...
16
votes
4answers
932 views

Universal dissection

Alice has a squared paper 8 by 8. She cuts out one 1x1 square from it, at row N, column M. Bob cuts the rest of the paper into pieces. Once he is done, Alice asks Bob to put the pieces together in a ...
6
votes
4answers
2k views

Coloring the Chess Board

We have 8x8 Chess board like grid (8x8 2D matrix) and we are trying to color every single square/cell. But the rules are interesting; You may start from any square you want and color that square for ...
5
votes
4answers
642 views

A tour of 36 cities

Each of 4 people is touring 36 cities separately. Each of the 36 squares in the illustration below represents a city. To make the answers shorter, each city has been given a 1-character name, from A-Z,...
8
votes
4answers
759 views

Make the largest box from a cardboard sheet

A boy in order to tidy his room asks his parents for a cardboard box to store lots of small toys. Unfortunately they didn't find any but only a raw cardboard sheet of dimensions ...
7
votes
3answers
558 views

What is the minimum number of steps to solve this cloning particles on chessboard puzzle?

I'm creating a puzzle based on the idea from this numberphile video: pebbling a chessboard. You can see a working (yet unfinished) version here. I would like to give the user a feedback of how well ...
2
votes
3answers
375 views

Optimal path around a variable-position wall [closed]

This is a harder version of the fixed wall variation. Every day you walk across a flat plane from a point $A$ to a point $B$. The points are $3$ miles apart. However, every day there is a 50% ...
0
votes
2answers
256 views

How can 32 teams rotate through 8 games without overlaps? [closed]

So I have to arrange a rotation schedule for a tournament. We're aiming for 32 teams. There will be 8 stations and 4 teams competing simultaneously at each station. We want all 32 teams to hit each ...
9
votes
1answer
249 views

Get 6 pawns in file A or H without promoting

This is wholly inspired by Get 6 pawns in file A or H Is it possible for either white or black to get 6 pawns of the same colour in file A or in file H (you must choose one) without promoting?# If ...
9
votes
1answer
590 views

Maximize 'chains' in a Sudoku

Yet to be solved. Take 2 numbers such that $N, M \in \{1,2,3,4,5,6,7,8,9\}; N \ne M$. Start with a solved 9x9 Sudoku grid. Find any $N_1 = N$. Find an $M_1 = M$, in the same row as $N_1$. In the ...
7
votes
1answer
550 views

This ant sure is smart. But how fast is it?

A mad scientist uses ethically questionable methods to study the spatial cognition of ants. Last time, he left his lab ant in a cubic room and filled it with painfully intoxicating gas, capable of ...
4
votes
2answers
495 views

Lock Optimisation

In a simple combination lock, a sequence of several digits is used as a password, with one wheel per digit. Generally, it is not possible to unlock the lock without knowing the password, but due to ...
2
votes
2answers
261 views

How many different results?

$a,b,c,d,e,f,g,h,i$ are real numbers and you would like to calculate the equation below by adding as many paranteses as you want: a-b^c-d/e+f/g^h*i What is the maximum amount of different results ...
2
votes
3answers
165 views

Make the largest box from a cardboard sheet Chapter #2

Please see: Make the largest box from a cardboard sheet Thanks to his older brother's friends: @Oray, @Weather Vane and @mlk, the boy managed to make as large cardboard box as possible. Unfortunately,...