wu :: forums
« wu :: forums - ghetto encryption 2 »

Welcome, Guest. Please Login or Register.
Dec 4th, 2024, 4:53pm

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   medium
(Moderators: william wu, ThudnBlunder, Icarus, SMQ, Grimbal, towr, Eigenray)
   ghetto encryption 2
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: ghetto encryption 2  (Read 2683 times)
klbarrus
Newbie
*





   


Posts: 29
ghetto encryption 2  
« on: Jul 25th, 2002, 4:19pm »
Quote Quote Modify Modify

A, B, and C each add a random number to their salary and pass the total along.  Then, they subtract out their respective random numbers and are left with their total salary, which they can find the average from.
 
I.E.
Sx = X's salary
Rx = X's random number
A passes to B (Sa + Ra)
B passes to C (Sa + Ra + Sb + Rb)
C passes to A (Sa + Ra + Sb + Rb + Sc + Rc)
A passes to B (Sa + Sb + Rb + Sc + Rc)
B passes to C (Sa + Sb + Sc + Rc)
C shows to everybody (Sa + Sb + Sc)
and they divide to get the average.
IP Logged
Kozo Morimoto
Guest

Email

Re: ghetto encryption 2  
« Reply #1 on: Jul 25th, 2002, 5:09pm »
Quote Quote Modify Modify Remove Remove

klbarrus's solution won't work.
When A removes his/her Ra after the first round, since everybody knows what Sa + Ra is from the first step, you can figure out what Sa is.
 
Say A tells $10 at first step.  Then if A removes $3 from the number given to him/her from C, then you know his/her salary is $7.
IP Logged
klbarrus
Newbie
*





   


Posts: 29
Re: ghetto encryption 2  
« Reply #2 on: Jul 25th, 2002, 5:49pm »
Quote Quote Modify Modify

The intermediate sums are only revealed to the next person in the chain, not everybody.  
 
C doesn't get to see (Sa + Ra).  By the time C gets the sum it also has B's information added in.  So when A subtracts out C can't figure anything out.
 
B does get (Sa + Ra) the first time.  The second time he gets a sum with C's info added in.  So when A subtracts out B can't figure anything out.
IP Logged
jora
Guest

Email

Re: ghetto encryption 2  
« Reply #3 on: Jul 26th, 2002, 8:21am »
Quote Quote Modify Modify Remove Remove

It took 10 sec for my friend to solve this using 1 random number (I solved with 3 though Sad ).
 
Let's say they have calculator (or a bunch of paper sheets)
which can be touched by single person only - that's the rule!
 
Person C enter random number R (on calculator or writes down on sheet).
Person A adds his salary (on calculator or sums and writes down on second sheet - first one must be destoyed!)
 
So we have R+A
Person B adds salary R+A+B - he knows nothing abount R or A - he sees only sum R+A
Person C adds salary and removes his random number A+B+C - he knows nothing about A or B - he sees only sum A+B.
 
Next, when you have a sum of A+B+C feel free to divide by 3 to get the average  Wink
IP Logged
Salem
Guest

Email

Re: ghetto encryption 2  
« Reply #4 on: Jul 26th, 2002, 8:47am »
Quote Quote Modify Modify Remove Remove

on Jul 26th, 2002, 8:21am, jora wrote:
It took 10 sec for my friend to solve this using 1 random number (I solved with 3 though Sad ).
 
Let's say they have calculator (or a bunch of paper sheets)
which can be touched by single person only - that's the rule!
 
Person C enter random number R (on calculator or writes down on sheet).
Person A adds his salary (on calculator or sums and writes down on second sheet - first one must be destoyed!)
 
So we have R+A
Person B adds salary R+A+B - he knows nothing abount R or A - he sees only sum R+A
Person C adds salary and removes his random number A+B+C - he knows nothing about A or B - he sees only sum A+B.
 
Next, when you have a sum of A+B+C feel free to divide by 3 to get the average  Wink

 
It is funny how people think. I am mathematically inclined and I solved
this problem in a very similar way to Jora. However, my wife thinks
totally differently. Here is her solution (which I think is actually much
simpler):
1) Get a game of monopoly
2) have each individual come up take out thier weekly salary in play
money.
3) have each person put thier weekly salary in a hat, shake it up if  
you like.
4) count the money and multiply by 52/3
IP Logged
Kozo Morimoto
Guest

Email

