@asdbanz316 You get another 4 persons to form a "Coin Flipping" team. Hire a consultant to oversee the them. Once they done and reported back to you, discard all their work and subcontract the job to an external party.
Instant solution: put 50 coins in each pile. The puzzle says to “divide the coins into 2 piles so both piles have the same number of heads.” Each coin has one head and one tail, so any 50 coins will have 50 heads and 50 tails. There is nothing in the problem statement which says anything about the heads being face up or face down.
Give that answer in the interview and you get passed by. Give Presh's answered and you will also get passed by. No where in direction was it said you could flip over any of the coins !
Take 50 coins, sort them into a pile, lay it down on the side. Do the same for the rest. It'll be a little fiddly, but it should be doable. Two piles of coins on the side, no heads in either. Or, lazy boy solution. Declare each coin is a pile. Any one pile will have at least nine other piles with the same number of heads.
Start sliding coins from the original pile, one at a time, into a second pile. At some point in the process, you'll slide a fifth head into the second pile and fulfill the conditions. Being blindfolded, you can't tell when this happens, but the task doesn't specify that you must divide the coins into the specified piles and stop, just that you get five heads in each pile.
Similarly, you could just grab 3 coins and put each into it's own pile. Two of them definitely have the same number of heads... You just don't know which ones.
love that solution. You could even ask the questioner "is the test over once a solution is obtained?". If they say yes, then they are committed to stopping the test and will help you find the solution.
As programmer, I find the question somewhat misleading. When working on an algorithm to sort data into specific categories, they tend to imply "Do not alter the data". Otherwise every sorting algorithm would be O(n). "Just go over each element and alter the data so that it's sorted".
The point of the question is to see how you order your thinking, so at first glance it would seem that solving this riddle would be impossible or it would require luck, but if you think about all the things you can do to the coins, you will eventually get the right answer. But really, these questions just serve as a way to weed people out, they're not a requirement to be good at whatever job they're hiring you for and are often just a reflection of how often you've been exposed to these things rather than a marker for intelligence or creativity or demonstrating how good of an employee you'll be. It's like solving any kind of puzzle, you'll pick up on the sort of tricks the puzzle maker uses and they become easier over time.
@@jakeic1 All the more reason for me as a programmer to loathe these kind of questions. They are "gotchas" rather than actual programming questions. I watch this channel expecting the occasional trick. But this is a question presented at a tech company. I expect questions related to tech. Not puzzles that you can only solve if you think to do the one thing that would be the absolutely most pointless thing to do in a sorting algorithm.
Nothing in this question said anything about "working on an algorithm" (or anything to do with programming at all). If they asked a question about how to get a cat out of a tree or how to cook an omelet, would you also assume that they meant "using only software"? These sorts of questions are clearly logic or thinking puzzles, based on real-world scenarios, not programming puzzles at all. It really just sounds like you're making excuses for your limited thinking, frankly.
Start with one pile, move one coin at a time into the second pile and ask “have I done it yet?”, repeat until the answer is yes. You might not get a job at Apple, but you should get one at Microsoft.
Suboptimal! Move 5 coins to make your first pile - you can't have equal numbers until your pile has 5 coins in it. Then keep moving coins individually until you have 95 in the new pile. You will have satisfied the requirement at some point.
I call this the "Clever Hans" approach. Clever Hans was a horse that could supposedly do math. His handler would ask him a math question like "what's 2 x 3?" and he would give the answer by scraping his hoof on the ground 6 times. But what people didn't realize is that he had learned to just keep scraping until his handler gave a subtle nod, at which point he'd get a piece of apple. So in a way, the correct answer is "keep brute-forcing the solution until your manager is happy," which is always the best advice.
Elegant! My gut reaction when you stated the problem: "Flip each coin in the air into alternating piles; flip a coin into pile X, then another coin into pile Y, repeat until all 100 coins have been flipped. The probability that both piles have 50 heads is high, plus the probability of both having 48, 49, 51, 52, etc. - it's simple, fast to implement, mostly right."
THAT idea really impresses me. because the "you are put into situation x"-premise is part of every puzzle, it is so easy to not see it as a variable one could also influence...
As someone who has done programming on and off for 35+ years in various different languages, this is a horrible interview question for software engineering. Ability to solve logic problems and the ability to write quality software are two completely different skill sets.
Aye. I assumed at first that there needed to be 5 heads in each pile. Having said that, I learned in a job interview to be sure to properly specify the problem before trying to solve it.
Oh, I’ve seen this question elsewhere. Set aside any 10 coins into one group, then flip over all the coins in that group. The only thing you know about the coins is that 10 out of the 100 are already heads up. If the coins you randomly take are all 10 heads up coins, then turning them over would leave you with 0 heads in this new pile, and 0 in the larger pile. If 0 coins you took were heads up, then you’ll now have 10 in the small pile, and 10 in the larger pile. Take just 1 heads coin and 9 tails coins? The large pile now has 9 heads coins, so flipping the small pile will give you the same number. This works for any random result you can get from taking 10 coins from the large pile. Any heads coin you take for the small pile takes 1 away from the large pile. Or to put it another way, every tails coin in the small pile represents a heads coin you *did not* remove from the large pile, so you end up with the perfect number regardless of the ratio.
Algebraic explanation. 1. Select 10 coins arbitrarily. Let's call it pile A. 2. The remaining 90 coins are the pile B. The pile B has X coins heads up, where X
You solution says nothing about knowing that the 10 coins are initially heads down, so flipping them all over only alter what each coin was before to its opposite. Your solution isn't. Sorry.
@ yes. It alters what each coin *in that group of 10* are. And it so happens that no matter what 10 random coins are in that pile, there will be as many tails-up coins there as heads-up coins remaining in the larger pile of 90. If you flip that group of 10, you will always end up with equal heads-up coins in both groups. If you randomly take 3 heads and 7 tails, you’ve removed 3 heads from the larger pile, leaving 7. So flipping the group of 10 makes that 3 tails and 7 heads, causing there to be equal heads in both piles. Try this logic for any random assortment of 10 coins you take from the original pile, and you’ll get a similar result.
My solution is like that Cut each coin in half and put one half in pile A and the other half in pile B Now both piles have 5 heads and 45 tails with 100% probability
Technically that would leave you with 10 heads and 90 tails in each pile. Cutting the coin in half wouldn't reduce the number of head/tails. Still solves the problem though.
I solved this by realizing that coin flipping had to play a role. And if I wanted an algorithm that always worked, i couldn't allow for a probability of failure. So, I want a second pile, with, say, m coins. And then I flip n of them. But it's clear that if 0 < n < m, this approach will allow randomness. So, I have to flip all of them. Now, let's say there are k heads initially in the second pile. That leaves 10-k heads in the first pile. And after i flip the m coins, I'll have (m-k) heads in the second pile. So if I want m-k = 10-k, I select m=10.
Here's my 2 part solution: 1) Politely inform the interviewer that their position is not a good fit for you. 2) Go to another company that respects software engineers enough to ask them software engineering questions.
I was trying to extract some more generic problem/riddle solving strategies and I came on a nice way to simplify this problem!!! Instead to 100 coins and 10 tails reduce to 10 coins and 1 tails. Then it's pretty obvious that you can just take a coin with impunity and flip it! From there, you just have to realize that that property also applies to taking a subset of coins and flipping them :D
This doesn’t scale up. In the smaller version, one coin represents either all of the tails or none of the tails. You can’t have that guarantee with the higher resolution of 100 coins.
I like this approach, too, starting with a smaller, but representative problem. It was not obvious to me immediately that ten is the right number to move out of 100, but with the reduced problem it becomes quite clear. Cheers
This solution is also used in a very famous card trick which i performed to my friends couple years ago. Instantly got it once i realize the connection.
It is also analogous to the old puzzle about mixing alcohol and water: put some of the alcohol into the water, and then put some of that mixture back into the water. Which container then has the higher alcohol content? Duh!
@@notsus8537 The someone else will leave with all the coins in their pocket. I guess 0 coins showing "heads" in each pile satisfies the required end condition.
My algo prof gave me this puzzle 20 years ago (a variation thereof: 10 cards facing up on a deck of cards). To annoy him, I told him the same thing: create 52 piles, and you'll have at least two with the same number of cards facing up. The goal was achieved. ;-)
Didn't watch the video, but straight away I had the solution: Pick 10 coins at random from the 100 coins pile, flip them and make them the second pile. Now, let's denote X to be the number of coins that showed heads in the original pile that we picked and flipped when we moved them to the second pile. Therefore, each pile now has 10 - X coins showing heads.
This is a great puzzle, indeed with many clever solutions that can say a lot about the solver. I appreciate that you took the time to unpack more than one of them. I enjoy puzzles like this one, and am also a coin enthusiast... so here's a fun fact: If you perform the flip depicted at 0:21, the tails image would be upside down. American coins need to be flipped about a horizontal axis (commonly known as a vertical flip) to go from upright heads to upright tails.
@@Nshadowtail quite the opposite, in fact. take a set of coins being flipped with a target of 50%H to 50%T (1:1) 2 coins = 50% chance that you have an even split 4 coins = 37.5% 10 coins = ~24.6% 20 coins = ~17.6% 50 coins = ~11.3% 100 coins = ~8% 100 coins = ~2.5% simply, this is because there's a much larger range of numbers it can land on, and more trials leads to more variance. ask your LLM of choice for an explanation about the statistics of coin flips
on the other hand, when you flip more coins, you increase the chances of getting close to 50% - the average tends towards 50%. but the chance of hitting it exactly still goes down. if you're playing a game where there's a 60% chance of gaining $1 and a 40% chance of losing $1, you should only play that game if you can afford to lose a fair bit of money, and only if you get a lot of chances. if you play 3 times, you can easily lose $3, that will happen 35.2% of the time. if you play 1000 times, you're set to earn about $200, and the chance of losing money is 0.0000000067%
That's bot how it works. If you shake your bucket 100 times the average will be close to 60/50, but any individual shake of the bucket could have any outcome. Think of a pair of standard dice in a game. There's only a 1 in 36 chance that you roll a 12, but 12's happen all the time none the less. Every single roll is not a 7, even though a 7 is more likely than any other number.
Sometimes when I see your thumbnails pop up I'll put my phone down and think about it. This time I'm glad to say I worked it out in my head pretty quickly! Thanks for all you do 🙏
Have not finished watching the video yet. I believe that if you divide into a pile of 10, and a pile of 90, and then flip all the coins in the 10 pile, then that would work. If all 10 happen to be heads, then they get flipped over and there are 0 heads in each pile. If 9 are heads, then the other pile must be 1 head and 89 tails. Flipping the pile of 10 turns the 9 heads into 9 tails, and the 1 tail in to 1 head, matching the larger pile. And so on - should work for any combination of heads and tails in the pile of 10.
That was my solution as well. Simple probability. No matter how many heads I get in the pile I will have tails equal to the amount of heads in the other pile and flipping them makes them match.
I'm a bit disappointed, Presh, that you didn't show that this solution also works for any other number of starting Heads. It's intuitive that it works for x50 too
1. Every coin has a head and a tail. You didn't specify face up. So two piles of fifty coins satisfy the conditions. 2. I pocket all the coins and designate two piles of zero coins. Even if the interviewer disagrees, I end up with a hundred coins. 3. Take fifty coins and turn them all over. Irrespective of the number of heads or tails originally, the numbers will be the same.
Your solutions 1. and 2. might be rated highly for originality. Unfortunately, 3. costs you the job as it is wrong no matter how you split the groups. A counterexample shows the fallacy: suppose your group of fifty is all tails - after the flipping you have 10 heads in the original pile and 50 in the new pile. There is no distribution of 50 and 50 that would work. You could retreat to your solution 1., but the interviewer might counter that you have then wasted time counting and flipping 50 coins.
As a former Apple manager, this is a teamwork question... although you cannot see the coins, there is nothing saying that you can't get a team member to look at the coins and solve the problem with you.
As someone who hates management, this is a shitty interniew question from a technical and teamwork perspective. Do all HR employees have hollow brains?
@@macchiato_1881 You might not like it, but this is hiring for a corporate job - so it is trying to eliminate people who can't deal with questions with no obvious answer, people who can't question whether this is the right question to be asking, people who hate management, people who can't be diplomatic with HR, and people who can't spell "interview."
99% of the time the interviewer will learn absolutely nothing about the candidate's teamwork skills from their answer to this question. "Tell me about a situation where you had to work with a team to accomplish a goal" will yield much more information about the candidate's approach to teamwork, their memory, communication skills, general intelligence, and approach to problem-solving. There's no need to throw trick questions at people to learn about the skills that really matter in the workplace.
@@JLvatronI don't remember seeing this type of question on this channel and I have visited all the videos. But I saw this question on Bright Side with 52 cards and 13 facing up in which the youtuber specifically narrated that the front side must face up.
@@mohitrawat5225 I recall seeing it in a logic puzzle UA-cam video. I mostly watch Presh's videos, but it's always possible it was another. And I think you're right it was about cards.
Got it by 2:43! The rules never state we can’t flip coins (in fact, the setup seems to sneakily suggest that it is expected). As opposed to splitting one pile into two separate piles, you want to take one pile, and by removing coins from it, create a second pile. (Important mental distinction). The number of tails in either pile is irrelevant. Thus, to get two piles with an equal number of heads, all you have to do is take 10 coins from the 1st pile, flip them, and then put them in the second pile: If you took a tails, it results in a heads in the second pile: the number of heads in each pile are now 1 closer to each other If you took a heads, it results in a tails added to the 2nd pile, and also results in a head removed from the first pile. As such, the number of heads in each pile is now 1 closer to each other. As the first pile starts with ten heads and the second pile starts with 0, you need 10 such moves to make the number of heads end up equal. (For an example, imagine all the coins transferred were tails. 10 tails would be flipped and added to the 2nd pile, resulting in an equal 10 heads in both piles. If all the coins transferred were heads, 10 heads would be removed from the first pile, and no heads added to the 2nd pile, resulting in an equal 0 number of heads in both piles.)
My reasoning was this. Take 10 coins and flip them and put them in the 2nd pile. That way you have 90 coins in first pile and 10 on the other. With equal number of heads. I will check the video to see if I'm correct later when my network gets better
If your gloves are thick enough that you can’t detect the difference between a head and a tail by feel, then there’s also a strong chance that those gloves make it nearly impossible to pick up a coin off a table and turn it over. Thus negating the first solution Presh gives.
@@EaglePickingthey don't have to be thick even surgical gloves will dull touch enough especially if just a little to big but will not cripple dexterity.
@@brianzmek7272counterpoint 2: you can pick up a coin and "scratch" the surface of another coin and try to feel what kind of coin is it by how the coin moves
1:57. Oh, duh. Move/flip 10 coins to the new pile. This will leave the same number of heads in each final pile. If you happen to pick the 10 heads coins, both piles will have 0 heads. If you don't pick any heads coins, then in the end both piles will have 10.
It took me one or two minutes in my head to come up with the solution before starting the movie. Seems like I have seen enough riddles on your channel...
Better solution: split the piles into 50 coins each, each pile in a box and never look inside the box as each coin is both heads and tails until you look inside 😁
This one had me thinking a little, but thankfully I could solve it quickly, since I knew the problem wouldnt be so straight forward, I tried thinking outside the box and quickly realize that I could flip 10 coins and get it right 100% of the time
I actually would have said this solution in an interview based completely on the logic blind guessing 10 tails is not horrible odds. I did not come to the realization that it always worked, i just knew it was more likely than anything else i could think up 😂
I'd like to point out that dipiction is a group of coins and not a pile of coins. The term "pile" implies stacked on top of one another. A pile of 100 coins stacked perfectly would be very tall and prone to falling over, ruining the distribution.
@Grammulka i'd say a stack is a pile but a pile isn't always a stack. A stack is an organized pile. A pile is a 3 dimensional grouping of objects. A grouping is any number of any objects in close proximity.
If you can’t flip the coins, my solution was N/X where N is the total coins and X is the number of heads. Then randomly sort the X groups into the number groups you want it divided into. So break the quarters into 10 groups of 10 then randomly choose groups to go into the 2 big groups.
The first two solutions that come to mind. 1. Place them in rolls lying sideways to ensure no heads are facing up, guaranteeing an equal count. 2. OR Cut each coin in half, placing halves in separate piles to achieve equal distribution. The actual solution is something that seems so obvious in hindsight, I thought it was a word problem
People at Apple are not solving "impossible problems". Maybe a tiny percentage of engineers are working on very difficult problems, the vast majority will just be very capable and professional developers. This idea that they are like scientists and researchers is a ridiculous joke.
Yep, they are just like painters; the vast majority is limited to doing walls and ceilings and the very rare one paints a ceiling like the Sistine Chappel.
1:08 "you are not expected to solve the puzzle instantly in your head" Welllll I already found a solution (at least I think so) when you said that sooo what should I do then x)
9:59 here's a joke answer that gets you thrown out the window like in the meme, note he said working for Apple. So we have 100 coins, 90 coins that work, 10 that don't. If I wanted to get hired, I would just sell them 100 new coins. If I wanted to be blacklisted, I could suggest repairing the all the coins for a price less than buying all of them over again. We could even just let our customers repair their own coins and make it as easy as possible for them to repair their own coins rather than force us to fix it by selling them a brand new coin.
0:42 here's my answer: divide the coins into two equal piles, pile 1 and pile 2. Flip all the coins in one of the piles, say pile 1. Boom. That should make a pile with mostly heads and mostly tails. Then divide each pile into 2 more piles. You should have pile 11, 12, 21, and 22, where piles with a 1 in the tens digit started in the first pile in the first split off, and those with a 2 are the other first pile. Then the ones digit is the second split. Swap pile 12 and 21, then combine 11 with 21 and 12 with 22. The number of coins should be equal. Sorry if I explained it poorly.
My answer would be to split the piles into 50 and 50, then flip all the coins (not to the other side, flip to randomize) and that should get you statistically close to an even amount, but you are still relying on chance to actually get a match. More often that not you would end up 1 or 2 off. Once I watched more and you clarified that you can't feel the faces though, then I went to putting all the coins on their edges. Flipping exactly 10 is a very clean answer though. I didn't think there would be a way to get 100% accuracy
Before getting too far into the video, I'd flip every odd coin and move to one pile, leave unflipped every even before moving to another, and if I know the orientation which the ten coins are that is horizontal or vertical, I would pick from the other orientation. This would result in 45 flipped tails, 45 unflipped tails, 5 flipped heads, 5 unflipped heads, for a total of 50 heads and 50 tails.
My solution: Use my elbow to feel the coins, who said that I need to use my finger to do it. Edit: I guess you can also lick them but that's kinda gross
@@soulfullofcherries Yeah, he did take a long time to get to it. I was sure of the answer. I had to keep jumping ahead through his calculation of probabilities and other irrelevancies.
My first thought was take the entire pile of coins, flip each one in the air so its a random heads or tails, and place them alternating in the first, then second pile, flipping each coin as you go. Statistically you should come up with roughly the same number of heads in both piles, since the outcome of a random event doesn't care if the initial state was heads or tails. This of course, works better the bigger the pile of coins you have is.
Stand all the coins on end. There are now no heads up, no tails up. Divide them into two rolls of fifty, still keeping them on edge. Easy peasy. Okay, now to watch the video.
This reminds me of a question asked of me in 1986: You have a cup of coffee and a cup of milk. You take a spoonful of coffee and mix it into the milk cup. Using the same spoon, move a spoonfule back. Is there now more coffee in the milk cup, or more milk in the coffee cup?
My first thought was to take each coin, toss it, make two piles of the random result. It's not going to be perfect, but the odds of getting a similar number of heads in both piles is higher by starting with a 50/50 is better than a 10/90.
Without looking at the video, separate off a group of 10 coins. Now turn all the coins in that group over. Both the small group and the largeer group will have the same number of heads. If we call the number of heads in the original 10 coin group h, that means it has 10-h tails. The group of 90 must have 10-h heads left. When we turn the group of 10 coins over, those 10-h tails will turn to 10-h heads and the h heads will become tails. Nb. Now watching the video, it is so frustrating to see so many dry runs with actual numbers. Just put a variable in there and you can prove it works for all of them. It is a brilliant little puzzle.
Stopped at 0:57 take 10 coins and flip them over no matter how many of the coins you take with heads you’ll have the same number once you flip the pile of 10. Take none 10 heads in both take them all 0 heads in both. Take any other number away from them with heads and flip them they become tails meaning the amount you flip matches the heads. There’s a similar Ted Ed riddle.
But if you're not allowed to flip the coins ( which is what is led to be believed at first) the most likely way of sorting them is by sptlitting them equally.
I would use the edge of the table to get the facing details. You can hear differences in the sound and even feel tension differences through gloves. So a few swipes on the corner will tell you the distinction. Ass soon as you find the 11th similar side, you know that side is what tails sounds like, and thus can just find the 10 heads, place 5 on each side and evenly split the rest.
Before I listen to the video, my answer would be to feel the coins. I might not know which is head or which is tail, but there will be a difference. I’d continue until I have more than 10 of one kind, which will tell me that those are tails, and I’d continue to look for the other kind (heads) until I find 10 of them. Another, even simpler solution, would be to ask a sighted person: “is this a head?” for each coin I present, and place the coins with a “yes” answer in one pile and then”no’s” in another. Then count half of each pile and form two new piles. PS I didn't realize that the initial condition was to wear gloves. PPS It's fascinating that there are so many ways to solve this, but it would have helped if the question was phrased mathematically. Presh's solution seems to be the one that was wanted (and the most elegant), but the question and the conditions of the situation were far too vague. In a real-world scenario, there are a multitude of legitimate ways to solve it, even by simply removing the blindfold. Indeed, the interview situation is such that it primes the candidate to suppose that it may be a trick question, or that the conditions are deliberately ambiguous simply to gauge the reactions (like a Rorschach test). The correct solution, formulated mathematically, is that any collection of Xs and Ys (where Y is the inversion of X) would result in two groups, each with the same number of Ys, if you transfer N elements to a separate pile and invert them all. Proof. If M Y's are in Group 1 and you transfer N coins (where N
Take each coin and flip it, place half in A and half in B. Should be close enough to even assuming you aren't accounting for the heads up paradox where whatever side is facing up has about a 51% chance of being up when the flip is over.
You divide 10 coins from the group and flip them. Now you have 2 piles with equal head facing coin. The riddle doesn't stated that you can't flip them. Example: Your 10 selected coins have x amount of head. The 90 left will have 10 - x head facing coin. That'll be your first pile. After you flip those 10 coins from the second, all of those x facing coins will become tails and all off those tails will become heads. So 10 - x (number of coins in the second pile) - (number of head facing coin has been fliped) is now the number of head facing coin in the second pile
Mix all coins well, assuming the mix between heads and tails is uniform ,separate 50 coins in a new heap and hope 5 headers are in each heap because the mixture was uniform
The answer that occurred to me was, flip all the coins randomly. There will be somewhere close to 50% heads and 50% tails in a random distribution. Then just put 50 of them in one pile and 50 of them in the other pule.
I understand that you try to show the thought process. But I think the hardest part here is to rethink the text of the task until you see all the options (like flipping). Though the solution is very inventive and is not obvious. It is hard to find the solution that is so unusual.
I initially took it one step further. I thought it wanted the same amount of HEADS & TAILS on each pile, blindfolded. I instantly thought, that’s easy in two steps 1) split the stack in half 2) choose ten coins to flip over on one side Solution will have both sides equal.
Divide the coins into two piles. Randomly flip coins in both piles. Over time the number of heads and tails in each pile will move to an equilibrium 50/50. At some point you will have equal numbers of heads and tails in each pile.
@MindYourDecisions I have a suggestion for your videos: Can you please put a disclaimer after the problem statement to let us know if the problem requires a "clever" "outside the box" (very simple) solution like removing the blindfold, or not. I'd like to invest some time into these puzzles, but there's nothing more frustrating than finding out at the end it's one of those "clever" puzzles. I this video the puzzle was worth investing time into, but it'd be better if you told us we can flip the coins and we don't need an outside the box solution just so that the rules are very clear for everyone.
for me, I have stand all the coin up on it edge, and put it two group, you will sure get the equre answer 0. (oh, I have the answer in 10 sec and before watch the video.)
I 'tossed' every coin so they'd be randomly heads or tails then put them in two piles of 50, letting probability take the reins. Guess I'm a Windows guy.
If it's using the coin depicted, my first thought was to hold one coin and scrape its edge along the rim of each other coin where the words are. The tails side has far more letters, so the difference in the bumps should be pretty clear.
I was asked such a mind-exercise question when interviewing for a job with Raytheon. I could not answer, and no, I was not offered the job. I thought of the technicality answer here - and I considered it cheating as well. I like the analytical solution you came up with.
at the risk of over simplification, this problem is a good one to ask in an interview because it parallels a real problem in computer networking, that of signal balance and encoding systems (e.g. 8B/10B etal). Sending a long stream of says 1s (in this case heads) over an optical channel using just a 1 might burn out or degrade the medium or hardware in some way (or electrical signal balance) if you didn't come up with some scheme that would allow you to always send a balanced signal even though you "were blindfolded" didn't know what data was going to be transmitted. I first learned about this when studying the fibre channel protocol and networking for storage applications and it's use of 8B/10B encoding.
Okay, here is my thought: flip every other coin as you sort them into two piles. While it doesn't guarantee that both piles will have an equal number of heads and tails, it will cause the coins themselves to reach a 50/50 equilibrium, which means that if they are being provided to you randomly you have a fairly good chance of being nearly 50/50.in what is in each group
Another solution can be to split them in half, regardless in which of the two meaningful ways. If they are cut into two half circle shaped coins you only need to separate the halfs. If you cut them to get the two sides separated so that heads and tails are on the outer side while on the inner side there is the cut, the upper part belongs to one pile while the lower part needs to be flipped and put to the second pile. That way you even know that in both piles there are 10 heads.
If you are applying for a management position, you just tell someone without a blindfold to do it and then take credit for their work.
Like a boss
But what if they did it wrong to set you up. What will you do as manager?
@asdbanz316 You get another 4 persons to form a "Coin Flipping" team. Hire a consultant to oversee the them. Once they done and reported back to you, discard all their work and subcontract the job to an external party.
Blame the subordinate, claim ignorance of the situation, hide behind HR's lawyers. Easy.
doesn't say you can't get help
Instant solution: put 50 coins in each pile. The puzzle says to “divide the coins into 2 piles so both piles have the same number of heads.” Each coin has one head and one tail, so any 50 coins will have 50 heads and 50 tails. There is nothing in the problem statement which says anything about the heads being face up or face down.
Yeah...once again it was a word problem. Glad I got straight away.
Give that answer in the interview and you get passed by.
Give Presh's answered and you will also get passed by.
No where in direction was it said you could flip over any of the coins !
Take 50 coins, sort them into a pile, lay it down on the side. Do the same for the rest. It'll be a little fiddly, but it should be doable. Two piles of coins on the side, no heads in either.
Or, lazy boy solution. Declare each coin is a pile. Any one pile will have at least nine other piles with the same number of heads.
@dtkedtyjrtyj you would need to be a magician to do that with coins and there testing for intelligence not slight of hand. 🤪
the literal MOMENT i read this, presh started talking about this
Start sliding coins from the original pile, one at a time, into a second pile. At some point in the process, you'll slide a fifth head into the second pile and fulfill the conditions. Being blindfolded, you can't tell when this happens, but the task doesn't specify that you must divide the coins into the specified piles and stop, just that you get five heads in each pile.
Spoken like a true software engineer!
Similarly, you could just grab 3 coins and put each into it's own pile. Two of them definitely have the same number of heads... You just don't know which ones.
Or take two coins. Each coin is a pile. If the puzzle is solved, stop. A correct solution is guaranteed before the original pile is exhausted.
love that solution. You could even ask the questioner "is the test over once a solution is obtained?". If they say yes, then they are committed to stopping the test and will help you find the solution.
So you must have someone to tell you stop.
As programmer, I find the question somewhat misleading. When working on an algorithm to sort data into specific categories, they tend to imply "Do not alter the data".
Otherwise every sorting algorithm would be O(n). "Just go over each element and alter the data so that it's sorted".
The point of the question is to see how you order your thinking, so at first glance it would seem that solving this riddle would be impossible or it would require luck, but if you think about all the things you can do to the coins, you will eventually get the right answer.
But really, these questions just serve as a way to weed people out, they're not a requirement to be good at whatever job they're hiring you for and are often just a reflection of how often you've been exposed to these things rather than a marker for intelligence or creativity or demonstrating how good of an employee you'll be. It's like solving any kind of puzzle, you'll pick up on the sort of tricks the puzzle maker uses and they become easier over time.
@@jakeic1 All the more reason for me as a programmer to loathe these kind of questions. They are "gotchas" rather than actual programming questions. I watch this channel expecting the occasional trick. But this is a question presented at a tech company. I expect questions related to tech. Not puzzles that you can only solve if you think to do the one thing that would be the absolutely most pointless thing to do in a sorting algorithm.
Yeah, "you can flip the coins" was kind of important and was left out.
I'm an experienced programmer too and I thought of the solution naturally - it's obvious that the coins do not represent real data.
Nothing in this question said anything about "working on an algorithm" (or anything to do with programming at all). If they asked a question about how to get a cat out of a tree or how to cook an omelet, would you also assume that they meant "using only software"?
These sorts of questions are clearly logic or thinking puzzles, based on real-world scenarios, not programming puzzles at all. It really just sounds like you're making excuses for your limited thinking, frankly.
Start with one pile, move one coin at a time into the second pile and ask “have I done it yet?”, repeat until the answer is yes. You might not get a job at Apple, but you should get one at Microsoft.
Suboptimal! Move 5 coins to make your first pile - you can't have equal numbers until your pile has 5 coins in it. Then keep moving coins individually until you have 95 in the new pile. You will have satisfied the requirement at some point.
Only if you constantly say this will take 30 seconds then 50 seconds then 2 minutes then crash then count down again - Microsoft time.
This is why WHILE loops are not efficient
😂😂😂❤
I call this the "Clever Hans" approach. Clever Hans was a horse that could supposedly do math. His handler would ask him a math question like "what's 2 x 3?" and he would give the answer by scraping his hoof on the ground 6 times. But what people didn't realize is that he had learned to just keep scraping until his handler gave a subtle nod, at which point he'd get a piece of apple. So in a way, the correct answer is "keep brute-forcing the solution until your manager is happy," which is always the best advice.
Elegant!
My gut reaction when you stated the problem:
"Flip each coin in the air into alternating piles; flip a coin into pile X, then another coin into pile Y, repeat until all 100 coins have been flipped. The probability that both piles have 50 heads is high, plus the probability of both having 48, 49, 51, 52, etc. - it's simple, fast to implement, mostly right."
As a software developer, this is a hardware problem
As a soft developer, this is a hard problem
😂
As a non hardware developer this is software program problem
Another legal loophole: The riddle doesn't say you can't remove the blindfold, so take it off and find 5 heads-up coins to move to the other side.
THAT idea really impresses me. because the "you are put into situation x"-premise is part of every puzzle, it is so easy to not see it as a variable one could also influence...
You have blindfold and gloves? Sure. Lips and tongue are the most sensitive parts of the body. Dintinguishing coins is not hard.
The riddle doesn't say you can't remove the coins. Agressively sweep the coins off the table and yell EQUAL! 0 = 0! No coins on either pile.
@@gergely64630! = 1, not 0...
@@gergely6463 I see a HR employee here
As someone who has done programming on and off for 35+ years in various different languages, this is a horrible interview question for software engineering. Ability to solve logic problems and the ability to write quality software are two completely different skill sets.
this is not a logic puzzle
Well its because the market is saturated so they have to put all of these hidden gotchas to filter people out
@@hobrin4242it is
Aye. I assumed at first that there needed to be 5 heads in each pile. Having said that, I learned in a job interview to be sure to properly specify the problem before trying to solve it.
I agree wholeheartedly, and I don't program.
Oh, I’ve seen this question elsewhere.
Set aside any 10 coins into one group, then flip over all the coins in that group.
The only thing you know about the coins is that 10 out of the 100 are already heads up. If the coins you randomly take are all 10 heads up coins, then turning them over would leave you with 0 heads in this new pile, and 0 in the larger pile. If 0 coins you took were heads up, then you’ll now have 10 in the small pile, and 10 in the larger pile. Take just 1 heads coin and 9 tails coins? The large pile now has 9 heads coins, so flipping the small pile will give you the same number.
This works for any random result you can get from taking 10 coins from the large pile. Any heads coin you take for the small pile takes 1 away from the large pile. Or to put it another way, every tails coin in the small pile represents a heads coin you *did not* remove from the large pile, so you end up with the perfect number regardless of the ratio.
Yeah, I’ve seen it from Ted Ed
Algebraic explanation.
1. Select 10 coins arbitrarily. Let's call it pile A.
2. The remaining 90 coins are the pile B. The pile B has X coins heads up, where X
First, you should actively think about question, make some mistakes and take avail, after solve it with incredible solution)
You solution says nothing about knowing that the 10 coins are initially heads down, so flipping them all over only alter what each coin was before to its opposite. Your solution isn't. Sorry.
@ yes. It alters what each coin *in that group of 10* are. And it so happens that no matter what 10 random coins are in that pile, there will be as many tails-up coins there as heads-up coins remaining in the larger pile of 90. If you flip that group of 10, you will always end up with equal heads-up coins in both groups.
If you randomly take 3 heads and 7 tails, you’ve removed 3 heads from the larger pile, leaving 7. So flipping the group of 10 makes that 3 tails and 7 heads, causing there to be equal heads in both piles.
Try this logic for any random assortment of 10 coins you take from the original pile, and you’ll get a similar result.
My solution is like that
Cut each coin in half and put one half in pile A and the other half in pile B
Now both piles have 5 heads and 45 tails with 100% probability
Sigma
Whoa!!
That is actually out of the box
Technically that would leave you with 10 heads and 90 tails in each pile. Cutting the coin in half wouldn't reduce the number of head/tails. Still solves the problem though.
@@TeutonJon78 Are you a refrigerator
Yeah, good luck trying to cut the coins in half while blindfolded
I solved this by realizing that coin flipping had to play a role. And if I wanted an algorithm that always worked, i couldn't allow for a probability of failure.
So, I want a second pile, with, say, m coins. And then I flip n of them. But it's clear that if 0 < n < m, this approach will allow randomness. So, I have to flip all of them.
Now, let's say there are k heads initially in the second pile. That leaves 10-k heads in the first pile. And after i flip the m coins, I'll have (m-k) heads in the second pile. So if I want m-k = 10-k, I select m=10.
Here's my 2 part solution:
1) Politely inform the interviewer that their position is not a good fit for you.
2) Go to another company that respects software engineers enough to ask them software engineering questions.
I was trying to extract some more generic problem/riddle solving strategies and I came on a nice way to simplify this problem!!!
Instead to 100 coins and 10 tails reduce to 10 coins and 1 tails.
Then it's pretty obvious that you can just take a coin with impunity and flip it!
From there, you just have to realize that that property also applies to taking a subset of coins and flipping them :D
That’s a nice insight
This doesn’t scale up. In the smaller version, one coin represents either all of the tails or none of the tails.
You can’t have that guarantee with the higher resolution of 100 coins.
@@LaurenWhatever qua????
@@oov55 Oh, I misunderstood this solution. It would be a pile of 90 and a pile of 10. That works.
I like this approach, too, starting with a smaller, but representative problem. It was not obvious to me immediately that ten is the right number to move out of 100, but with the reduced problem it becomes quite clear. Cheers
This solution is also used in a very famous card trick which i performed to my friends couple years ago. Instantly got it once i realize the connection.
Yep, the same card tring came to my mind when I read the question
So, what's the connection?
same!
Yeah, quite sure I learnt this from Vsauce or somewhere similar
It is also analogous to the old puzzle about mixing alcohol and water: put some of the alcohol into the water, and then put some of that mixture back into the water. Which container then has the higher alcohol content? Duh!
This is mind-boggling! I didn't think there could be a real answer to this one. Colour me impressed.
My solution: Asking someone else to divide the coins for me, I may be blindfolded but not muted.
That's a good solution
that's like asking someone else in the company to do your job 😂
Delegate.
Middle management
@@notsus8537 The someone else will leave with all the coins in their pocket. I guess 0 coins showing "heads" in each pile satisfies the required end condition.
Makes 100 piles of 1 coins. Now there are atleast 2 piles with equal head count
My algo prof gave me this puzzle 20 years ago (a variation thereof: 10 cards facing up on a deck of cards). To annoy him, I told him the same thing: create 52 piles, and you'll have at least two with the same number of cards facing up. The goal was achieved. ;-)
Six piles would work.
The problem with this "solution" is that a pile, by definition, is more than one item.
@@Killer_Tortoise ok then 50 piles of 2 coins would also work.
@Killer_Tortoise Why do you think that? A set xan contain zero elements.
Solved it on my own! Thank you for presenting this problem, boosted my confidence a little :)
I love these puzzles, this one seemed a little harder but it actually didn't take me as long as some of the others on this channel
Didn't watch the video, but straight away I had the solution:
Pick 10 coins at random from the 100 coins pile, flip them and make them the second pile. Now, let's denote X to be the number of coins that showed heads in the original pile that we picked and flipped when we moved them to the second pile. Therefore, each pile now has 10 - X coins showing heads.
This is a great puzzle, indeed with many clever solutions that can say a lot about the solver. I appreciate that you took the time to unpack more than one of them. I enjoy puzzles like this one, and am also a coin enthusiast... so here's a fun fact: If you perform the flip depicted at 0:21, the tails image would be upside down. American coins need to be flipped about a horizontal axis (commonly known as a vertical flip) to go from upright heads to upright tails.
I would put all the coins into a bucket and shake it up, then spill it out into two piles.
Might not be exactly 50/50, but it would be close.
This would be a good answer if you were working with ten thousand coins, but at only a hundred there's too much chance of a big swing.
Yes, that was also my first idea.
@@Nshadowtail quite the opposite, in fact. take a set of coins being flipped with a target of 50%H to 50%T (1:1)
2 coins = 50% chance that you have an even split
4 coins = 37.5%
10 coins = ~24.6%
20 coins = ~17.6%
50 coins = ~11.3%
100 coins = ~8%
100 coins = ~2.5%
simply, this is because there's a much larger range of numbers it can land on, and more trials leads to more variance. ask your LLM of choice for an explanation about the statistics of coin flips
on the other hand, when you flip more coins, you increase the chances of getting close to 50% - the average tends towards 50%. but the chance of hitting it exactly still goes down.
if you're playing a game where there's a 60% chance of gaining $1 and a 40% chance of losing $1, you should only play that game if you can afford to lose a fair bit of money, and only if you get a lot of chances. if you play 3 times, you can easily lose $3, that will happen 35.2% of the time. if you play 1000 times, you're set to earn about $200, and the chance of losing money is 0.0000000067%
That's bot how it works. If you shake your bucket 100 times the average will be close to 60/50, but any individual shake of the bucket could have any outcome. Think of a pair of standard dice in a game. There's only a 1 in 36 chance that you roll a 12, but 12's happen all the time none the less. Every single roll is not a 7, even though a 7 is more likely than any other number.
Sometimes when I see your thumbnails pop up I'll put my phone down and think about it. This time I'm glad to say I worked it out in my head pretty quickly! Thanks for all you do 🙏
Have not finished watching the video yet.
I believe that if you divide into a pile of 10, and a pile of 90, and then flip all the coins in the 10 pile, then that would work.
If all 10 happen to be heads, then they get flipped over and there are 0 heads in each pile.
If 9 are heads, then the other pile must be 1 head and 89 tails. Flipping the pile of 10 turns the 9 heads into 9 tails, and the 1 tail in to 1 head, matching the larger pile.
And so on - should work for any combination of heads and tails in the pile of 10.
That was my solution as well. Simple probability. No matter how many heads I get in the pile I will have tails equal to the amount of heads in the other pile and flipping them makes them match.
I'm a bit disappointed, Presh, that you didn't show that this solution also works for any other number of starting Heads.
It's intuitive that it works for x50 too
1. Every coin has a head and a tail. You didn't specify face up. So two piles of fifty coins satisfy the conditions.
2. I pocket all the coins and designate two piles of zero coins. Even if the interviewer disagrees, I end up with a hundred coins.
3. Take fifty coins and turn them all over. Irrespective of the number of heads or tails originally, the numbers will be the same.
Your solutions 1. and 2. might be rated highly for originality.
Unfortunately, 3. costs you the job as it is wrong no matter how you split the groups. A counterexample shows the fallacy: suppose your group of fifty is all tails - after the flipping you have 10 heads in the original pile and 50 in the new pile. There is no distribution of 50 and 50 that would work. You could retreat to your solution 1., but the interviewer might counter that you have then wasted time counting and flipping 50 coins.
As a former Apple manager, this is a teamwork question... although you cannot see the coins, there is nothing saying that you can't get a team member to look at the coins and solve the problem with you.
in that case there's nothing saying you cant remove your blindfold.
@@Epyon1201 Or if told you can't, then get your team member to remove it for you.
As someone who hates management, this is a shitty interniew question from a technical and teamwork perspective. Do all HR employees have hollow brains?
@@macchiato_1881 You might not like it, but this is hiring for a corporate job - so it is trying to eliminate people who can't deal with questions with no obvious answer, people who can't question whether this is the right question to be asking, people who hate management, people who can't be diplomatic with HR, and people who can't spell "interview."
99% of the time the interviewer will learn absolutely nothing about the candidate's teamwork skills from their answer to this question. "Tell me about a situation where you had to work with a team to accomplish a goal" will yield much more information about the candidate's approach to teamwork, their memory, communication skills, general intelligence, and approach to problem-solving. There's no need to throw trick questions at people to learn about the skills that really matter in the workplace.
Saw this on ted-ed a while back.
Good to know I still remember the solution.
It took me a minute or two, but I did solve it in my head. Solved it from the thumbnail and then watched the video to confirm.
Tim Cook, is that you?
I solved this in my head, but I believe the reason is that you have posted a similar video in the past few years and I remembered the trick.
Uh, what's the trick?
@@cheriem432 It's in the video. Presh explains the actions.
@@JLvatronI don't remember seeing this type of question on this channel and I have visited all the videos. But I saw this question on Bright Side with 52 cards and 13 facing up in which the youtuber specifically narrated that the front side must face up.
@@mohitrawat5225 I recall seeing it in a logic puzzle UA-cam video.
I mostly watch Presh's videos, but it's always possible it was another. And I think you're right it was about cards.
This was a Ted Ed riddle too
I've not seen this problem before. The solution seems like magic!
Your best ever video, thank you.
Flip the table. Present 2 piles of size 0.
(Or... Balence all 100 coins on their side). 2 groups with 0 heads up coins.
Got it by 2:43!
The rules never state we can’t flip coins (in fact, the setup seems to sneakily suggest that it is expected). As opposed to splitting one pile into two separate piles, you want to take one pile, and by removing coins from it, create a second pile. (Important mental distinction). The number of tails in either pile is irrelevant.
Thus, to get two piles with an equal number of heads, all you have to do is take 10 coins from the 1st pile, flip them, and then put them in the second pile:
If you took a tails, it results in a heads in the second pile: the number of heads in each pile are now 1 closer to each other
If you took a heads, it results in a tails added to the 2nd pile, and also results in a head removed from the first pile. As such, the number of heads in each pile is now 1 closer to each other.
As the first pile starts with ten heads and the second pile starts with 0, you need 10 such moves to make the number of heads end up equal.
(For an example, imagine all the coins transferred were tails. 10 tails would be flipped and added to the 2nd pile, resulting in an equal 10 heads in both piles. If all the coins transferred were heads, 10 heads would be removed from the first pile, and no heads added to the 2nd pile, resulting in an equal 0 number of heads in both piles.)
My reasoning was this. Take 10 coins and flip them and put them in the 2nd pile.
That way you have 90 coins in first pile and 10 on the other. With equal number of heads. I will check the video to see if I'm correct later when my network gets better
I got the technically 50 heads in each pile answer right away
If your gloves are thick enough that you can’t detect the difference between a head and a tail by feel, then there’s also a strong chance that those gloves make it nearly impossible to pick up a coin off a table and turn it over. Thus negating the first solution Presh gives.
A table has an edge, which can be used to flip the coins easily while using the thick gloves.
@@EaglePickingthey don't have to be thick even surgical gloves will dull touch enough especially if just a little to big but will not cripple dexterity.
@@brianzmek7272 Counterpoint: fingernails will let you roughly determine the design even in latex gloves
Put your finger on a coin, slide them to the edge of the table, pinch between fingers when passing over the edge and flip
@@brianzmek7272counterpoint 2: you can pick up a coin and "scratch" the surface of another coin and try to feel what kind of coin is it by how the coin moves
Instructions unclear:
I now have three piles of cards.
A fellow artist or copy wrighter?
Couldn't reproduce your results. I now have 33.3 6-sided dice.
@@johannageisel5390 Yeah but if you divide them into two piles and flip them, you'll have 6 33.3-sided dice.
@@illexsquid ROFL.
1:57. Oh, duh. Move/flip 10 coins to the new pile. This will leave the same number of heads in each final pile. If you happen to pick the 10 heads coins, both piles will have 0 heads. If you don't pick any heads coins, then in the end both piles will have 10.
It took me one or two minutes in my head to come up with the solution before starting the movie.
Seems like I have seen enough riddles on your channel...
Better solution: split the piles into 50 coins each, each pile in a box and never look inside the box as each coin is both heads and tails until you look inside 😁
This one had me thinking a little, but thankfully I could solve it quickly, since I knew the problem wouldnt be so straight forward, I tried thinking outside the box and quickly realize that I could flip 10 coins and get it right 100% of the time
I actually would have said this solution in an interview based completely on the logic blind guessing 10 tails is not horrible odds.
I did not come to the realization that it always worked, i just knew it was more likely than anything else i could think up 😂
I came to solution by myself. I am proud as a long viewer of your channel
I stopped at 1:01. Divide the coins into two piles of fifty. Each of the 100 coins has a head, so ... done.
Sure you did
9:59 - congrats, you're hired in the apple's legal team.
Thank you. I was beginning to think I was alone in my impeccable logic.
I divided the coins evenly and flipped them. The final score was 25 to 23. This is my approach: I work quickly and achieve quite good results.
I'd like to point out that dipiction is a group of coins and not a pile of coins. The term "pile" implies stacked on top of one another. A pile of 100 coins stacked perfectly would be very tall and prone to falling over, ruining the distribution.
If they're stacked on top of one another, doesn't that make it a stack, not a pile?
@Grammulka i'd say a stack is a pile but a pile isn't always a stack. A stack is an organized pile. A pile is a 3 dimensional grouping of objects. A grouping is any number of any objects in close proximity.
If you can’t flip the coins, my solution was N/X where N is the total coins and X is the number of heads. Then randomly sort the X groups into the number groups you want it divided into.
So break the quarters into 10 groups of 10 then randomly choose groups to go into the 2 big groups.
Step 1. Take off the blindfold.
Step 2. Split the piles
smart man
The first two solutions that come to mind.
1. Place them in rolls lying sideways to ensure no heads are facing up, guaranteeing an equal count.
2. OR Cut each coin in half, placing halves in separate piles to achieve equal distribution.
The actual solution is something that seems so obvious in hindsight, I thought it was a word problem
People at Apple are not solving "impossible problems". Maybe a tiny percentage of engineers are working on very difficult problems, the vast majority will just be very capable and professional developers. This idea that they are like scientists and researchers is a ridiculous joke.
Yep, they are just like painters; the vast majority is limited to doing walls and ceilings and the very rare one paints a ceiling like the Sistine Chappel.
1:08 "you are not expected to solve the puzzle instantly in your head"
Welllll I already found a solution (at least I think so) when you said that sooo what should I do then x)
9:59 here's a joke answer that gets you thrown out the window like in the meme, note he said working for Apple. So we have 100 coins, 90 coins that work, 10 that don't. If I wanted to get hired, I would just sell them 100 new coins. If I wanted to be blacklisted, I could suggest repairing the all the coins for a price less than buying all of them over again. We could even just let our customers repair their own coins and make it as easy as possible for them to repair their own coins rather than force us to fix it by selling them a brand new coin.
They can repair their coin, but then they have to take it to an authorised Apple mint to get the software reset.
0:42 here's my answer:
divide the coins into two equal piles, pile 1 and pile 2. Flip all the coins in one of the piles, say pile 1. Boom. That should make a pile with mostly heads and mostly tails. Then divide each pile into 2 more piles. You should have pile 11, 12, 21, and 22, where piles with a 1 in the tens digit started in the first pile in the first split off, and those with a 2 are the other first pile. Then the ones digit is the second split. Swap pile 12 and 21, then combine 11 with 21 and 12 with 22. The number of coins should be equal. Sorry if I explained it poorly.
Put a blindfold on everyone else too, then state with confidence that both piles have the same number of heads.
My answer would be to split the piles into 50 and 50, then flip all the coins (not to the other side, flip to randomize) and that should get you statistically close to an even amount, but you are still relying on chance to actually get a match. More often that not you would end up 1 or 2 off. Once I watched more and you clarified that you can't feel the faces though, then I went to putting all the coins on their edges. Flipping exactly 10 is a very clean answer though. I didn't think there would be a way to get 100% accuracy
Can I stand all of the coins on their sides/rims? Zero heads in either bucket then.
Ah, he got there 🤣
Before getting too far into the video, I'd flip every odd coin and move to one pile, leave unflipped every even before moving to another, and if I know the orientation which the ten coins are that is horizontal or vertical, I would pick from the other orientation. This would result in 45 flipped tails, 45 unflipped tails, 5 flipped heads, 5 unflipped heads, for a total of 50 heads and 50 tails.
My solution: Use my elbow to feel the coins, who said that I need to use my finger to do it.
Edit: I guess you can also lick them but that's kinda gross
Just lick them.
@@ronald3836 Huh?
@@cheriem432 to feel if it is heads or tails. Easier than elbow.
@@cheriem432your tongue is better at feeling the texture of stuff than your elbow is.
I don't this is a good method, there's probably better method out there than using your elbow or your tongue
I couldn't think of any solution until you said we could flip them, then it was pretty easy to see.
Take 10 random coins and flip them? The riddle doesn't say nothing against it, I think it should work.
I figured flipping had to be part of it. I just needed to workout how many.
This is the solution I thought of. This solution is better than the original if you ask me
@@soulfullofcherries
That's the answer Presh gives. At 9:00. Are you saying there's another, "original" answer?
@paulkennedy8701 lol I didn't watch the full video my bad
@@soulfullofcherries
Yeah, he did take a long time to get to it. I was sure of the answer. I had to keep jumping ahead through his calculation of probabilities and other irrelevancies.
My first thought was take the entire pile of coins, flip each one in the air so its a random heads or tails, and place them alternating in the first, then second pile, flipping each coin as you go. Statistically you should come up with roughly the same number of heads in both piles, since the outcome of a random event doesn't care if the initial state was heads or tails.
This of course, works better the bigger the pile of coins you have is.
Stand all the coins on end. There are now no heads up, no tails up. Divide them into two rolls of fifty, still keeping them on edge. Easy peasy.
Okay, now to watch the video.
Your solution is just as good and has the benefit of now having them in nice rolls that can be spent, as well as blatantly rejecting the absurdity.
This reminds me of a question asked of me in 1986:
You have a cup of coffee and a cup of milk.
You take a spoonful of coffee and mix it into the milk cup.
Using the same spoon, move a spoonfule back.
Is there now more coffee in the milk cup, or more milk in the coffee cup?
something wrong with the graphics at 5:50, the coins supposed to turn back to the original position.
My first thought was to take each coin, toss it, make two piles of the random result. It's not going to be perfect, but the odds of getting a similar number of heads in both piles is higher by starting with a 50/50 is better than a 10/90.
Grab 10 and flip them.
Had come across this during campus placement.
Campus?
Without looking at the video, separate off a group of 10 coins. Now turn all the coins in that group over. Both the small group and the largeer group will have the same number of heads. If we call the number of heads in the original 10 coin group h, that means it has 10-h tails. The group of 90 must have 10-h heads left. When we turn the group of 10 coins over, those 10-h tails will turn to 10-h heads and the h heads will become tails.
Nb. Now watching the video, it is so frustrating to see so many dry runs with actual numbers. Just put a variable in there and you can prove it works for all of them.
It is a brilliant little puzzle.
Or if you're not a math nerd, just toss each coin and seperate them into two piles once they land.
You’re blindfolded lmao
@@bobross7473 Yes and you can still toss them in the air and catch it in your hands.
@@suryanshsrivastava5551 but you have gloves on and can't feel the coin
I think the point is for large number of throws, heads will appear 50% of the time. Not exact but close...
I solved this in my head in about 20 seconds, and now I feel very good about myself and want to brag about it.
I would argue that, by definition, EVERY coin has a HEAD and a TAIL. Count out 50 coins.
Get a pair of sheers, cut every coin in half, put the left half in pile A put the right half in pile B. QED.
Stopped at 0:57 take 10 coins and flip them over no matter how many of the coins you take with heads you’ll have the same number once you flip the pile of 10. Take none 10 heads in both take them all 0 heads in both. Take any other number away from them with heads and flip them they become tails meaning the amount you flip matches the heads. There’s a similar Ted Ed riddle.
What if the 10 coins you pulled consisted of 6 heads and 4 tails? Flipping them just gives you 6 tails and 4 heads.
@ I’ve taken 6 heads from the other group meaning there’s only 4 left. It’s the same then.
I see what you mean now. Your explanation was unclear.
But if you're not allowed to flip the coins ( which is what is led to be believed at first) the most likely way of sorting them is by sptlitting them equally.
9:35 You mean problems solved a decade before!
Thankfully, TED talks already did this so I knew the solution instantly 😅
0:36 AI garbage? Why?
Theres a card trick that works this way
I would use the edge of the table to get the facing details. You can hear differences in the sound and even feel tension differences through gloves. So a few swipes on the corner will tell you the distinction. Ass soon as you find the 11th similar side, you know that side is what tails sounds like, and thus can just find the 10 heads, place 5 on each side and evenly split the rest.
Before I listen to the video, my answer would be to feel the coins. I might not know which is head or which is tail, but there will be a difference. I’d continue until I have more than 10 of one kind, which will tell me that those are tails, and I’d continue to look for the other kind (heads) until I find 10 of them.
Another, even simpler solution, would be to ask a sighted person: “is this a head?” for each coin I present, and place the coins with a “yes” answer in one pile and then”no’s” in another.
Then count half of each pile and form two new piles.
PS I didn't realize that the initial condition was to wear gloves.
PPS It's fascinating that there are so many ways to solve this, but it would have helped if the question was phrased mathematically. Presh's solution seems to be the one that was wanted (and the most elegant), but the question and the conditions of the situation were far too vague. In a real-world scenario, there are a multitude of legitimate ways to solve it, even by simply removing the blindfold. Indeed, the interview situation is such that it primes the candidate to suppose that it may be a trick question, or that the conditions are deliberately ambiguous simply to gauge the reactions (like a Rorschach test).
The correct solution, formulated mathematically, is that any collection of Xs and Ys (where Y is the inversion of X) would result in two groups, each with the same number of Ys, if you transfer N elements to a separate pile and invert them all.
Proof. If M Y's are in Group 1 and you transfer N coins (where N
Take each coin and flip it, place half in A and half in B. Should be close enough to even assuming you aren't accounting for the heads up paradox where whatever side is facing up has about a 51% chance of being up when the flip is over.
For those who are not familiar with the line from Mission Impossible: 'Your mission, should you choose to accept it...' Good job here
You divide 10 coins from the group and flip them. Now you have 2 piles with equal head facing coin. The riddle doesn't stated that you can't flip them.
Example: Your 10 selected coins have x amount of head. The 90 left will have 10 - x head facing coin. That'll be your first pile. After you flip those 10 coins from the second, all of those x facing coins will become tails and all off those tails will become heads. So
10 - x (number of coins in the second pile) - (number of head facing coin has been fliped)
is now the number of head facing coin in the second pile
Mix all coins well, assuming the mix between heads and tails is uniform ,separate 50 coins in a new heap and hope 5 headers are in each heap because the mixture was uniform
The answer that occurred to me was, flip all the coins randomly. There will be somewhere close to 50% heads and 50% tails in a random distribution. Then just put 50 of them in one pile and 50 of them in the other pule.
I don't know how but I solved this one very quickly lol, maybe I've heard or seen something similar to this and my brain connected the solutions.
You’ve probably seen it from Ted Ed
I understand that you try to show the thought process. But I think the hardest part here is to rethink the text of the task until you see all the options (like flipping). Though the solution is very inventive and is not obvious. It is hard to find the solution that is so unusual.
I solved it in about 60 seconds and felt very pleased with myself
I initially took it one step further. I thought it wanted the same amount of HEADS & TAILS on each pile, blindfolded.
I instantly thought, that’s easy in two steps
1) split the stack in half
2) choose ten coins to flip over on one side
Solution will have both sides equal.
Divide the coins into two piles.
Randomly flip coins in both piles.
Over time the number of heads and tails in each pile will move to an equilibrium 50/50.
At some point you will have equal numbers of heads and tails in each pile.
@MindYourDecisions I have a suggestion for your videos: Can you please put a disclaimer after the problem statement to let us know if the problem requires a "clever" "outside the box" (very simple) solution like removing the blindfold, or not.
I'd like to invest some time into these puzzles, but there's nothing more frustrating than finding out at the end it's one of those "clever" puzzles.
I this video the puzzle was worth investing time into, but it'd be better if you told us we can flip the coins and we don't need an outside the box solution just so that the rules are very clear for everyone.
for me, I have stand all the coin up on it edge, and put it two group, you will sure get the equre answer 0. (oh, I have the answer in 10 sec and before watch the video.)
Easy. I say the table is a mobius strip. This makes every coin both heads and tails as you trace the surface and come to each coin twice
I 'tossed' every coin so they'd be randomly heads or tails then put them in two piles of 50, letting probability take the reins. Guess I'm a Windows guy.
If it's using the coin depicted, my first thought was to hold one coin and scrape its edge along the rim of each other coin where the words are. The tails side has far more letters, so the difference in the bumps should be pretty clear.
I was asked such a mind-exercise question when interviewing for a job with Raytheon. I could not answer, and no, I was not offered the job. I thought of the technicality answer here - and I considered it cheating as well. I like the analytical solution you came up with.
at the risk of over simplification, this problem is a good one to ask in an interview because it parallels a real problem in computer networking, that of signal balance and encoding systems (e.g. 8B/10B etal). Sending a long stream of says 1s (in this case heads) over an optical channel using just a 1 might burn out or degrade the medium or hardware in some way (or electrical signal balance) if you didn't come up with some scheme that would allow you to always send a balanced signal even though you "were blindfolded" didn't know what data was going to be transmitted. I first learned about this when studying the fibre channel protocol and networking for storage applications and it's use of 8B/10B encoding.
Okay, here is my thought: flip every other coin as you sort them into two piles.
While it doesn't guarantee that both piles will have an equal number of heads and tails, it will cause the coins themselves to reach a 50/50 equilibrium, which means that if they are being provided to you randomly you have a fairly good chance of being nearly 50/50.in what is in each group
Another solution can be to split them in half, regardless in which of the two meaningful ways. If they are cut into two half circle shaped coins you only need to separate the halfs. If you cut them to get the two sides separated so that heads and tails are on the outer side while on the inner side there is the cut, the upper part belongs to one pile while the lower part needs to be flipped and put to the second pile. That way you even know that in both piles there are 10 heads.
whoah.....what a question and solution....