0

Is there an Algortihm/formulae to multiply two arrays (1D & 2D) of unique numbers such that the resultant array contains unique results. Would one have to create the 2 initial arrays in a certain pattern in order to gaurantee unique results ?

How could it be implemented if the non-integer numbers were constrained by computers i.e. 32-bit, 64-bit, 128-bit floating points ?

  • Matrix multiplication? This boils down to multiplication and addition of floating-point numbers, and in all programming languages I have been using so far I never had to implement those basic operations myself. – Kurt G. Dec 16 '22 at 13:15
  • Of course, demanding that the entries in the result be unique is going to put restrictions on the two arrays you are multiplying together. And no, those restrictions are not going to be easy to figure out. The easiest way to accomplish it would be to simply multiply your initial arrays, and check the results. if there are any duplicates, just tweak one of the values leading to the duplicated result, and try again. You likely would not have to do many such tweaks before getting a unique result. – Paul Sinclair Dec 17 '22 at 14:11
  • But it is unclear here even what you mean by "multiply two arrays". Kurt G and I have assumed you meant matrix multiplication. But the mathematical naiveté displayed in your question makes me wonder if that is what you mean, or maybe you are just referring to multiplying corresponding elements of two identically sized arrays. Can you clarify, please? – Paul Sinclair Dec 17 '22 at 14:14
  • Yes I am coming from programming background so it would effectively be matrix multiplication, & so far I can only do what I call a brute force method of setting all elements to a fixed random pattern (so I can check multiple seeds) then multiply and then check / tweek. – D.Price Feb 21 '23 at 11:30

0 Answers0