Re: ghetto encryption 2  
« Reply #5 on: Jul 26th, 2002, 5:26pm »
Quote Quote Modify Modify Remove Remove

I don't like the solution where 2 have more information than the other.  Solutions including passing information between only 2, can very easily be compromised.  B and C could get together and trick A into revealing his/her salary without neither B or C giving out his/her salary.  The ALL information transfer has to be transparent to ALL involved.  If I was A and was paranoid (like in the riddle spec) I wouldn't agree to a system where by colusion between B and C was possible.
 
The solution involving a 4th party (ie the hat) was the only solution that I could come up with, although it involves elements outside of the riddle specifications.
IP Logged
Rhaokarr
Guest

Email

Re: ghetto encryption 2  
« Reply #6 on: Jul 26th, 2002, 9:07pm »
Quote Quote Modify Modify Remove Remove

I agree with Salem - the easiest method we came up with involved tokens of some kind rather than a mathematical answer.
 
Hell, if you could be sure the other two would not compare notes, you could reveal part of your salary to each, keeping a remainder of your salary to yourself: eg, tell one your part is 15K, tell the other it's 10K, and keep 8K to yourself.
 
The you total the three numbers you now have (your portion plus B's portion plus C's portion), and reveal it. Sum all the revealed numbers and divide by three, you have the average answer without revealing your actual salary. You don't even need a monopoly set, nor much mind for maths.
IP Logged
Jora
Guest

Email

Re: ghetto encryption 2  
« Reply #7 on: Jul 30th, 2002, 3:14am »
Quote Quote Modify Modify Remove Remove

Interesting (off)topic - security compromising.
I'd rather think that my own security has the top priority. Counting this statement on I won't compromise security because this reveal my salary. I.e. If my "friend" sibling knows the salary of my "enemy" sibling, he will be able to calculate my own salary (subtracting from the sum his own and "enemy" sibling salaries...) It does not matter which method you were using to get the sum - if you want your salary remain secure - don't compromise security in any way!
IP Logged
Psudo Sapian
Guest

Email

Re: ghetto encryption 2  
« Reply #8 on: Jul 31st, 2002, 8:02pm »
Quote Quote Modify Modify Remove Remove

Trivial soloution: use a trusted fourth person.  Not within the specs. of the riddle, but that is usually the most practical soloution.
 
IP Logged
mook
Newbie
*





   
Email

Gender: male
Posts: 15
Re: ghetto encryption 2  
« Reply #9 on: Aug 3rd, 2002, 9:49am »
Quote Quote Modify Modify

My solution was perhaps too simple. A and B both write theri salaries down on separate pieces of paper, mix them up and give them to C, who computes their average salary. C will know A and B's salaries, but not specifically who is making what.  If that's too much info for one person, then A and C can give theirs to B, and B and C give theirs to A, they all know all three salaries, but not who makes what.
 
Huh
IP Logged
Toby Muresianu
Guest

Email

Re: ghetto encryption 2  
« Reply #10 on: Aug 5th, 2002, 5:05pm »
Quote Quote Modify Modify Remove Remove

2 easy solutions -  
 
