aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--research/dat_k.csv36
-rw-r--r--research/dat_n.csv36
-rw-r--r--research/root.py36
3 files changed, 108 insertions, 0 deletions
diff --git a/research/dat_k.csv b/research/dat_k.csv
new file mode 100644
index 0000000..4713c36
--- /dev/null
+++ b/research/dat_k.csv
@@ -0,0 +1,36 @@
+215,235,195
+215,235,195
+235,215,195
+235,215,195
+235,215,195
+235,215,195
+235,215,195
+235,215,195
+235,215,175
+235,215,195
+235,215,195
+240,230,220
+240,230,220
+240,230,220
+240,230,220
+240,230,220
+240,230,220
+240,230,250
+240,250,230
+240,250,230
+240,250,230
+247.5,242.5,237.5
+247.5,242.5,237.5
+247.5,242.5,237.5
+247.5,242.5,252.5
+247.5,252.5,242.5
+252.5,247.5,242.5
+252.5,247.5,242.5
+252,250,248
+252.5,253.5,251.5
+253.5,252.5,250.5
+254.75,252.75,253.75
+255.1,255.9,255.3
+255.25,255.75,NA
+255,NA,NA
+255,NA,NA
diff --git a/research/dat_n.csv b/research/dat_n.csv
new file mode 100644
index 0000000..2757281
--- /dev/null
+++ b/research/dat_n.csv
@@ -0,0 +1,36 @@
+235,15,55,135,75,95,195
+215,235,15,195,75,135,115
+235,215,135,75,95,195,55
+195,235,115,215,175,35,155
+235,135,175,75,195,55,35
+215,235,75,55,195,155,175
+235,15,215,75,115,95,175
+195,235,175,155,95,55,115
+235,195,175,55,215,35,95
+235,95,135,195,15,155,175
+235,215,75,195,55,115,155
+235,55,215,175,15,115,135
+235,175,55,215,115,195,15
+235,195,155,135,35,55,175
+235,175,75,95,15,215,55
+215,235,95,135,35,195,15
+235,175,95,215,35,55,15
+35,195,235,215,75,15,155
+235,215,35,195,75,135,55
+235,75,55,215,15,115,195
+215,75,235,55,155,115,35
+55,235,215,15,75,135,115
+235,95,35,75,215,55,115
+55,35,235,215,75,175,195
+235,15,215,75,95,115,155
+95,75,235,215,195,115,55
+30,230,80,180,130,280,NA
+115,95,215,235,15,75,135
+80,180,230,130,30,NA,NA
+180,30,130,230,80,NA,NA
+180,80,230,130,30,NA,NA
+80,130,180,230,30,NA,NA
+30,80,130,NA,NA,NA,NA
+150,170,160,NA,NA,NA,NA
+175,NA,NA,NA,NA,NA,NA
+255,NA,NA,NA,NA,NA,NA
diff --git a/research/root.py b/research/root.py
new file mode 100644
index 0000000..e0ef85f
--- /dev/null
+++ b/research/root.py
@@ -0,0 +1,36 @@
+import math
+
+def compress():
+ num = 25390283502835092850912835091098172509218753091220958203958230958230598230598203958098098098
+ numlen = len(bin(num))
+ print(f"prev: {numlen}")
+
+ com = ""
+ key = ""
+
+ i = 0
+ p_total = math.inf
+ while True:
+ print("---")
+ s_d = s_n = s_k = math.inf
+ for n in range(255, 1, -1):
+ for k in range(255, 1, -1):
+ r = n ** k
+ d = abs(num - r)
+ if d < s_d:
+ s_d = d
+ s_n = n
+ s_k = k
+ # key += "{:08b}{:08b}".format(s_n, s_k)
+ key += "00000"
+ total = len(bin(s_d)) + len(key)
+ print(s_d, s_n, s_k)
+ print(f"total: {total}")
+ if total > p_total:
+ com = s_d
+ break
+ p_total = total
+ num = s_d
+ i += 1
+
+ print(f"iterations: {i}, prev: {numlen}, reduction by: {total / numlen}")