CSE Blog - quant, math, computer science puzzles

Quant, Math & Computer Science Puzzles for Interview Preparation & Brain Teasing
A collection of ~225 Puzzles with Solutions (classified by difficulty and topic)

Nov 9, 2014

Pebble Placement Puzzle 2


Source: AUSTMS Gazette 35

Related Problem: Pebble Placement Puzzle 1

Problem: Peggy aims to place pebbles on an n × n chessboard in the following way. She must place each pebble at the center of a square and no two pebbles can be in the same square. To keep it interesting, Peggy makes sure that no four pebbles form a non-degenerate parallelogram.

What is the maximum number of pebbles Peggy can place on the chessboard?

Nov 6, 2014

Pebble Placement Puzzle 1

Source: AUSTMS Gazette 35

Problem:

There are several pebbles placed on an n × n chessboard, such that each pebble is inside a square and no two pebbles share the same square.

Perry decides to play the following game. At each turn, he moves one of the pebbles to an empty neighboring square. After a while, Perry notices that every pebble has passed through every square of the chessboard exactly once and has come back to its original position.

Prove that there was a moment when no pebble was on its original position.

Oct 18, 2014

Diminishing Differences Puzzle


Source: Australian Mathematical Society Gazette Puzzle Corner 34

Problem: Begin with n integers x1, . . . , xn around a circle. At each turn, simultaneously replace all of them by the absolute differences


Repeat this process until every number is 0, then stop. Prove that this process always terminates if and only if n is a power of 2.

Shameless plug:
Follow CSE Blog on CSE Blog - Twitter and CSE Blog on Quora. :-)





Sep 19, 2014

Balancing Act Puzzle

Source: Australian Mathematical Society Gazette Puzzle Corner 35

Problem:
There are some weights on the two sides of a balance scale. The mass of each weight is an integer number of grams, but no two weights on the same side of the scale share the same mass. At the moment, the scale is perfectly balanced, with each side weighing a total
of W grams. Suppose W is less than the number of weights on the left multiplied by the number of weights on the right.

Is it always true that we can remove some, but not all, of the weights from each side and still keep the two sides balanced?



Aug 26, 2014

"Flawless Harmony" Puzzle

Source: AUSTMS Puzzle Corner 35

Problem:

Call a nine-digit number flawless if it has all the digits from 1 to 9 in some order. An unordered pair of flawless numbers is called harmonious if they sum to 987654321. Note that (a, b) and (b, a) are considered to be the same unordered pair.

Without resorting to an exhaustive search, prove that the number of harmonious pairs is odd.

Update (23 Oct 2014):
Solution: Posted by me (Pratik Poddar) in comments!