Motto: Un secret trebuie spus numai celui care nu caută sa-l stie. (Diane de Beausacq)
E. Cifru
Există un seif care conţine o avere; din păcate s-a pierdut cifrul care poate deschide acest seif. Nimeni nu îl mai ţine minte.
Cifrul este format dintr-o combinaţie de cifre de o lungime arbitrară.
Dacă se foloseşte o combinaţie corectă, seiful se deschide.
Orice altă combinaţie sau nu va avea nici un efect (combinaţie neutră) sau va genera un proces care va distruge complet conţinutul seifului (combinaţie greşită).
Dacă x şi y sunt combinaţii arbitrare, atunci
- xy este combinaţia formată din x urmat de y,
- mi(x) este reversul combinaţiei x (de exemplu mi(302)=203)
Unele combinaţii sunt legate de altele. Pentru simplificare vom nota cu
xày faptul că x este legată de combinaţia y.
Există cinci proprietăţi ale relaţiei à:
1) Pentru orice combinatie x, 2x2 à x. (de exemplu 21452 à 145);
2) Dacă xày atunci 1x à2y. (de exemplu, pentru că 21452 à145, vom avea şi 121452 à2145);
3) Dacă xày atunci 5x àmi(y). (de exemplu, cum 21452 à145, rezultă 521452 à 541);
4) Dacă xày atunci 9x àyy. (de exemplu, din 21452 à145 rezultă 921452à 145145, şi la fel, din 521452à 541 rezultă 9521452à 541541).
5) Dacă xày atunci:
- dacă x este o combinaţie neutră atunci y este o combinaţie greşită, şi
- dacă x este o combinaţie greşită atunci y este o combinaţie neutră.
(de exemplu, dacă 521452 este neutră atunci 541 este greşită şi va distruge seiful).
Este o problema la care deocamdata nu am solutie. Deci nu pun termen.
Problema cere să găsiţi cea mai scurtă combinaţie corectă (care va deschide seiful).
Notă: O combinaţie oarecare (secvenţă arbitrară de cifre) este sau corectă, sau neutră, sau greşită. Dintr-o combinaţie corectă nu se poate obţine o combinaţie neutră sau greşită
Nu mai am textul original al problemei lui raymond Smullyan. Am gasit insa o forma mai generala.
Smullyan’s logical machine is supposed to drive the lock of an important safebox. This machine will accept strings; some strings will block the safebox, some strings will be neutral (these will not produce any effect on the lock), and some strings will open the safebox. There is a certain relationship between some pairs of strings, and we will say that some string is "especially related" to another string; the meaning of this relationship is not clarified further! These are the properties of the machine:
With these conditions, it is possible to find a string that will open the safe. Can you find one? (Hint: what happens if we enter a string which is especially related to itself?)
Am gasit textul orioginal al problemei. Sunt date si cateva indicatii!
(dar pana acum nu am rezolvat problema!)
There is a safe containing millions of dollars - unfortunately the combination is written on only one card, and that card has been accidentally locked inside the safe! If the wrong combination is used, the lock will jam and the only way to open the safe would be to blow it up, destroying the contents.
A combination is a string of digits from 0 through 9. It can be any length and contain any number of digits occurring any number of times; 90915 is a combination; so is 2133127; so is 5.
Certain combinations will open the lock, certain combinations will jam the lock, and the remaining combinations will have no effect whatever (these last are called neutral).
The small letters x and y will represent arbitrary combinations, and by xy is meant the combination x followed by the combination y; for example, if x is 213 and y is 3812, then xy is 2133812. By the reverse of a combination is meant the combination written backwards; for example, the reverse of 3812 is 2183.
By the repeat xx of a combination x is meant the combination followed by itself; for example, the repeat of 3182 is 31823182.
Now, some of the combinations are related to other combinations. There are five properties of this relation:
Property A: For any combination x, the combination 2x2 is related to x. (For example, 21452 is related to 145.)
Property B: If x is related to y, then 1x is related to 2y. (For example, since 21452 is related to 145, then 121452 is related to 2145.)
Property C: If x is related to y, then 5x is related to the reverse of y. (For example, since 21452 is related to 145, then 521452 is related to 541.)
Property D: If x is related to y, then 9x is related to yy (the repeat of y). (For example, since 21452 is related to 145, then 921452 is related to 145145.
Also, 521452 is related to 541, so 9521452 is related to 541541.)
Property E: If x is related to y, then if x is neutral then y jams the lock, and if x jams the lock then y is neutral.
(For example, if 521452 is neutral, then 541 will jam the lock.)
Find the shortest possible combination that will open the lock.
Notes/Clues:
a) The relation is only one way. Think of it like mother and son. The mother is the parent of the son, but the son is not the parent of the mother.
b) The first thing you need to do is to establish (just using property E) how to solve the puzzle (i.e. how do you know if a combination opens the lock?). Then use this information to solve the puzzle using properties A thru D.