one obvious one is each person makes a pile of pennies (out of view of the others), one penny for each 1k say, puts them in a paper bag.  Then they meet and dump all the pennies in a big bag without looking (or get someone else to dump all the paper bags together; they don't even have to know whose is whose); then they count up all the pennies and divide by 3. A little roundabout but it works
 
simpler solution--people are mentioning using calculators--ok, so put a piece of tape over the screen and have each person type in their salary and then '+'; the last one hits divide and three and then voila! the tape is removed.
 
Again, not really magic.  But that's how I'd solve it if I was in that situation...
IP Logged
oren
Newbie
*





   
Email

Posts: 3
Re: ghetto encryption 2  
« Reply #11 on: Aug 8th, 2002, 6:19pm »
Quote Quote Modify Modify

It's stupid to worry about someone knowing the sum of the other two people's salary's, because everyone will be able to figure that out once they know the average. So all you need is a way for one person to learn the sum of the other two people's salary's.
 
So the solution A writes down (types into calculator, whatever) a random number, B adds her salary to the number, passes to C who adds, then A subtracts the random number, adds then divides by three.
 
The tape over the calculator does the same thing as do most of the other schemes. Three random numbers seems silly however. Maybe if the goal were to tell the information to a forth person who only got to know the average, it would be useful because that way the forth person wouldn't get any information except for the average.
 
I think.
IP Logged
Spork
Guest

Email

Re: ghetto encryption 2  
« Reply #12 on: Aug 14th, 2002, 5:14pm »
Quote Quote Modify Modify Remove Remove

My solution was a bit different.  I decided that A should give some random fraction of his salary to B, and his salary minus the random fraction to C.  Then B can give his salary plus the random fraction to C and C can add them all up and divide by 3.  Of course this isn't very good if A doesn't trust B and C to talk.
IP Logged
James
Guest

Email

Re: ghetto encryption 2  
« Reply #13 on: Aug 16th, 2002, 11:53pm »
Quote Quote Modify Modify Remove Remove

here are two more solutions:
 
1.  write a small program that prompts for 3 values individually and then clear the screen after each entry.  The program then spits out the result for all to see.   Wink
 
2.  find a simple calculator that has M+ and MR memory functions.  
a.  clear the memory of the calculator
b.  person 1 enter his salary, hit M+, then hit AC to clear display
c.  person 2 enter his salary, hit M+, then hit AC to clear display
d.  person 3 enter his salary, hit M+, then hit AC to clear display
e.  press MR to recall the sum from memory.  Then divid the sum by 3.
 
My freebie calculator from a trade show worked perfected for this purpose. Kiss
 
 
IP Logged
jk
Guest

Email

Re: ghetto encryption 2  
« Reply #14 on: Aug 27th, 2002, 1:27pm »
Quote Quote Modify Modify Remove Remove

I have to agree with Rhaokarr: divide your salary into three not-necessarily equal portions, give one to each friend and keep one, Then each totals the three and the three totals are added and divided by nine.
 
I would just add that any of your "thirds" could be positive or negative, as long as they add up to your salary. this could further obfuscate your salary.
 
If any two want to share their salary with each other, and have any math ability, they will easily compute yours from the final answer, however skillfully it is computed.
IP Logged
fnorrgy
Guest

Email

Re: ghetto encryption 2  
« Reply #15 on: Sep 2nd, 2002, 4:27pm »
Quote Quote Modify Modify Remove Remove

I don't think it's worth worrying about whether B & C will conspire against A, because if they did, B & C could figure out each other's salary as well, and the problem says they all want to keep their salary secret.
IP Logged
Cristian B.
Guest

Email

about M+ and MR  
« Reply #16 on: Sep 3rd, 2002, 6:37pm »
Quote Quote Modify Modify Remove Remove

i was thinking the same, but since they are paranoid, A wouldn't trust B not to press MR before typing his salary in...
(and this is the exact same problem with Monopoly. B could count to see how much is missing. Though A could theoretically take MORE than needed and hide some...)
 
So valid solutions i saw so far were the random number(s) and the blind calculator.
 
(there are other suggested answers in the topic 'ANSWERS TO MEDIUM PUZZLES!!!  Part 1' by 'I.M._Smarter_Enyu')
IP Logged
Chronos
Full Member
***





   
WWW Email

Gender: male
Posts: 288
Re: ghetto encryption 2  
« Reply #17 on: Sep 6th, 2002, 5:17pm »
Quote Quote Modify Modify

The blind calculator has the same problem that the memory calculator has:  If we don't trust a person to not press the MR key, then we also shouldn't trust a person to leave the tape in place.  And if we watch a person to make sure that he does neither of these things, then we can see what buttons he pushes.
IP Logged
vaio
Guest

Email

Re: ghetto encryption 2  
« Reply #18 on: Sep 1st, 2003, 8:48pm »
Quote Quote Modify Modify Remove Remove

I agree with Rhaokarr's solution, but i believe that the question itself is unpractical.  Reasoning:
 
After applying Rhaokarr's method, the three co-workers are satisfied, having figured out the average without disclosing their own individual salaries.  Or are they?  Let's say the average is 2000.  Co-worker A (WLOG), compares this number to his own salary, which is 100.  The average is 20 times his salary so he figures that either both of his co-workers or one of them is making a fortune.  and so he decides to rob both of them.  But... the culprit, co-worker B, who is making the fortune, is not dumb either.  His whopping sum of 4000 is double the average, so he knows that either A or C is making significantly less than the average.  In attempt to escape danger, B decides to start a business of his own somewhere else.  Having lost B, a valuable asset, the company shuts down, and both A and C are without jobs... poor C.
 
ok ok, i agree that this answer is too far-fetched.  however, i bet few people will ever see my post, since it has been a long time since the last one....
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board