From 1f749c4ab99bdbba05770a28483511dccbf931d4 Mon Sep 17 00:00:00 2001 From: ciuak Date: Sat, 15 Jun 2019 21:33:34 +0000 Subject: [PATCH] English fixes --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b7d3797..ced4032 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ An O(*n*) implementation of the lujvo-making algorithm to save the world. ## What's the big deal with O(*n*), anyway? -All the jvozba I've seen over the years are of exponential complexity (O(*c*^*n*), where 1 ≤ *c* ≤ 4), because the ‘algorithm’ they implement is basically collecting all possible combinations of rafsi in an array, mapping the array to a score function, and sorting. This means that prefixing an input tanru with just one `bloti` will *quadruple* the time and memory it takes for the lujvo to compute. To put this into perspective: in order to find the lujvo for `bloti bloti bloti bloti bloti bloti bloti bloti bloti bloti`, the algorithm will have to call the score function a *million* times. Double theinput length and your 32-bit machine will explode. (Or wake up the OOM killer.) +All the jvozba I've seen over the years are of exponential complexity (O(*c*^*n*), where 1 ≤ *c* ≤ 4), because the ‘algorithm’ they implement is basically collecting all possible combinations of rafsi in an array, mapping the array with a score function, and sorting. This means that prefixing an input tanru with just one `bloti` will *quadruple* the time and memory it takes for the lujvo to compute. To put this into perspective: in order to find the lujvo for `bloti bloti bloti bloti bloti bloti bloti bloti bloti bloti`, the algorithm will have to call the score function a *million* times. Double the input length and your 32-bit machine will explode. (Or wake up the OOM killer.) -This jvozba, on the other hand, is linear in complexity, which means it can compute even a million-`bloti` lujvo in about a second. ‘How does it achieve *that*?’, I hear you asking. Simply put, it goes through each tanru unit and finds the best lujvo ‘so far,’ with a separate tally for tosmabru words for soundness. There's a bunch more performance tweaks in the code – I encourage you to perhaps read it. +This jvozba, on the other hand, is linear in complexity, which means it can compute even a million-`bloti` lujvo in about a second. ‘How does it achieve *that*?’, I hear you ask. Simply put, it goes through each tanru unit, keeping track of the best lujvo ‘so far’ alongside its score, with a separate tally for tosmabru words for soundness. There's a bunch more performance tweaks in the code – I encourage you to perhaps read it. ## Usage