A man is again hired to cut cake at a party. He was informed the day before the party that out of total of people, people could definitely attend the party but persons weren't sure if they could make it or not. To make sure everything would be fair, he decided the cut the circular cake into slices such that if either or people attended the party, the cake could be distributed evenly to all attendees. At first he thought he needed LCM( , ) = slices but his wife informed him that he was being an idiot . Such an intelligent wife !!!!!!
What is the minimum number of slices the cake cutter needs to slice the cake into such that either or people can attend the party and the cake can still be distributed evenly?
P.S. Can you generalise your answer for , people?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The cake has to be cut to at least 48 pieces if the man wants everyone to have a slice, therefore if there are only 40 guests there will be 8 extra slices. So what will the man do? Simple, he will cut those extra 8 slices into 5 even pieces each so that now he will have 40 small even slices. If 48 guests were to arrive then 40 of them will get a big slice while the other 8 will each get 5 small slices that sum up in size to a big slice, and if 40 guests arrive then each will get one big slice and one small slice. That way all the guests will have a slice in both cases. So to sum it up, the man slices the cake into 40 big slices and 40 small slices so overall there are 80 slices to the cake. In the general case of m or n guests, without loss of generality assume m < n . Then we will slice the cake to n slices. Then, we will take n − m slices and slice each of them to n − m L C M ( n − m , m ) slices. This will leave us with m + ( n − m ) ∗ n − m L C M ( n − m , m ) = m + L C M ( n − m , m ) slices.