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).

4
votes
1answer
120 views

Dragons and Dragon Slayers

In the Kingdom, there are 7 dragons and 7 dragon slayers. Each dragon has ($\text{index}\times10000$) hit points (i.e. $10,000\to70,000$). Each dragon slayer does ($\text{index}\times1000$) damage (i....
13
votes
1answer
404 views

Keeping a ball lost forever

Suppose you can make a rectangular maze, where each cell (apart from the bottom-right) can contain an arrow in one of the four directions (up, down, left or right) of your choosing, except for those ...
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,...
8
votes
4answers
756 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 ...
2
votes
1answer
158 views

Tokyo Metro puzzle special #2: The tour of the Metro

This is a simpler puzzle: How many stations do you have to pass by to pass by every station of the Metro? map Please either 1) explain your solution or 2) make an image of the route. Once consensus ...
6
votes
7answers
308 views

Find minimum number of meeting periods to reach 2 degrees of separation for a group [closed]

I am running a training course and I want to arrange a set of 1:1 meeting periods between the participants such that at the end of the day there is a maximum of 2 degrees of separation between any of ...
5
votes
1answer
162 views

What is the optimal way to play standard Battleship?

I've seen the questions on this site with modified Battleship, but I haven't seen one for the standard variation. So - what is the optimal strategy to win this game?
7
votes
3answers
205 views

Distinct Arrangements of Balls on Tiles

You want to put several balls on $8 \times 8$ tiles, such that all $16$ ball arrangements on its rows and columns are different. What is the minimum number of balls to be put? Two arrangements of ...
3
votes
2answers
176 views

Should I Rest at the Travelator or Not at the Travelator?

This is a real-life puzzle encountered by one of my friends, again. After landing and arriving at the airport, I want to pick my baggage up quickly. The problem is that the baggage claim is $500$ m ...
4
votes
2answers
163 views

Optimal guess in a game

Suppose that A and B play a strange game. At the beginning of the game A can choose one real number - $x$ - between $0$ and $60$. Each round of the game goes like this: B names random real number $b$ ...
8
votes
3answers
2k views

Folding a paper wouldn't be this hard

Alice and Bob started to play a game with a piece of A4 paper. Alice is going to cut that paper as she wants and will give it to Bob, then Bob will fold the paper from anywhere he wants. In the game, ...
5
votes
3answers
208 views

Fill $N$ by $M$ grid with numbers in such a way that any given cells' neighbors are different

