The difficulty of define a precise definition?

How do a mathematician “come up with” a good definition? How long does it take?

I’m not very good at math, but from my understanding the most important part in math is definition. It took me some time to appreciate its importance after trying to prove something really hard( or at least trying to understand others’ proofs of proving it), for me.

And finally, would you consider it annoying, when you found resource, maybe from other subjects, using vague wording after being a mathematician?

Having difficulty understanding how to find the maximum volume with cost constraint.

We have $ 1000 to buy the materials to build a box whose base length is seven times the base width and has no top. If the material for the sides cost $ 10/cm2 and the material for the bottom cost $ 15/cm2 determine the dimensions of the box that will maximize the enclosed volume.

How can one overcome the difficulty of getting lost in Computer Science books?

To explain the situation, I will start with an analogy;

In math, we love to generalise things. For example, historically, we first had $ (\mathbb{R}, +, \cdot)$ , then we generalised to sets with to two binary operations with similar properties. Another example, if we have some algebraic structures (basically sets with some operations on them satisfying some properties), we first looked at a product of those objects, then we generalised them to products/coproducts in the category of those objects, etc. In this way, we have much more a general view of what is going on, so that we can see the interconnection between different “things”. In fact, IMO, the main advantage of using category theory is this; it provides a much broader view about any subject.

Now, let me come to my actual question;

I’m a Physics and Mathematics student, and I love programming, and all that tech stuff. However, whenever I try to learn something about computer science, in general – for example, network programming, web security, and even in programming – I basically lost in the books; What I mean by is that the general teaching method is something along this line; This can be done like this, and that can be done like this – as if they are just cookbooks, there is no general overview, or underlying logic about the network/structure/concept, nor almost any motivation, or how should we think / how can one come up with a similar answer that just you presented in the book, etc.

So my first and main question is that, how can one overcome this difficulty of getting lost in reading/studying computer science topics ?

Optionally, if you have any book suggestions which does not possess the problem that I’ve outlined above about any topic, I would appreciate if you could share it.

Is there a relation between Lagrange multipliers and the difficulty of solving a NLP?

I heard a lot about the interpretation of Lagrange multipliers and the constraints qualification for the resolution of NLP but I still have a question:

Could we qualify the difficulty of solving a NLP based on the values of the Lagrange multipliers at the solutions?

In other words, could we say that a given NLP1 was more difficult to solve that NLP2 if for example max(Lagrange multipliers in 1)> max(Lagrange multipliers in 2)??

This question is motivated by a paragraph talking about sensitivity in the book numerical optimization of Nocedal.

Why are block header bits necessary? (Valid difficulty is already implied by chain history)

Difficulty or target is implied by chain history, so why does it need to be explicit in the header? I suppose it exposes miner-intended-difficulty, but I don’t see why that would be relevant without chain context.

So it seemingly represents redundant data in the header, unless there are any historical reasons for this design choice?

Difficulty appending to cell in Google Sheets

My goal is to automate making a calendar on Google Sheets. I used =DATE(C1,A1,B1) to make a date and then each following cell, I added 1 to the previous cell.

However, now I want to also automate making a time table with this spreadsheet. To append my list of times from below, I used ‘&’, but then the date 12/16/2018 became 43450.

3-4 4-5 5-6 6-7 7-8 8-9 9-10 

What am I overlooking? Any help is appreciated. I am new to Google Sheets, so sorry if this is a stupid question.

How to implement difficulty calculation in my code [duplicate]

This question is an exact duplicate of:

  • How is difficulty calculated for miners?

So let’s say we have to produce a hash that start with “0000”

I hash a block over and over by changing the nonce inside it.

Eventualy I will find a hash that start with “0000”.

What is difficulty here? Is it the ammount of zĂ©ros we require the hash to start with? More zero’s would be more difficult? Does it have to do with the nonce?

I understand that the higher the difficulty the more hashes it will take to find it.

If my difficulty is one how do I apply the difficulty in the hashing process.

Right now all im doing is hashihing a block everytime I add 1 to the nonce wich represent the number of hash.

So how do I implement the difficulty in the hash calculation.

I am programming a blockchain from scratch!

Exemple of my code;

generateHash(block) {       let hash = sha256(block.key)       // key contain the block data       while(!hash.startsWith("f07a")) {  // we hash until the hash start with f07a        block.nonce += 1                 // add 1 to nonce for each try        hash = sha256(block.key)         // Trying with the new nonce                 //console.log(hash)                   }       return hash     } 

So how would I implement difficulty here? I know i would have to do more math acording to network hashrate but to understand it in my case how would I use a difficulty of 1 here?