How I Built NajduzaRec.rs: Mathematics, Algorithms and Educational Software

Mathematics has never been merely a collection of formulas, rules and procedures to me. It has always been a way of thinking: a language of structure, precision, patterns, proof and problem solving. Long before I became a professional electrical engineer, I was fascinated by logical structures, numerical patterns, elegant solutions and the ability of mathematics to describe both abstract ideas and real-world phenomena with remarkable clarity.

Electrical engineering strengthened this way of thinking even further. In engineering, a good solution is rarely only about knowing a formula. It is about understanding a system, recognizing constraints, simplifying complexity and creating something that works reliably in practice. That same mindset naturally led me toward programming, because programming gave mathematical reasoning an executable form.

A formula written on paper can explain a concept, but software can make that concept interactive. A mathematical method can remain an abstract procedure, but a program can turn it into a useful application that helps people calculate, test, compare, explore and learn. This is the central connection behind NajduzaRec.rs.

Over time, this combination of mathematics, engineering and programming led me to create two educational projects: NajduzaRec.rs, launched in August 2019 and Infinite Math World, launched in early December 2024. Although these two websites have different identities, they are deeply connected. Infinite Math World explains ideas through detailed articles, while NajduzaRec.rs allows users to interact with mathematical, logical, linguistic and algorithmic problems directly.

This article is the story of NajduzaRec.rs: how it began, how it evolved, what public and private software tools stand behind it, what mathematical ideas power its applications and why I believe educational software can play an important role in popularizing mathematics, logic, programming and problem solving.

NajduzaRec.rs educational platform combining mathematics, algorithms, word generation and interactive learning applications

From Engineering Thinking to Educational Software

Why mathematics and programming naturally belong together

Mathematics gives structure. Programming gives that structure an executable form. Mathematics defines a problem precisely, while programming allows the solution to be tested, automated and made available to other users. The two disciplines therefore complement each other naturally, especially in education.

When a student solves a mathematical problem manually, the focus is often on one example. When the same idea is implemented in software, many examples can be tested quickly. A user can change input values, compare results, notice patterns and develop a broader understanding. This is one of the main reasons why I became interested in educational software.

A good educational application must be accurate, stable and clear. Accuracy alone is not enough. The application must handle user input properly, avoid misleading results and present its output in a form that helps learning rather than creating confusion.

  • Mathematical correctness: the definitions, formulas and logical conditions must be valid
  • Algorithmic reliability: the procedure must return correct results consistently and efficiently
  • Educational clarity: users should understand not only the answer, but also the reason behind it
  • Practical usefulness: the tool should help users calculate, test, verify, or explore something meaningful

The Story Before the Website

NajduzaRec.rs officially appeared in August 2019. However, the website itself was not the beginning of the project. For years before that, I had been creating standalone programs related to mathematics, word search, numerical calculations, prime numbers, algebraic equations, complex numbers and other computational problems.

Some of those programs later became part of NajduzaRec.rs. Others still exist only as private programs and are not publicly available on the website. This is an important part of the story because the public web platform was created in approximately one month, but many ideas, algorithms and software solutions behind it had existed earlier.

In other words, NajduzaRec.rs was not a sudden isolated project. It was the public form of a much longer personal development path. The visible website represents only one layer of a broader body of mathematical and programming work.

Building the website while working a full-time job

When NajduzaRec.rs was created, I was also working a regular full-time job. That made the development process more demanding. A public application must be more disciplined than a private tool. It must be accessible, stable, understandable and useful to users who know nothing about the internal code.

The challenge was not merely to write algorithms. The challenge was to transform existing ideas and private programs into a public educational platform: to design input forms, validate user input, organize pages, present results clearly and make the tools available through a browser.

The Original Idea Behind NajduzaRec.rs

The Longest Word as an algorithmic challenge

The name NajduzaRec.rs comes from the first and most recognizable application on the website: finding the longest possible word from a given set of letters. The inspiration came from the first game in the popular Serbian television quiz Slagalica.

For a human player, this is a challenge of vocabulary, memory, intuition and speed. For a computer program, however, the same challenge becomes a problem of databases, sorting, constraints and algorithmic search. The program must determine which words from a database can be formed from the given letters and must return a correct longest result.