Create an $N$ by $M$ grid with numbers in such a way that satisfies following conditions: numbers should be integers that range from $1$ to $r$. for any cell $C$, all its adjacent neighbors (i.e. ...
3
votes
3answers
1k views

Three coins for the fair king [duplicate]

Based on the question Eight coins for the fair king: I saw a comment saying "There isn't a good solution known even with three coins in all cases". So the challenge here is to try to solve the same ...
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 ...
5
votes
3answers
602 views

Should I kill all of my elves?

I've been playing a simplified variant of The Great Elf Game for a few days now and I'm struggling to identify an optimal strategy. Rules: You start with 12 elves. Each elf is sent to gather a tree ...
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 ...
9
votes
4answers
448 views

Cupcake division

A elementary school student brought cupcakes to their class to celebrate their birthday! However, there's a problem: There are 25 students in the classroom, and only 24 cupcakes! The students have ...
-1
votes
1answer
105 views

Annual Meet Puzzle

The annual meet was attended by 20 persons. The persons who attended the meet have worked in eight different firms – M, BC, K, A, BA, D, PC and E. The following table provides information about the ...
6
votes
2answers
190 views

The Minimized Dropmate

I don't know, but I think my opponent just may be cheating in this chess game. So, the natural thing to do is cheat right back! My plan is to put black pieces on the board so the white king is ...
4
votes
1answer
189 views

Are there basic weighing puzzles requiring adaptive strategies?

Let us define a basic weighing puzzle as such: There are <number> identical balls, except one weighs <more/less/a different amount than the others> A balance scale may be used to weigh two ...
10
votes
5answers
842 views

Optimize a keyboard for one-finger typing

The ubiquitous QWERTY keyboard layout works well enough for ten-finger touch typing (though Dvorak proponents may disagree). But what if you're typing a text message on a mobile phone? Those fiddly ...
8
votes
1answer
207 views

Create your own custom ruler

There is a blank ruler of $X$ units. You are going to set $9$ marks on this ruler so that you will be able to measure all integer values from $1$ to $X$ units with only one measurement. What is the ...
12
votes
3answers
2k views

Removing 100 digits from the first 100 numbers

Write the first 100 positive integers next to each other to form one big number: $$123456789101112131415161718192021\dots90919293949596979899100.$$ If we remove 100 digits (not necessarily consecutive)...
13
votes
4answers
3k views

A dice game, what is the optimal strategy?

Alice was walking on the street when she came across a man playing with a die. She could not help trying to check if the die was loaded and while she was concluding that it wasn't loaded, the man ...
8
votes
1answer
452 views

Clearing the Robot Museum

The grand opening of the Collapsible Robot Museum is just 1 week away in the robot nation of Robotia. The museum is unique because shortly after the museum closes, the building collapses into a flat ...
3
votes
2answers
333 views

Rectangles and Diagonals

A 4×4 table has 18 lines, consisting of the 4 rows, the 4 columns, 5 diagonals running from southwest to northeast, and 5 diagonals running from northwest to southeast. A diagonal may have 2, 3 or 4 ...
2
votes
2answers
341 views

33 stones into gold transmuter

There is a magic transmuter which turns stones into the gold! But this transmuter works weird. Every time you put a stone or more stones and press a button, it takes that stone into a slot in the ...
10
votes
1answer
254 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. ...
13
votes
1answer
392 views

Candy Button Paper

An entry in Fortnightly Topic Challenge #35: Restricted Title 1. Title based on this xkcd. Your biggest dream has come true: you have an infinite supply of your favorite five-flavor candy button ...
6
votes
1answer
354 views

Red Fish Blue ꟻish

You are presented the following six cards. The red cards are rotations of F, and the blue cards are rotations of ꟻ (backwards F). Your goal is to make it so that the red cards are rotations of ꟻ (...
19
votes
2answers
1k views

A thirsty king and his knights

The black king has spent his life fighting over this strange checkered land, the white king has finally been defeated and his troops have surrendered and pledged allegiance to him. Now he's not sure ...
8
votes
1answer
172 views

Mitosis of 80 bioelectronic cells

You are working in a bio-laboratory, where they produce some special bioelectronic cells which have mitosis ability. FYI: Mitosis is a process of cell duplication during which one cell gives rise to ...
4
votes
1answer
191 views

Find the fake bar in 2 weighing [duplicate]

You are given 8 equal sized bars of silver labeled a to h. You know for a fact one of them is fake, and the only measurable difference is weight. However you do not know if the fake bar is heavier or ...
9
votes
6answers
1k views

Optimizing month abbreviation to number

(This comes from a real-world requirement.) The idea is easy - if you have the three-letter abbreviated name of a month, say "Jan", get the numeric month number (for "Jan", 1). Sure, sure, pick a ...
5
votes
3answers
254 views

Crazy queen in checkers

Checkers Checkers, also called draughts, is an interesting game. all pieces are placed on black tile and are all pawns at the start. When a pawn reach the final line, a powerful piece is created: the ...
6
votes
3answers
322 views

5 Tires with maximum distance

I just bought a car with $5$ identical tires on it, as you guess $4$ of them were already installed, just one is in the trunk. The seller said that while the tires on the front, they can go $48k$ ...
5
votes
1answer
2k views

Is there only one solution to the “Ten Penny Puzzle” or more?

Not knowing the dimensions of the square in the Ten Penny Puzzle I ask if there is more than one unique solution that isn't a reflection/mirror of the one shown in the video, if you know the ...
5
votes
3answers
1k views

Hacking an electronic keypad v2

This is related to Hacking an electronic keypad. You are a spy trying to break into an enemy facility. The back door is protected by an electronic keypad lock. You know that this particular lock is ...
5
votes
2answers
708 views

How much money can we make? v2

This is follow up question to 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 ...
2
votes
1answer
244 views

The A-B chocolate puzzle!

Imagine you have 2 types of chocolates (A and B). You randomly pick up two chocolates at once from your bag in a specific pattern. If the same type of chocolates come out, you give them both to your ...
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 ...
9
votes
2answers
490 views

Smallest Army on a chessboard

This is actually similar question to Biggest army on a chessboard. But it is kinda different way of asking. In this game, you are supposed to put the least amount of pieces into the board where there ...
1
vote
1answer
268 views

Scheduling Meetings

I came across this problem in real life and thought it could be made into an interesting puzzle. I will enjoy seeing how my eventual solution could be improved! Here's the situation. There ...
8
votes
3answers
544 views

Acids and Bases

I have 6 solutions. 3 of them are acids, and 3 of them are bases. The acids and the bases (HCl and NaOH respectively) both have solution with a concentration of $0.1M$, $1M$, and $10M$. I don't know ...
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 ...
-4
votes
1answer
146 views

Maximize gold bars [duplicate]

You have encountered 100 gold bars in a cave. In the cave, a goblin shows you 3 holes in the wall. He says one hole will triple what you put in it, one hole will leave it as the same amount, and one ...
7
votes
2answers
400 views

99 chips into more chips V2

This is follow up question of 99 chips into more chips, which is originally: You are at a casino in Vegas and you have earned 99 chips by playing poker! While you are checking out a slot ...
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 ...
16
votes
7answers
2k views

Soldiers in the Parade Ground

Twenty-five soldiers are standing in a parade ground consisting of a five-by-five grid of large concrete slabs, laid out in a neat north-to-south, east-to-west square array. Each soldier is standing ...
17
votes
2answers
837 views

numbers want to cross a river, but their sum must be a square number

In the world of numbers, numbers 1 to 9 want to cross a river, They have a boat which can take 1 to 3 numbers, But sum of the numbers must be a square number. The boat can not sail back itself, so ...