You have 2020 piles of coins in front of you. The first pile contains 1 coin, the second pile contains 2 coins, the third pile contains 3 coins and so on. So, the 2020th pile contains 2020 coins. A move consists of selected a positive integer k and removing exactly k coins from every pile that contains at least k coins. What is the minimum number of moves required to remove all the coins?
Answers
Given :You have 2020 piles of coins in front of you. The first pile contains 1 coin, the second pile contains 2 coins, the third pile contains 3 coins and so on. So, the 2020th pile contains 2020 coins. A move consists of selected a positive integer k and removing exactly k coins from every pile that contains at least k coins.
To Find : What is the minimum number of moves required to remove all the coins?
Solution
Move 1 : remove 1010 coins
we have 1 to max 1010 coins piles
Move 2 : remove 505 coins
we have 1 to max 505 coins piles
Move 3 Remove 253 coins
we have 1 to max 252 coins piles
Move 4 remove 126 coins
now piles 1 to 126 coins
move 5 remove 63 coins
piles 1 to 63 coins
Move 6 remove 32
piles 1 to 31 coins
Move 7 remove 16
piles 1 to 15 coins
move 8 remove 8
piles 1 to 7 coins
move 9 remove 4
pile 1 to 3
move 10 remove 2
pile 1 coins
move 11 remove 1
All coins removed.
In Minimum 11 moves all coins are removed.
Learn more:
Suppose a laundry bag has many
brainly.in/question/8324725