Practice (EndingDigits,TheDivideByNineMethod,MODBasic,EulerFermatTheorem,CRT,TheModMethod,SquareNumber)

back to index  |  new

$\textbf{Casino Game's Fair Price}$

A casino offers a card game using a regular deck of $52$ cards. The rule is that you turn over two cards each time. For each pair, if both cards are black, they go to the dealer’s pile; if both cards are red, they go to your pile; if one card is black and the other is red, they are discarded. The process is repeated until you two go through all $52$ cards. If you have more cards in your pile, you win $\$100$; otherwise (including ties) you get nothing. The casino allows you to negotiate the price you want to pay for the game. How much are you willing to pay to play this game?


$\textbf{Burning Ropes}$

Two ropes have different densities at different points, but both take exactly an hour to burn. Is it possible to use these two ropes to measure $45$ minutes? If so, how? If not, please explain.


$\textbf{Heavier Ball}$

There are $12$ balls of which $11$ weigh the same and the other one is heavier. What is the minimum number of weighs required to find this heavier ball using a balance?


$\textbf{Outlier Ball}$

There are $12$ balls of which $11$ weigh the same and an outlier that weighs differently. We do not know whether the outlier weighs more or less than the other balls. What is the minimum number of weighs required to find this outlier using a balance? (This problem is similar to <myProblem>GetLink/4663</myProblem> except that the outlier ball can be either heavier or lighter.)


$\textbf{Six Glasses}$

There are six identical glasses of which three are empty and three contain water. They are currently lined up in an alternating fashion, i.e. the $1^{st}$, $3^{rd}$ and $5^{th}$ are empty, and the others are full. Is it possible to move just one glass so that the three glasses containing water are next to each other without any empty one in between?


$\textbf{Hole in a Sheet}$

There is a circular hole in the middle of a metal sheet. Will the hole become bigger, smaller or stay the same when this metal sheet is heated?


$\textbf{Who Paid for the Beer}$

Joe lives in a town along the US-Canada border. One day, both countries' currencies are discounted $10\%$ on the other side of the border. That is, a US dollar is worth $90$ Canadian cents in Canada, and a Canadian dollar is worth $90$ US cents in the US. Joe buys one US dollar's worth of beer in the US. He pays using a ten US dollar bill and receives ten Canadian dollars as exchange. Then, he walks across the border and buys one Canadian dollar's worth of beer. He pays using the ten Canadian dollars he has and receives ten US dollars as exchange. He then walks back to the US side to buy another US dollar's worth of beer. He receives ten Canadian dollars as the exchange before goes to Canada again. After coming back and forth, Joe finally returns to his home and becomes dead drunk. However, he still has ten US dollars in his hand. The question is who has paid for all the beers Joe has consumed?


$\textbf{Coin and Cork}$

A coin is put into a bottle of wine and then the bottle is corked. Is it possible to take out the coin without taking out the cork or breaking the bottle?


$\textbf{Great Pyramid}$

Joe visited the Great Pyramid of Egypt in $1995$. He was so impressed that he vowed to visit this wonder again with his children. In $1975$, Joe brought his son there and fulfilled his vow. How was this possible?


$\textbf{Silver Link}$

Joe plans to hire an assistant for a week and pay this person exactly one silver link per day. The wage will be settled daily. Joe thinks of using a chain of seven links to finance this arrangement. What is the minimum number of chain cuts Joe needs?


$\textbf{Secured Delivery}$

John wants to send a valuable gift to Mary. He has a lockable box that is large enough to contain the gift. The box also has a locking ring that can have a few locks attached. However, Mary does not have the key to any of John's locks. How can John send the gift to Mary securely?


$\textbf{Mountain Hiker}$

John starts to hike up a mountain at $7:00$ am and reaches the top at $7:00$ pm. He stays at the top overnight. On the next day, he starts to hike down at $7:00$ am along the same route and reaches his starting point at $7:00$ pm. His speed during the two-day hiking varies from time to time. What is the probability that there exists one spot he passes at the exactly same time during the two days?


Joe and Mary flip a coin ($n+1$) and $n$ times, respectively. What is the probability that Joe gets more heads than Mary does?


$\textbf{Mixed Pills}$

John must take exactly one $A$ pill and one $B$ pill each day. These two types of pills look exactly the same and cannot be distinguished in any way. One day, while he has one $A$ pill in his hand, he accidentally gets two $B$ pills out of the bottle. Now he has three indistinguishable pills in his hand. As both medicines are quite expensive, John does not want to waste any pill. What can he do?


$\textbf{Tournament}$

A tournament has $2020$ participants. In each round, two people are paired and the winner advances to the next round. No game will end up with a tie. If in any round, there is an odd number of participants, the one without a paired opponent will automatically advance to the next round. The tournament will continue till the champion is declared. How many matches will this tournament have?


$\textbf{Mixed Tea and Coffee}$

Joe has two identical cups, one filled up with tea and the other filled up with coffee. He pours half of tea and a quarter of coffee into a third cup, mixes them evenly. Then, he fills up both cups using this mixed tea and coffee. Afterwards, he pours half of liquid in the first cup (originally containing the tea) and a quarter of the liquid in the second cup, and mixes them up before pouring them back. After three such iterations, is there more coffee in the first cup than the tea in the second cup?



$\textbf{Animal Kingdom}$

In an animal kingdom, there are $n$ carnivores and $m$ herbivores. When two herbivores meet, nothing will happen. When two carnivores meet, both will die. If one herbivore meets one carnivore, the herbivore will die. All such meets can only happen between two animals. All living animals will meet another one sooner or later. If a new animal, either a carnivore or a herbivore, enters this kingdom, what is its probability of survival?


$\textbf{Seat on a Flight}$

There are $100$ airline passengers waiting in line to board a $100$-seat plane. For convenience, let the $n^{th}$ passenger in line hold a ticket for the $n^{th}$ seat. For some reasons, the first passenger decides to pick a random seat instead of his assigned seat (it is still possible that he or she picks the $1^{st}$ seat). Everybody will sit on his or her assigned seat unless this seat is occupied. In the latter case, that passenger will pick a random seat for himself or herself. Find the probability that the last passenger will sit on his or her assigned seat.


$\textbf{Poisonous Wine}$

A king has $1000$ bottles of expensive wine. One assassin is just able to poison one bottle of wine before being killed. The king does not want to discard all the bottles, so he decides to force some prisoners to taste these wines in order to find out the poisonous one. While he is ruthless, the king is also intelligent. He figures that it is not necessary to use $1000$ prisoners because it is known that this type poison will take effect and kill an in-taker after $24$ hours. Is it possible for the king to use no more than $10$ prisoners to identify the poisonous bottle?


$\textbf{Overlapping Clock Hands}$

How many times in a day do the minute and hour hands of a clock overlap?


$\textbf{Cheating Husbands}$

A remote town comprises of $100$ married couples. Everyone in the town lives by the following rule: If a husband cheats on his wife, the husband is executed at the night as soon as his wife finds out about it. All the women in the town only gossip about husbands of other women. No woman ever tells another woman if that woman's husband is cheating on her. So every woman in the town knows about all the cheating husbands in the town except her own. It can also be assumed that a husband remains silent about his infidelity. One day, the mayor of the town announces to the whole town that there is at least $1$ cheating husband in the town. What will happen afterwards?


$\textbf{Camel and Bananas}$

Joe, the owner of a banana farm, has a camel. He wants to transport his $3000$ bananas to the market which is located at the other side of the desert. The distance between his banana farm and the market is $1000$ kilometers. The camel can carry at most $1000$ bananas at a time, and also eats one banana for every kilometer traveled. What is the maximum number of bananas Joe can bring to the market?


$\textbf{Prisoners in Solitary Cells}$

There are $100$ prisoners locked up in solitary cells. The king gets bored and offers them a challenge. Everyday, he will randomly select and put one prisoner into a special room. (A prisoner may be selected more than once.) This special room has a light and its controlling switch. The prisoner inside the special room can turn on, turn off, or do nothing with the switch. But no other prisoner can see or control the light. On any day, the prisoners can stop this process by declaring that every one of them has been in the special room at least once. If that happens to be true, then all the prisoners will be freed. Otherwise, they will all be executed. Before starting the challenge, the prisoners are given some time to discuss. Is there a strategy to free themselves?


Three ants sit at the three vertices of an equilateral triangle. At the same moment, they all start moving along the edge of the triangle at the same speed but each of them randomly chooses a direction independently. What is the probability that none of the ants collides?


$\textbf{Running Dog}$

Joe and Mary walk towards each other from $1000$m apart at speeds of $1.20$m/s and $0.80$m/s, respectively. Joe's dog, starting at the same time as Joe, runs toward Mary at a speed of $2.50$m/s. When it meets Mary, the dog immediately turns back and run towards Joe at the same speed. When the dog meets Joe the next time, it turns back and run towards Mary at the same speed again. In another word, the dog runs between Joe and Mary back and forth until the two people meet. What is the total distance run by the dog?