The problem is more subtle than simply checking whether a word contains available letters. It is necessary to check how many times each letter is used. For example, if a word contains a certain letter twice, the input combination must also contain that letter at least twice.

For every letter ℓ: count_word(ℓ) ≤ count_input(ℓ)

This is a multiset condition. The input letters form a multiset and every candidate word also forms a multiset. A word is valid only if the letter multiset of the word is contained in the input multiset.

Why specialized databases matter

A general dictionary is not enough for this application. A general dictionary may contain words of many lengths, unsuitable forms, duplicates, or entries that do not follow the intended rules of the game. For the application to produce meaningful results, the database must be specialized.

The Serbian and English word databases used by NajduzaRec.rs contain words from 9 to 12 letters. This is not accidental. The purpose of the application is to find long words from a set of twelve letters, so shorter entries are not relevant to the main goal of this specific tool.

The Serbian database contains more than 64,000 Serbian words from 9 to 12 letters. The English database contains more than 73,000 English words from 9 to 12 letters. The real value of these databases, however, is not only their size, but their structure and quality.

Sorting words for speed and deterministic results

The words are sorted in a very specific way. First, they are arranged by decreasing length: 12-letter words, then 11-letter words, then 10-letter words and finally 9-letter words. Within each equal-length group, Serbian words are sorted according to Serbian alphabetical order, while English words are sorted according to the English alphabet.

Primary sorting key: decreasing word length

Secondary sorting key: alphabetical order within the same length

This sorting principle is not only aesthetic. It is part of the algorithm. Since the purpose is to find the longest valid word, the program should begin with the longest candidates. If the first valid word is found in a database sorted from longest to shortest, no shorter word can improve the result.

First valid match in decreasing-length order ⇒ longest valid result

If several valid words have the same maximum length, the alphabetical ordering determines which one appears first. This makes the output deterministic, consistent and easy to explain.

Private Tools Behind the Word Databases

A high-quality word application requires much more than a visible search interface. Behind the public application there must be database maintenance: collecting words, removing duplicates, sorting, counting, checking and improving entries over time.

Duplicate-removal and sorting application

One private application, not publicly available on NajduzaRec.rs, is used to remove duplicate words from the Serbian and English word databases and to sort the remaining words correctly. Duplicate removal is essential because repeated entries add no educational value. They only make the database less clean and can complicate testing and verification.

After duplicate removal, the words must be sorted in exactly the order required by the search algorithm. The private tool therefore supports both linguistic quality and algorithmic efficiency.

12-letter words → 11-letter words → 10-letter words → 9-letter words

Equal length, Serbian database: Serbian alphabetical order

Equal length, English database: English alphabetical order

Exact word-count application

Another private application, also not publicly available, counts and returns the exact number of words in a database. This is important because the databases are continuously improved. When words are added, removed, corrected, filtered, or reordered, the exact database size should be verified by software rather than estimated informally.

This exact-counting tool makes database maintenance more disciplined. It helps confirm the actual size of a Serbian or English word database after cleaning, sorting or updating.

Private program for all possible words

There is also a private program, presented on YouTube, that generates all possible valid words from a given combination of letters, from 12-letter words down to 9-letter words. This is more complete than the public Longest Word application. The public application is optimized to display the longest result quickly, while the private program provides the full list of valid words.

Output order: 12-letter words → 11-letter words → 10-letter words → 9-letter words

For equal length: Serbian alphabetical order or English alphabetical order

This private program answers a broader question: not only “What is the longest word?”, but “What are all valid words from this combination, organized by length and alphabetically?”

Private prime-number program with TXT export

Another private program, also demonstrated on YouTube, generates the list of prime numbers in a selected numerical range and gives the total count of primes in that range. Unlike a simple on-screen display, this program can export the result in the form of a TXT file.

This makes the program useful for educational demonstrations, later checking, archiving and numerical analysis. It extends the public prime-number idea from interactive calculation to full-list generation and export.

Mathematics Behind All Applications

1. Longest Word

The mathematics behind the Longest Word application is not advanced algebra, but it is a precise combinatorial and algorithmic idea. A word is valid if each of its letters can be supplied from the input set of letters without exceeding the available frequency of any letter.

For every letter ℓ: count_word(ℓ) ≤ count_input(ℓ)

