Recent content by fbs7

  1. F

    Permutation Counting Algorithm for Large Integers

    Btw, a note on this: mergesort is O(n log n). I do believe this is O(n) if one can use unbound (ie infinitely-long) integers (by using 2 bitmasks). Of course this is theoretical, as there's no machine that can implement unbound integers. Then one could consider variable-length integers; then...
  2. F

    Class to convert garbage to a number

    Thank you for the code! But let me ask you a question... why not use str:strtod instead? It will return in the 2nd argument the pointer past the last character it converted (or the input parameter if couldn't convert anything). So we can just subtract the two pointers to see if all characters...
  3. F

    Computer code that handles the periodic table of elements

    This is what I could figure out from the OP question: NASA likes rockets, and rockets use combustion of fuels and oxidizers; therefore NASA prepared this program that predicts energies of the results of combustion of rocket fuels that undergo a "combustion" chemical reaction. The reason why it...
  4. F

    B Is it true that QED explains the reflection of light?

    Wow, thanks everybody for their answers! Quite spectacular information, I'd never imagine it! Thanks all!
  5. F

    B Is it true that QED explains the reflection of light?

    Oh, wow! That's mind-blowing awesome! I have to read each paragraph most carefully, this is amazing! So light creates an electric field in the surface (maybe, I suppose that the photons are absorbed by the electrons that are moving in the surface, which get energized and move in some specific...
  6. F

    B Is it true that QED explains the reflection of light?

    Hello Peter; my thought was that if you pass a ray of light through an extremely strong electric or magnetic field then the light will not be affected by it, because it has no electric charge, so it just keeps going straight through it. Is that wrong? That is, if the electric or magnetic field...
  7. F

    B Is it true that QED explains the reflection of light?

    About a month or two ago I posted this question in the "Classical Physics" forum: if the light doesn't interact with an electromagnetic field, then which force explains light reflection in a mirror? I didn't get a clear answer for that (besides advice to buy a book from Feynmann), so I went on...
  8. F

    XOR algorithm to find the missing number in a given array

    hmm.. good point... let's see if that holds true on additions with modulus; say modulus 10 ie, say I'm a complement-10 cpu that can only store numbers from 0 to 9, and I have X= { 1, 2, 3, 4, 5, 6, 7, 8 } A = { 1, 2, 3, 5, 6, 7, 8 } so A is missing 4; then sum of X mod 10 = 1 + 2 + 3 + 4 + 5...
  9. F

    XOR algorithm to find the missing number in a given array

    A-ha! Abelian groups! That's the word, thank you! I stand corrected on the 3D rotations - thank you!
  10. F

    XOR algorithm to find the missing number in a given array

    Hmm... actually one could also use * to do the same thing... x = ( multiplication of all values in X ) / ( multiplication of all values in A ) = missing value I wonder what's the theory behind this... say you have two operators, op1 and op2... then if this holds true: a == ( a op1 b ) op2 b...
  11. F

    XOR algorithm to find the missing number in a given array

    This algorithm is an interesting trick. Say that X a sequence of any number of different numbers, and A is that same sequence except one (in this case, A is missing c}. X = {a,b,c,d,e} A = {a,b,d,e} How this algorithm works? First it xors all values in A into a variable x; that's what the...
  12. F

    Which force is responsible for light's reflection in a surface?

    Hmm... that's a good question. I remember going through Fermat to prove the angles of reflection and refraction, but I remember ever since then (it was physics I in college, I think, like 35 years ago) it seemed to be something taken out of the hat. I think it goes like this (if I remember it...
  13. F

    Which force is responsible for light's reflection in a surface?

    Understood - thank you! Now, that's a good point... does light, as a wave, obey the 4 basic forces (electromagnetic, weak -- or electroweak, strong and gravity)? Hmm... I always assumed it did, but I don't really understand this duality thing... maybe the wave equation itself will lead to the...
  14. F

    Which force is responsible for light's reflection in a surface?

    I think I understand how electromagnetic force works, so I predict that if I take a big, big, long flat table, charge that table with a big negative electric voltage (say -500kV), then I shoot an electron at that table at an angle, then the electron will be repulsed by the charge, will make a...
Back
Top