1

To generalize, an object with $n$ bits (where $n$ is an integer) can hold $2^n$ (2 to the power of n, also commonly written 2^n) unique values. Therefore, with an $8$-bit byte, a byte-sized object can hold $2^8$ ($256$) different values. An object that uses $2$ bytes can hold $2^{16}$ ($65536$) different values!

When we say "To generalize" some thing into a mathematical formula, what does people actually mean ? Does it mean a particular behavior always repeat in a similar manner so that we come up with a equation to represent that behavior. So the equation being extract from the manual testing thousand of time till we found out behavior's pattern. How can we be so sure that the equation work for this time and it will always correct in the future. In another words, how do people come up with math equation ? Does it come from manual testing thousand of time ?

durianice
  • 2,624
  • No, it does not come from manual testing thousands of time... there exist large counterexamples to various proposed patterns. Although in several examples there may have been manual computation and guessing to patterns at the start to build intuition, that is not strictly necessary. Anything you are told is a known formula in math (like your example with bits) is proven fact using mathematical proof and logic and is not just some guess from manual testing. The specific example you cite follows from the https://en.wikipedia.org/wiki/Rule_of_product – JMoravitz Apr 03 '23 at 11:55
  • Pick up any sufficiently higher level math textbook and you will see that just about everything in them is taught by way of proofs. As for another example which should be accessible to beginners... see Direct Proof that $1+3+5+\dots+(2n-1)=n\cdot n$. Of course, there are thousands of examples you should eventually see. Get a book for more, such as "Proofs From the Book" – JMoravitz Apr 03 '23 at 12:02
  • How people come up with equations is not the same as why it works every time. How people come up with equations (or more generally, theorems), I would say, is mainly by intuition, which could be gained from trial and errors, or could also come from ingenuity. However, coming up with an equation does not prove it. The proof is what ensures it "works in the future". – durianice Apr 03 '23 at 12:06

0 Answers0