What math problems are they trying to solve when mining for crypto?

810 views

What kind of math problems are they solving? Is it used for anything? Why are they doing it?

In: 919

24 Answers

Anonymous 0 Comments

For the majority of Proof of work coins, it’s effectively just brute forcing the cryptographic hash of a collection of data so that the result is a very low value.

That’s it, just an arbitrary task designed to be difficult on purpose do that one single entity can’t control the network.

Anonymous 0 Comments

There is a special function called a cryptographic hash. Basically it takes anything as input and produces a fixed-length output. For all intents and purposes here, you can basically treat the output as being random. Meaning you can’t predict what the output is going to be for any given input without simply trying.

For miners, the input is the block they want to add to the block chain, plus a magic number they get to come up with. They then combine the two and perform the cryptographic hash. What they’re looking for is for a output of the hash that has certain properties. For example, the hash (being a number) has 32 trailing zeros.

Since the output isn’t predictable it’s basically simply a matter of choosing random magic numbers (as part of the input), combining it with the block, hashing it, and seeing what you get out of it. It’s brute force and odds go to whoever is faster (can make more guesses in a certain amount of time).

Whoever produces the correct hash output first gets to add their block to the block chain. This block will have a special transaction that creates new cryptocurrency out of thin air and adds it to their wallet. Basically they get paid. Additionally, the block main contain special transactions from other users that give money to whoever adds that block to the block chain.

Anonymous 0 Comments

In a sentence: they are looking for a number that when stuffed at the end of the block being mined and fed trough a specific process will result in a number that follows specific properties. They are essentially just looking for a verification number.

Its one purpose is to be hard to find, and to later be used to verify that the block hasn’t been changed or manipulated. Beyond that it doesn’t serve a purpose.

Anonymous 0 Comments

The other replies are correct, but not really ELI5.

So the short answer is: they run a program that, if you give it a number, it spits out a different, unpredictable number. When that output number matches a third number closely enough, you win. Think of it as guessing lottery numbers.

Anonymous 0 Comments

On mobile, so bear with me…

Crypto “proof of work” mining is not actually solving mathematical problems, it’s just making guesses until someone gets the correct answer. So what’s the “correct” answer?

Imagine you have a mysterious black box. Anything you put in the box comes out as a string of numbers, and always the same amount of numbers. When you put your stuff in the box you don’t know what the string of numbers on the other side will be, but you can add things to the box to change the output. This is what the “hashing” does.

Now imagine that you need the string of numbers on the other side to start with a zero. You have to take all the stuff you’d normally put in the box and make guesses about the other stuff to add to get a zero as the first number on the other side. Now imagine you need 2 zeroes to start, then 3, then 4… this is the “increasing difficulty” of crypto mining and it requires the “miners” to make more and more guesses for what they add to the transactions (the stuff for the next block) to get the desired output hash (the string of numbers after hashing).

When someone makes a correct guess they will send that to the crypto network so other nodes (other miners on the network) can test it for accuracy. Once more than 50% agree, it becomes the next block in the chain.

Anonymous 0 Comments

The name of the most famous cryptographic hashing function is arguably SHA-256. The function defines exactly what mathematical expressions are applied to get a nearly perfectly untraceable output to a given input. (Meaning no way to strategically figure out what input caused the output). So, when you say ‘solve’ most mathematicians would think of an equation with some variable. They rearrange to get the variable by itself and then they know its value… This is not what is happening in mining. In mining, they guess a number, send it through SHA-256 and see if the result looks the way they want it. No solving, just guess and check.

Anonymous 0 Comments

Do you remember when you were young and after solving a simple equation you had to check that your answer was correct? Say you solved x + 3 = 7. You found the answer is 4. But you could also check it by doing 4 + 3 and seeing if it equals 7.

> What kind of math problems are they solving?

They are checking answers that they guess to an equation that is otherwise unsolvable by natural means because it cannot be reversed.

Like in the above solution they would try random numbers like 10, 7, 1, 21 until eventually you’d stumble upon 4 and realize it’s a solution.

Whoever finds an answer that checks the solution first is considered the winner. The fact that they found it means that some transactions are considered accepted. Everyone else can check that the answer they found is correct so they move on to finding the next lucky number. That means they have mined something.

As someone else said in their comment, they are basically guessing lottery numbers. The more lucky numbers you can check, the more chances you have for being the lucky winner.

Anonymous 0 Comments

The math problems they’re solving is the arithmetic (multiplication/addition/etc) needed to add a set of numbers to the blockchain. The blockchain is just a list of numbers that everyone agrees is the universal list of numbers. By design, the math required to do this takes a lot of arithmetic operations to add a new number. How it does this is a much more complicated discussion that goes beyond ELI5 but this essentially sums it up.

> Is it used for anything?

It’s used to add blocks (numbers representing transactions) to the block chain. That’s it.

> Why are they doing it?

When a miner (the people doing the arithmetic) adds a block, the miner is effectively given a token as compensation. That token is represented by a transaction in the block they just “mined”.

This sounds ingenious and revolutionary until you realize that this ingenious system can cost as much as $60 for a single transaction (Hit this in 2017). Today it’s down to roughly $1, sometimes up to $2, or so. Keep in mind that this cost is essentially measured in the amount of energy it takes to make the transaction. If you put it in the context of how much gas you can buy at the pump, because that’s essentially the cost of the electricity and mining equipment used by miners, you get an idea of how wasteful it is. A credit card transaction is on the same order of magnitude, except the vast majority of that is profit or paid out in salaries to people. Only a tiny fraction of it goes toward the energy or the computing hardware required to support it.

Anonymous 0 Comments

You have a lock with unknown pattern and number of pins. And you (the miner) also happen to be a locksmith. So you start manufacturing different keys ‘till you finally produce the right one for the lock. However, there are other locksmiths also doing the same thing and the fastest/luckiest (more CPU power) is the winner. So lets assume you find the right key then you need to share it with the rest to prove that indeed this is the right key. After everyone appoves it (validators) they all declare you a winner and you get the reward inside the box (in this case 6.25 bitcoins).

Anonymous 0 Comments

Other than verifying blockchain, no it’s not used for anything. It just looks for partial hash collisions, it’s just hard work for the sake of hard work, to prove that you did it. Point is, this hard work would have to be redone to screw with the ledger after the fact. So it basically becomes impossible, nobody can go back and cook the books after the fact, once a deal is done it can’t be undone or modified. Makes it impossible for example to spend the same coin twice.

This entire scheme is needed for no other reason to make away with requirement for a trusted third party, a problem that was supposedly impossible until Satoshi came along and said he has an idea. Well, it evidently works, sort of, there are caveats, cost to bring an obvious one. Also there is no price stability to speak of, though that is by design, the entire point of cryptocurrencies was to get away from government regulation and that includes central banks.