Author 
Topic: find the password!!! (Read 2964 times) 

antkor
Newbie
Posts: 30


find the password!!!
« on: Jan 11^{th}, 2014, 6:49pm » 
Quote Modify

You wake up and find yourself trapped inside a room which only has 1 door as an exit. This door is locked of course and you do not know the password. All of a sudden, a voice sounds: You are trapped!! The only way you can get out is to find the password which opens the door. Inside the room there is a table which has some weights on it and a paper with instructions (the only objects in the room). But you only have one chance. if you do not find the password correctly, the door will seal forever! Best of luck! You head to the table and see the weights and the paper with the instructions. The instructions are 1. In the room next door there is a scale with two discs. On top of one disc there is a sealed black box which contains a number of same coins (>1). Each of these coins weights the same integer amount of grams, which is greater than 1 gram/coin. 2. If you knew the total weight of the coins, you could calculate their number. Assume that the weight of the box is trivial, since it's made of very light metal. The number of coins is very important for you, since it is the same with the password you need! 3. As you can see, on the table there are some weights. These weights are the same and they all weight the same integer number of grams. Furthermore, the total weight of all the weights is 4 kilos. 4. If you were allowed to have trials with that scale, you would eventually find the total weight of the coins without even touching their box, let alone open it and count. After some thought you finnaly find the password!!! What is that password?


IP Logged 



jollytall
Senior Riddler
Gender:
Posts: 573


Re: find the password!!!
« Reply #1 on: Jan 11^{th}, 2014, 11:39pm » 
Quote Modify

In the other room there are prime number of coins with the same weight in grams as their number, i.e. the total weight is P*P (from rule 2). In any other case the number can be written as p*q (none of them is 1 and they are not necessarily primes, but p<>q) and so it could be p pieces of q grams or q pieces of p grams. In my room there are n pieces of weight, each w=4000/n grams (integer). I can count the weights, so I know their individual weights too. I need to find that w, where there is a k, that only one P works that k*w<=P*P<(k+1)*w<=4000. Since I am not allowed to make the measurements, I also need to restrict it further that there is only 1 such k. If they gave me many weights where w is small then P can be many different primes that I can measure uniquely. E.g. w=2 can measure any P*P. If they gave me too large ws (e.g. w=4000) then no unique P*P can be measured at all. w=800 stands out, because many P*Ps fall between 0800, 8001600, 16002400 and 32004000 but only one between 24003200. Larger numbers all have many in every bucket, while for smaller ones there are multiple unique buckets. So, the password is 53 or FIFTYTHREE.


IP Logged 



jollytall
Senior Riddler
Gender:
Posts: 573


Re: find the password!!!
« Reply #2 on: Jan 11^{th}, 2014, 11:59pm » 
Quote Modify

Although I think the above is the intended solution, 2 or 5 are also OK. If I got on the table w=2, 4, 5 or 25, P*P=4 or 25 are also unique solutions, what I could measure. Maybe replacing the word "find" the total weight could be changed to "guess" the total weight, what would exclude the exact solutions. Modify: No need to change the wording. They could not give me these small ws, because I could measure many other P*Ps uniquely and we know that there is a unique solution to get the password even without the actual measurement.

« Last Edit: Jan 12^{th}, 2014, 3:25am by jollytall » 
IP Logged 



antkor
Newbie
Posts: 30


Re: find the password!!!
« Reply #3 on: Jan 13^{th}, 2014, 5:00am » 
Quote Modify

your solution is completely correct!!! Well done! The key that makes this problem very difficult is that one has to come up with the inspiration that the coins and the weights will never balance. That's not easy to assume at all! So one has to figure out that for N weights on the other scale the coins are heavier but for N+1 weights the coins are lighter. Afterwards, all possible combinations have to be tried in order to find that scenario, but it has to be unique both in terms that only one possible solution is found between N and N+1 and that this happens only once for the weights you have on the table so that you do not break the 2nd and 4th instruction. So, you have 5 weights of 800 grams each and the answer is indeed 53 or fiftythree (according if the device for entering the code has letters or numbers. Assume it has only one way of entering the code in order for the problemm not to get stuck in that point).


IP Logged 



