View Single Post
  #2  
Old 01-14-2020, 02:49
chants chants is online now
Family
 
Join Date: Jul 2016
Posts: 513
Rept. Given: 5
Rept. Rcvd 34 Times in 20 Posts
Thanks Given: 434
Thanks Rcvd at 778 Times in 360 Posts
chants Reputation: 34
An infinite number of mathematical or algorithmic mappings are possible. Probably you need to be more specific on what operations are allowed and maximum number of ops as well as maybe more values. Otherwise easy enough:
(x&0xf==1)*0x70f5+(x&0xf==0)*0x2c8c+(x&0xf==2)*0xdde2+(x&0xf==0xf)*0x5967

Technically speaking that one liner is an algorithm upon which they all rely. I'm not sure how to properly mathematically phrase what I feel you ar asking, as doubtlessly not my silly example, but it's interesting in how hard the question might be to exactly specify. I would think something like the minimal kolmogorov complexity but even then maybe this formula is simpler with a mere 4 cases. I would like to see not only the intended answer but how are we to ask in a way which excludes all the endless wrong ones
Reply With Quote
The Following User Says Thank You to chants For This Useful Post:
mcr4ck (01-14-2020)