1
vote
0answers
23 views

A good book with algorithmic puzzles with solutions (not of kind “how to pass and IT interview”)

can you please advise me a book with algorithmic and mathematical (IT-oriented) puzzles. But I want not one more book of kind "How to pass an interview in Microsoft / Google / any other big company" ...
-1
votes
0answers
23 views

The problem category of sudoku Puzzle solved by search algorithms

Good day everybody, Sudoku puzzle solvers have been categorized in the literature to: Deductive algorithms that perceive sudoku as a hard constraint satisfaction problem (CSP) or Boolean ...
11
votes
3answers
171 views

Deducing correct answers from multiple choice exams

I am looking for an algorithmic way to solve the following problem. Problem Say we are given a multiple choice test with 100 questions, 4 answers per question (exactly one of those four being ...
2
votes
3answers
104 views

An algorithm for solving this puzzle

The puzzle goes like this: There is a $n\times n$ - board with each cell containing a whole number. Let's call this the matrix $A$ and denote its elements by $a_{ij} \in \mathbb Z$. The cells can be ...
0
votes
2answers
328 views

How do I find the maximum number of knights on a chess board?

I came across this problem and after thinking a lot I could not get any idea how to calculate it. Please suggest to me the right way to calculate it. Given a position where a knight is placed on ...
1
vote
0answers
50 views

Finding the maximum number of voters satisfied in a ballot

Suppose you are given a file with the following information: 3W 4M 5 M2 W1 M3 W1 W2 M4 M1 W1 M4 W3 The top line specifies the number of candidates in each of two ...
2
votes
1answer
92 views

Is the answer 6 or 7?

This is a short mathematical puzzle from mindciphers.com which says : The London racetrack needs to submit its top three horses to the Kentucky Derby next month in order to compete for a prize. ...
0
votes
1answer
87 views

Algorithm for a n x n grid of squares

Say we have a puzzle where by there are $n^2$ squares and each of the 4 sides of each square has a colour. The aim of the puzzle is to see if the squares can be arranged in such a way that when 2 ...
2
votes
0answers
71 views

Maximizing an algebraic expression using brackets

It's a riddle of sorts: given a list of numbers $\alpha_1 \dots \alpha_n$ and operators $o_1 \dots o_{n-1}$ which can be only $\times\, \mbox{or}\, + $ if the above is a specific algebraic expression ...
3
votes
2answers
125 views

The number 3211000 is 7-special

Define a positive integer $k$ to be $n$-special if it satisfies the following properties: It has $n$ digits (0, 1, ..., 9) The 1st digit is equal to the number of 0's in the decimal representation ...
0
votes
0answers
90 views

uncleared Josephus problem equation?

I have been going through this problem and came across the simple solution as shown in Wikipedia. The formula for this solution is $$f(n,k)=((f(n-1,k)+k-1) \bmod n)+1$$ $$f(1,k)=1.$$ But due to ...
10
votes
2answers
170 views

Given a desired coloring scheme for a stick, how can I brush it with the fewest steps?

If I want to color a stick (regarded as a line segment in one-dimensional space) to a desired coloring scheme using brush, how can I make it with the fewest steps? Notice that, new color will just ...
0
votes
1answer
71 views

Combinatorics puzzle

I am having a problem dealing with following topic: lets say we have set of numbers n = [ 1 2 2 3 ] and we want be able to get all two-elementary combinations out ...
0
votes
1answer
58 views

Non-uniform scaling

I have 10 numbers $x_1, x_2, \dots, x_9, x_{10}$ which sum to a total of $1,000$. I want to scale these numbers so the total is equal to $10,000$, however I don't want them to scale exactly. I'm ...
1
vote
1answer
72 views

How to determine which encryption system is being used?

I came across this question in a local contest. I was not able to solve it at that time. Also, no solution was provided. I was wondering if someone can help me to understand how to tackle this kind ...
5
votes
2answers
384 views

Lights Out Variant: Flipping the whole row and column.

So I found this puzzle similar to Lights Out, if any of you have ever played that. Basically the puzzle works in a grid of lights like so: 1 0 0 00 0 0 00 1 0 0 0 0 1 0 When you selected a ...
3
votes
1answer
112 views

Optimizing the number of robots to be used for a certain task

We have $N$ buttons numbered $1$,$2$ .. $N$. Our aim is to press each of the buttons at least once in the minimum time possible. For that purpose we choose $m$ robots. These robots can press one of ...
0
votes
1answer
131 views

Puzzle identification and solving algorithm

I am trying to solve 8x8 puzzle (total 64 buttons). Similar to LightsOut, but in this rules are different. Goal is turn ON every button. Example: ...
5
votes
3answers
870 views

programming brain teaser

Given a programming language where you could make as many variables up as possible and you could only perform these three operators find b-1. ...
2
votes
1answer
123 views

Checking Sudoku - sufficient sums

Are the following condition sufficient for checking if solution of Sudoku with (extended output) is valide : sum of values in each row, column and subsquare is equal to 45 and sum of squares of ...
1
vote
1answer
253 views

What is the minimum number of moves of solve the puzzle?

There is board in which there are $m\times m$ boxes each assigned an a non zero integer except one box which is marked as $0$ and is treated as vacant. Only the vertical and horizontal neighbors of ...
3
votes
2answers
265 views

What are good methods for solving Conway's card-stacking puzzle?

Suppose there is a table with three marked spots, $A, B, $ and $C$, on which playing cards can be put, face up. Initially, an ace (1), a deuce (2), and a trey (3) are placed on one or more of these ...
2
votes
2answers
312 views

Distance Puzzles?

A man moves 1km east, 2km north, 3km west, 4km south, 5km east, 6km north, 7km west and so on until he travels total of 300km. So what will be the distance from origin?
-1
votes
3answers
484 views

Algorithm for finding smallest number in a list, given list of $a$ to $b$

Background Here is a puzzle I have been thinking over. (For some reason I believe there is a linear algorithm for this). Question: You are given list of n numbers and a list of m pairs. You are to ...
2
votes
0answers
80 views

Is there a use for this technique?

I remember reading once about the following algorithm: Consider a lattice grid and $N$ houses situated at grid points, in which live the town elders. They want to choose a lattice point location ...
2
votes
1answer
161 views

Determining the round players will meet in a knock-out tournament

Given a knock-out tournament with $2^n$ players, I am looking for a formula or algorithm to calculate the round player A will meet player B. For the case $2^n=16$. Player 7 will meet player 8 in ...
9
votes
1answer
347 views

Honest and Deceitful Professors Problem

I found this in An Introduction to Bioinformatics Algorithms. I've paraphrased for clarity. There are 100 professors. Some are honest, while others are dishonest. There are more honest professors ...
0
votes
1answer
88 views

Getting 5 or 7 and returning the opposite? [closed]

I get 5 or 7 and if i get 5 i need to return 7 if i get 7 i need to return 5. i need to do this in 1 mathematical formula. I have those: 12 - x 35 / x There ...
2
votes
3answers
715 views

Converting recursive function to closed form

My professor gave us a puzzle problem that we discussed in class that I could elaborate on if requested. But I interpreted the puzzle and formed a recursive function to model it which is as follows: ...
2
votes
4answers
559 views

Determine in How many ways $N!$ can be expressed as sum of consecutive numbers

Determine in How many ways $N!$ can be expressed as sum of consecutive numbers.For example for $3!$ can be as $1+2+3$ only $1$ ways. Please suggest an elegant approach.
1
vote
0answers
74 views

What is the optimal investing solution for the given simulated market?

I have come across an artificial, simulated, stock-market type of situation, whose rules, I find, create a rather interesting problem. I want to know if there is a mathematically optimal solution for ...
4
votes
1answer
2k views

Party planning problem

Recently, I came across this problem in my textbook. Any hints on how to solve this using dynamic programming? "Professor Stewart is consulting for the president of a corporation that is planning a ...
4
votes
6answers
1k views

Finding the Heavy Coin by weighing twice

Suppose you have 100 coins. 96 of them are heavy and 4 of them are light. Nothing is known regarding the proportion of their weights. You want to find at least one genuine (heavy) coin. You are ...