Because the database is sorted from longest to shortest, the first valid word found by the algorithm is a longest possible valid word. The sorting order therefore turns a potentially large search into a fast deterministic procedure.

Sorted database + first valid match ⇒ longest valid word

The private all-words program extends this idea by not stopping at the first match. Instead, it continues the search and returns all valid words from 12 to 9 letters, sorted by length and alphabetically within equal length groups.

2. Prime Numbers

A prime number is a natural number greater than 1 that has exactly two positive divisors: 1 and itself. The Prime Numbers application determines prime numbers in a selected interval and the key optimization is that it is enough to test divisors up to √n.

Assume n is composite. Then n can be written as a product of two integers greater than 1:

n = a · b

If both factors were greater than √n, then their product would be greater than n:

a > √n and b > √n ⇒ a · b > √n · √n = n

This is impossible because a · b = n. Therefore, every composite number n has at least one divisor not greater than √n.

If no divisor d exists for 2 ≤ d ≤ ⌊√n⌋, then n is prime.

The private prime-number program exporting the result as a TXT file.

3. Systems of Two Linear Equations

A system of two linear equations can represent two lines in a plane. Depending on the relationship between those lines, the system may have one solution, no solution, or infinitely many solutions.

a₁x + b₁y = c₁

a₂x + b₂y = c₂

Using determinants, define:

D  = a₁b₂ − a₂b₁

Dₓ = c₁b₂ − c₂b₁

Dᵧ = a₁c₂ − a₂c₁

If D ≠ 0, the system has exactly one solution:

x = Dₓ / D

y = Dᵧ / D

If D = 0, the coefficients are linearly dependent. In that case, the system must be checked for consistency. The lines may be parallel, giving no solution, or identical, giving infinitely many solutions.

4. Systems of Three Linear Equations

A system of three linear equations usually represents three planes in three-dimensional space. Depending on their mutual positions, they may intersect in one point, fail to have a common point, or have infinitely many common points.

a₁x + b₁y + c₁z = d₁

a₂x + b₂y + c₂z = d₂

a₃x + b₃y + c₃z = d₃

The coefficient determinant is:

D = a₁(b₂c₃ − b₃c₂) − b₁(a₂c₃ − a₃c₂) + c₁(a₂b₃ − a₃b₂)

When D ≠ 0, the system has exactly one solution. By Cramer’s rule:

x = Dₓ / D,   y = Dᵧ / D,   z = Dz / D

Here Dₓ, Dᵧ and Dz are obtained by replacing the corresponding coefficient column with the constants column. If D = 0, additional analysis is required because the planes may have no common point or infinitely many common points.

5. Quadratic Equations

The quadratic-equation application deserves special care because it does not handle only the standard textbook case. It also handles reduced cases in which the equation becomes linear or factorable. This makes the application more complete from an educational point of view.

General quadratic case

ax² + bx + c = 0,   a ≠ 0

The discriminant is:

D = b² − 4ac

The usual quadratic formula is:

x₁,₂ = (−b ± √D)/(2a)

If D > 0, the equation has two distinct real roots. If D = 0, it has one repeated real root. If D < 0, it has two complex conjugate roots.

Derivation by completing the square

ax² + bx + c = 0

x² + (b/a)x + c/a = 0

x² + (b/a)x = −c/a

x² + (b/a)x + b²/(4a²) = b²/(4a²) − c/a

(x + b/(2a))² = (b² − 4ac)/(4a²)

x + b/(2a) = ±√(b² − 4ac)/(2a)

x = (−b ± √(b² − 4ac))/(2a)

Linear case when a = 0

If a = 0, the quadratic term disappears and the equation is no longer quadratic. The application then solves the corresponding linear equation:

bx + c = 0

If b ≠ 0: x = −c/b

This reduced case is important because a user may enter coefficients that do not form a true quadratic equation. A robust educational tool should handle that situation clearly instead of simply failing.

Factored case when c = 0

There is another important reduced structure. If c = 0, the equation becomes:

ax² + bx = 0

The expression has a common factor x, so it can be factored as:

x(ax + b) = 0

By the zero-product property, at least one factor must be zero. Therefore:

x = 0

or:

ax + b = 0

If a ≠ 0: x = −b/a

