Experiment to see 247 Tamil letters mapped into a 4x3 Telephone keypad.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment