HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /A blockchain is copied on 40 computers in a network…
MediumComputer ScienceHigh School (9–10)Computer Science › The Internet, the Web and Digital CurrencyNumericalIGCSE

A blockchain is copied on 40 computers in a network…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

A blockchain is copied on 404040 computers in a network. An attacker has changed an old payment on 151515 of the copies.

  1. How many copies must hold a version for it to be held by more than half of the computers?
  1. How many honest copies are there?
  1. How many more copies would the attacker need to change for the changed version to win?

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

A payment is sent to a network of computers (nodes). They check it, group it with others into a new block with a time-stamp and the previous hash, add the block to the chain and update every copy. Every payment stays in the chain, so units can be tracked back. A version is accepted when more than half of the NNN copies hold it:

h=⌊N2⌋+1.\displaystyle h = \left\lfloor \dfrac{N}{2} \right\rfloor + 1.h=⌊2N​⌋+1.

The worked solution

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Step 1. More than half. ⌊40/2⌋+1=20+1=21\left\lfloor 40 / 2 \right\rfloor + 1 = 20 + 1 = 21⌊40/2⌋+1=20+1=21 copies.

Step 2. Honest copies. 40−15=2540 - 15 = 2540−15=25 copies.

Step 3. What the attacker still needs. 21−15=621 - 15 = 621−15=6 more copies.

Answer: (a) 212121. (b) 252525. (c) 666.

Watch out. 202020 copies is exactly half, which is not more than half. With 202020 against 202020, neither version wins.

Log in to save this for later
← All Problems
← A student designs a "blockchain" in which each block holds only its data, a time-stamp and its own…Kemal pays Dana 9 units of a digital currency that uses a blockchain… →
More onComputer Science › The Internet, the Web and Digital Currency

Discussion (0)

Log in to join the discussion.

Loading…

More on this topic

  1. Part of a blockchain holds these payments, oldest first…Hard
  2. A blockchain has 56 blocks. A new block is added to the honest chain every 10 minutes…Hard
  3. Kemal pays Dana 9 units of a digital currency that uses a blockchain…Medium
  4. A student designs a "blockchain" in which each block holds only its data, a time-stamp and its own…Hard
  5. A blockchain has 9 blocks. A person changes the amount of a payment in block 4…Medium
All problems on this topic →