So when c = 0, one root is x₁ = 0 and the other root is obtained from the corresponding linear factor ax + b = 0. This is not the same as the a = 0 case. It is a factorization of a genuine quadratic expression when a ≠ 0, but it still contains a linear equation as one part of the solution process.

If c = 0 and a ≠ 0: roots are x₁ = 0 and x₂ = −b/a

If c = 0 and a = 0: the root is x = 0 (because of bx = 0)

This detail is important because it shows that the application is not merely applying the quadratic formula mechanically. It recognizes useful algebraic structure and handles special cases in a mathematically meaningful way.

6. Cubic Equations

Cubic equations are more complex than quadratic equations. A general cubic equation has the form:

ax³ + bx² + cx + d = 0,   a ≠ 0

After dividing by a, the equation can be written as:

x³ + Ax² + Bx + C = 0

The substitution:

x = t − A/3

eliminates the quadratic term and transforms the equation into a depressed cubic:

t³ + pt + q = 0

p = B − A²/3

q = 2A³/27 − AB/3 + C

A discriminant-like expression used in Cardano’s method is:

Δ = (q/2)² + (p/3)³

The behavior of the roots depends on this expression. Cubic equations are therefore computationally more delicate than quadratic equations, especially when real roots, complex quantities, powers and roots interact.

I developed this application during the Windows XP era. While working on it, I uncovered a significant issue within the operating system that, at the time, had not been documented anywhere on the Internet.

7. Logarithm

Most standard calculators directly provide natural and common logarithms, but the logarithm application calculates logarithms with arbitrary valid bases. The mathematical foundation is the change-of-base formula.

Let:

log_b(a) = x

log_c(a) = y

By the definition of logarithm:

a = bˣ

a = cʸ

Therefore:

bˣ = cʸ

Taking logarithms with base c gives:

log_c(bˣ) = log_c(cʸ)

x·log_c(b) = y·log_c(c)

x·log_c(b) = y

Since y = log_c(a), we obtain:

log_b(a) = log_c(a) / log_c(b)

This formula allows the application to compute logarithms in arbitrary positive bases using logarithms in a standard base.

8. Nth Root

The nth-root application is based on the relationship between powers and roots:

x = ⁿ√a ⇔ xⁿ = a

For real-valued roots, the parity of n matters. Odd roots of negative numbers exist in the real-number system, while even roots of negative numbers do not.

n odd: ⁿ√(−a) = −ⁿ√a for a > 0

n even and a < 0: no real nth root

This distinction is mathematically important and computationally important. Software must not blindly treat all roots as fractional powers without considering the intended number system and the parity of the root index.

9. Greatest Common Divisor and Least Common Multiple

The greatest common divisor and least common multiple are basic but powerful ideas in number theory. The greatest common divisor is the largest positive integer that divides two integers. The least common multiple is the smallest positive integer divisible by both.

gcd(a, b) = greatest positive d such that d|a and d|b

lcm(a, b) = smallest positive m such that a|m and b|m

The Euclidean algorithm gives an efficient method for computing the greatest common divisor:

gcd(a, b) = gcd(b, a mod b)

The process continues until the remainder becomes zero. Once the GCD is known, the LCM can be calculated by:

lcm(a, b) = |a·b| / gcd(a, b)

This relationship connects divisibility, factorization, fractions, modular arithmetic and algorithmic efficiency.

10. Divisibility of Numbers

The divisibility application is based on the relation a|b, which means that b is an integer multiple of a.

a|b ⇔ there exists an integer k such that b = ak

Equivalent modular form: b mod a = 0

Divisibility rules are useful because they convert division into pattern recognition. Divisibility by 2 depends on the last digit. Divisibility by 3 depends on the sum of digits. Divisibility by 5 depends on the last digit being 0 or 5. More generally, such rules reveal hidden structure in the decimal representation of integers.

11. Multiplication and Division of Complex Numbers

Complex numbers are especially important from the perspective of electrical engineering. They appear in alternating current circuit analysis, impedance, phasors, Fourier analysis, signal processing and many other applications. The multiplication and division application helps users practice operations with real and imaginary components.

For multiplication, using i² = −1:

(a + bi)(c + di) = ac + adi + bci + bdi²

(a + bi)(c + di) = (ac − bd) + (ad + bc)i

For division, the denominator is rationalized by multiplying by the conjugate:

