Advertisement
Guest User

ecl1 - More Powerful Single-Sequence BMS System?

a guest
May 24th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. ================================================
  2. ecl1 - More Powerful Single-Sequence BMS System?
  3. ================================================
  4.  
  5.  
  6.  
  7. A sequence is written as (x_1,x_2,x_3,x_4,...,x_n)[a] where a>0 is an integer and x_i >= 0 are integers.
  8.  
  9. If the last number is 0, the normal BMS rule applies (remove it, square the number in the [] brackets).
  10. If the last number is not 0, then do these:
  11. ---- Let the last number be N.
  12. ---- Find the rightmost number strictly less than N, and call it K.
  13. ---- The part of the sequence including K and things to the left of K is the "left" part of the sequence.
  14. ---- The part of the sequence strictly to the right of K is the "right" part of the sequence.
  15. ---- Decrease the last number (N) by 1. Make this the new value of N.
  16. ---- Find the difference between N and K, call this D.
  17. (Note: if the ordinal is less than e0, D will always be equal to 0.)
  18. ---- Take the left part of the sequence, and concatenate sequences S_0, S_1, ... S_(a-1) to it.
  19. ---- S_i is defined as the right part of the sequence, where every term in it is incremented by D\*i.
  20.  
  21. Example #1:
  22. (0,2,1,3)
  23. Left part = (0,2,1)
  24. Right part = (2) (after decrementing from 3)
  25. N = 2
  26. K = 1
  27. D = 2-1 = 1
  28. S_0 = (2) incremented by D*0 = 0
  29. S_1 = (2) incremented by D*1 = 1, which is (3).
  30. S_2 = (2) incremented by D*2 = 2, which is (4).
  31. etc etc...
  32. So the result is the left part (0,2,1) concatenated with (2),(3),(4),(5),.... etc
  33. which is (0,2,1,2,3,4,5,6,7,8,....)
  34.  
  35. Example #2:
  36. (0,2,2)
  37. Left part = (0)
  38. Right part = (2,1) after decrementing
  39. N = 1
  40. K = 0
  41. D = 1-0 = 1
  42. S_0 = (2,1) incremented by D*0 = 0
  43. S_1 = (2,1) incremented by D*1 = 1, which is (3,2)
  44. S_2 = (2,1) incremented by D*2 = 2, which is (4,3)
  45. etc etc...
  46. So the result is (0,2,1,3,2,4,3,5,4,6,5....)
  47.  
  48. Example #3:
  49. (0,4,7)
  50. Left part = (0,4)
  51. Right part = (6) after decrementing
  52. N = 6
  53. K = 4
  54. D = 6-4 = 2
  55. S_0 = (6) incremented by D*0 = 0
  56. S_1 = (6) incremented by D*1 = 2, which is (8)
  57. S_2 = (6) incremented by D*2 = 4, which is (10)
  58. etc etc...
  59. So the result is (0,4,6,8,10,12,14,......)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement