One problem that seem to not draw interest from various actors in digital Tamil community seems to be the Tamil input via 4 x 3 standard Keypad.

Problem Statement: Given a 4×3 matrix of keys in a phone keypad, how can we input the basic 13 + 18 + 12×18 = 247 letters of Tamil alphabet using this device ?
Alternate: Clearly, 247 letters have an information content of bits or roughly 8bits. So we can simply punch in 3 keys for indicating this 8bit combination and we are done. Provide a table to the user about 247 letters and their 3-numeric key map and we have solved this problem in one way.
This is not very satisfying however; we seem to put the user to more work; we would instead like to have similar entry method in Tamil just like in English (where 3 letters are grouped per telephone key). The processor for application in the phone or mainframe can decode any ambiguity of the telephone keypad mapping into meaningful words or phrases.
Ideas: We can come up with various proposals; being lazy, and the official jester of Tamil computing community, I will try and make a simple combinatorial analysis for this problem without giving a specific solution.
Details: We can consider the factors of 247 = 19 x 13 which form a matrix of all letters representing the Tamil alphabets and we can count the partitions of this matrix onto the smaller keypad matrix. Following the roman letters of English alphabet consisting of 26 letters are fit easily into the 4 x 3 matrix on average of little less than 3 letters per key, we can also adopt a similar convention.
There are many ways to fit this large 19 x 13 matrix into a 4 x 3 matrix. Using simple combinatorial analysis we may show 19 letters can be divided into 4 groups as (ignoring the assignment of letter groups to keys –
ways) along the rows. Similarly, we group along columns in
ways (and ignoring the 3! column permutation themselves). In all we have a total of
key grouping combinations.
Clearly we have an alternate possibility of grouping the 19 x 13 matrix as a transposed matrix – i.e grouping dimension of 13 elements of Tamil alphabets into larger keypad dimension of 4, and assigning 19 elements along the fewer keypad dimension of 3. This alternative gives us
Together we have a total of 1,801,371. Thats roughly 1.8 million possibilities! Check them yourself by running this code:
# Code for blog post: https://ezhillang.blog/2019/03/01/tamil-entry-via-keypad/ | |
# This code is in Public Domain. | |
from math import factorial as f | |
from math import log | |
def comb(n, k): | |
return (f(n) / f(k)) / f(n - k) | |
def nck(n,k): | |
return comb(float(n),float(k)) | |
C1 = nck(19,4)*nck(13,3) | |
print "C1", C1 | |
C2 = nck(13,4)*nck(19,3) | |
print "C2", C2 | |
print "Total=",C1+C2 | |
print "Logaritmic capacity for 247 letters = ",log(247.0)/log(2.0) | |
print "Grand total", f(3)*f(4.0)*(C1+C2) |
Conclusion: How are we going to find a suitable keypad mapping? Well we may need more heuristics and more cleverness to find the keypad mappings [a few definitely exist in this 259 million possibilities, which maximize a utility function.
So that leads us to the next problem: what is the utility of mapping a Tamil letters in the keypad ? Well – we don’t know apparently, so it doesn’t exist! This also ties into the philosophical question of what is the purpose of all software if not to support use.
One thought on “Tamil Entry via Keypad”