(a + bi)/(c + di) = ((a + bi)(c − di))/((c + di)(c − di))

(c + di)(c − di) = c² + d²

(a + bi)/(c + di) = ((ac + bd) + (bc − ad)i)/(c² + d²), c + di ≠ 0

This procedure is a clear example of how symbolic algebra becomes an executable computational method.

12. Square Root of Complex Numbers

The square root of a complex number can be derived algebraically. Let the given complex number be:

a + bi

Assume that one square root has the form:

x + yi

Then:

(x + yi)² = a + bi

x² + 2xyi + y²i² = a + bi

x² − y² + 2xyi = a + bi

Equating real and imaginary parts gives:

x² − y² = a        (1)

2xy = b             (2)

Using the modulus gives:

r = √(a² + b²) = x² + y²        (3)

Adding equations (1) and (3):

(x² − y²) + (x² + y²) = a + r

2x² = r + a

x = ±√((r + a)/2)

Subtracting equation (1) from equation (3):

(x² + y²) − (x² − y²) = r − a

2y² = r − a

y = ±√((r − a)/2)

The signs are chosen so that 2xy = b. Therefore, the two square roots are opposite complex numbers.

√(a + bi) = ±( √((r + a)/2) + sign(b)i√((r − a)/2) ), r = √(a² + b²)

13. Lotto 7/39

The Lotto 7/39 application is a mathematical model based on combinatorics and probability. It should not be understood as a promise of prediction or as promotion of games of chance. Its educational value is in illustrating how quickly combinations grow.

The number of ways to choose k elements from n elements when order does not matter is:

C(n, k) = n! / (k!(n − k)!)

For Lotto 7/39, this becomes:

C(39, 7) = 39! / (7!·32!)

This formula shows that even a simple-looking selection problem can produce a very large number of possible outcomes. That is exactly why combinatorial thinking is useful for understanding random systems.

Why the Private Tools Matter

The private programs strengthen the reference value of NajduzaRec.rs because they show the invisible work behind the visible website. A user may see only a form, a button and a result. Behind that result there may be years of testing, database cleaning, duplicate removal, exact counting, sorting, algorithm design, export utilities and continuous correction.

The public web applications are designed to be simple enough for visitors. The private programs can be more exhaustive and analytical. Both types of software are valuable, but they serve different purposes. The public website is the educational interface; the private tools are part of the development and verification infrastructure.

This makes NajduzaRec.rs more than a collection of calculators. It is a broader educational-software project where mathematics, programming, language processing, data organization and user experience work together.

NajduzaRec.rs and Infinite Math World

NajduzaRec.rs and Infinite Math World complement each other. NajduzaRec.rs provides interactive tools. Infinite Math World provides detailed explanations, essays, derivations and broader context. One project allows users to calculate and test; the other allows readers to understand why the calculation works.

Together, the two websites express the same educational philosophy: mathematics is not only something to memorize. It can be explored, tested, programmed, explained and made interactive.

Conclusion: Mathematics Made Interactive

NajduzaRec.rs began with the Longest Word idea, but it developed into a broader educational platform. It now connects language, mathematics, programming, logic, algorithms and education through thirteen public web applications and several private tools that support deeper analysis and database maintenance.

The Longest Word application shows how a familiar language game can become a problem of databases, sorting, multisets and search optimization. The prime-number tools show how a simple theorem about divisors up to √n becomes an efficient algorithm. The equation solvers show how algebraic methods become interactive educational utilities. The complex-number tools show why abstract mathematics matters in engineering. The combinatorial application shows how large numerical possibilities emerge from compact formulas.

That is the central purpose of NajduzaRec.rs: to connect mathematical correctness, algorithmic thinking and practical educational usefulness in one coherent platform.

2 thoughts on “How I Built NajduzaRec.rs: Mathematics, Algorithms and Educational Software”

  1. 📌 All Applications Mentioned in This Article

    🔠 LONGEST WORD
    Find the longest possible word from a given set of letters using a large word base containing more than 73,000 English words between 9 and 12 letters:

    https://www.najduzarec.rs/NajduzaRecEnglish/

    🔢 Interactive Mathematics Tools

    ✅ PRIME NUMBERS: https://www.najduzarec.rs/ProstiBrojeviEnglish/
    ✅ SYSTEMS OF TWO LINEAR EQUATIONS: https://www.najduzarec.rs/SistemiOdDveLinearneJednacineEnglish/
    ✅ SYSTEMS OF THREE LINEAR EQUATIONS: https://www.najduzarec.rs/SistemiOdTriLinearneJednacineEnglish/
    ✅ QUADRATIC EQUATIONS: https://www.najduzarec.rs/KvadratneJednacineEnglish/
    ✅ CUBIC EQUATIONS: https://www.najduzarec.rs/KubneJednacineEnglish/
    ✅ LOGARITHM: https://www.najduzarec.rs/LogaritamEnglish/
    ✅ NTH ROOT: https://www.najduzarec.rs/N-tiKorenEnglish/
    ✅ LEAST COMMON MULTIPLE (LCM) AND GREATEST COMMON DIVISOR (GCD): https://www.najduzarec.rs/NZSiNZDEnglish/
    ✅ DIVISIBILITY OF NUMBERS: https://www.najduzarec.rs/DeljivostBrojevaEnglish/
    ✅ MULTIPLICATION AND DIVISION OF TWO COMPLEX NUMBERS: https://www.najduzarec.rs/MnozenjeiDeljenjeDvaKompleksnaBrojaEnglish/
    ✅ SQUARE ROOT OF COMPLEX NUMBERS: https://www.najduzarec.rs/KvadratniKorenKompleksnihBrojevaEnglish/

    🎰 Lottery

    ✅ LOTTO 7/39 COMBINATIONS PROPOSAL
    A fun application that generates suggested combinations for the Lotto 7/39 game:

    https://www.najduzarec.rs/Loto7-39English/

    Reply
  2. 📌 Све апликације поменуте у овом чланку

    🔠 НАЈДУЖА РЕЧ
    Пронађите најдужу могућу реч из датог скупа слова користећи велику базу речи која садржи више од 64.000 српских речи између 9 и 12 слова:

    https://www.najduzarec.rs/NajduzaRecSerbian/

    🔢 Интерактивни математички алати

    ✅ ПРОСТИ БРОЈЕВИ: https://www.najduzarec.rs/ProstiBrojeviSerbian/
    ✅ СИСТЕМИ ОД ДВЕ ЛИНЕАРНЕ ЈЕДНАЧИНЕ: https://www.najduzarec.rs/SistemiOdDveLinearneJednacineSerbian/
    ✅ СИСТЕМИ ОД ТРИ ЛИНЕАРНЕ ЈЕДНАЧИНЕ: https://www.najduzarec.rs/SistemiOdTriLinearneJednacineSerbian/
    ✅ КВАДРАТНЕ ЈЕДНАЧИНЕ: https://www.najduzarec.rs/KvadratneJednacineSerbian/
    ✅ КУБНЕ ЈЕДНАЧИНЕ: https://www.najduzarec.rs/KubneJednacineSerbian/
    ✅ ЛОГАРИТАМ: https://www.najduzarec.rs/LogaritamSerbian/
    ✅ Н-ТИ КОРЕН: https://www.najduzarec.rs/N-tiKorenSerbian/
    ✅ НАЈМАЊИ ЗАЈЕДНИЧКИ САДРЖАЛАЦ (НЗС) И НАЈВЕЋИ ЗАЈЕДНИЧКИ ДЕЛИЛАЦ (НЗД): https://www.najduzarec.rs/NZSiNZDSerbian/
    ✅ ДЕЉИВОСТ БРОЈЕВА: https://www.najduzarec.rs/DeljivostBrojevaSerbian/
    ✅ МНОЖЕЊЕ И ДЕЉЕЊЕ ДВА КОМПЛЕКСНА БРОЈА: https://www.najduzarec.rs/MnozenjeiDeljenjeDvaKompleksnaBrojaSerbian/
    ✅ КВАДРАТНИ КОРЕН КОМПЛЕКСНИХ БРОЈЕВА: https://www.najduzarec.rs/KvadratniKorenKompleksnihBrojevaSerbian/

    🎰 Лутрија

    ✅ ПРЕДЛОГ ЛОТО КОМБИНАЦИЈА
    Забавна апликација која генерише комбинације за игру Лото 7/39:

    https://www.najduzarec.rs/Loto7-39Serbian/

    Reply

Leave a Comment