|
-
Jan 26th, 2008, 10:00 AM
#1
Thread Starter
Frenzied Member
math question - number base system
hey all.
I've thought about this a hundred ways and I can't figure it out.
So, answer please.
I was trying to figure out how to make a number system that uses only the letters A to Z, such that it counts this way:
A
B
C
....
Z
AA
AB
....
ZY
ZZ
....
AAA
AAB
and so on
The problem is, this doesn't seem to correspond to a number system like base 10, because there's no representation of a "0"
Like in a base 10 counts 123456789 10
so it seems the above system has A as 1, therefore, going XYZ AA
would be like counting in base 10 123456789 11
Right?
So how do I overcome this, to have a 1 to 1 conversion rate for base 10 numbers to this letter only system?
In other words, if I put in 1, I get A
if I put in 26, I get Z
if I put in 27, I get AA.
I just can't figure it out.
Anybody?
Thanks
Wengang
Wen Gang, Programmer
VB6, QB, HTML, ASP, VBScript, Visual C++, Java
-
Jan 26th, 2008, 10:52 AM
#2
Re: math question - number base system
You can't because, as you say, you don't have a zero. To fully describe all numbers in your counting system you have to be able to represent an empty slot, otherwise it means that your characters need to change value depending on whether they are units, "tens", "hundreds" etc. Obviously not a good system.
There is nothing to figure out because the zero is an integral part of a number system.
Another way to look at it is that every base system, no matter what, starts with 0 in the units column and counts up as many characters as the base. The units slot is then full and so the next increment is to create another slot and have nothing in the right-most. If you skip this combination then you have to be missing a number out, or you have to redefine your counting system depending on the position of the character as well as its appearance.
Last edited by zaza; Jan 26th, 2008 at 10:56 AM.
-
Jan 27th, 2008, 04:43 AM
#3
Frenzied Member
Re: math question - number base system
Why cant you just have A as 0?
-
Jan 27th, 2008, 12:51 PM
#4
Re: math question - number base system
 Originally Posted by 03myersd
Why cant you just have A as 0?
Because AA would then be 00 = 0.
-
Jan 29th, 2008, 06:19 AM
#5
Re: math question - number base system
Just use a different character man! Gawd! Lol..
-
Jan 29th, 2008, 11:18 AM
#6
Frenzied Member
Re: math question - number base system
Why cant you just have:
A = 0
B = 1
C = 2
D = 3
E = 4
Etc.
-
Jan 30th, 2008, 03:08 AM
#7
Re: math question - number base system
I agree with 03myersd. Hexadecimal works similarly, in a strange sort of way, to what you want. If you felt like, you could "renumber" Hex as follows:
0->A
1->B
2->C
3->D
4->E
...
15->P
Then the "standard" hex string of, say, 00 would simply be AA, and similarly 12 would be BC. 12 would still mean 16+2=18 in decimal, but so would BC--yet you'd be using only letters. This would give a completely consistent numbering system, which can be converted to decimal quite easily, using the first 16 letters of the alphabet.
There's nothing sacred about A not being 0: 00 = 0, and we don't mind that. I don't see the issue with AA = A...?
As Zaza pointed out the issue you're having is that you're not representing zero. Base 10 counting actually starts at 0: 0123456789 10,11,12,13,14.... The system that 03myersd proposed has you counting like this: A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, BA, BB, BC, BD, ..., corresponding to, in base 10: 0=A, 1=B, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 2Y, 25=Z, BA=26, BB=27, BC=28, BD=29, .... One critical thing here is that A = 0 and Z = 25 instead of A = 1 and Z = 26. Even in base 10, we can't represent 10 as a single digit--so in your base 26, we can't represent 26 as a single digit (i.e. Z must be less than 26 to be similar to base 10).
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Jan 30th, 2008, 05:48 AM
#8
Re: math question - number base system
But the problem is that 25 would be represented by Z, 26 represented by BA. He does not want that, he wants 26 to be represented by AA.
wengang already realises that he can do it if the sequence is X..Y..Z..BA..BB...
-
Jan 31st, 2008, 09:33 PM
#9
Re: math question - number base system
Doh, my bad. I should have read more carefully.
I'm pretty sure that system you're after is logically inconsistent. Let's check.
If A = 1, then AA = A*[base] + A = A*([base]+1) = 1*([base]+1) = 27, so [base] = 26, as expected. Since Z must be 26 [26th letter when "counted"], ZZ = 26*26+26 = 702. There must be 702 - 27 + 1 = 676 numbers between ZZ and AA for this to count each number in between. There are 26*26 = 676 possible letter combinations, so that works too. If each letter combo is unique, then this system counts properly.
Are they unique? Take two numbers pq = uv in this base system, so that when converted p*26+q = u*26+v. Taken mod 26, these become q == v, which can be true whenever one is 26 and one is 0. However, 0 isn't represented, so q == v implies that they have the same representation in your base system, so q = v. Then p*26 = u*26 [cancel the q and v, since they're equal to each other anyway], so p = u. That is, pq = uv implies that both digits are in fact the same. Thus length two numbers in this system are in fact unique.
This could be extended pretty easily using induction for all digits in your base system.
So it turns out that your system is actually consistent, and every integer from 1 onwards can be represented by it uniquely.
Assignments used:
A=1
B=2
...
Y=25
Z=26
Base=26
That is (and this surprises me), the system you've used actually does work. The trouble you had with normal counting was thinking that the last digit ("Z") is one less than your base, when in fact it's equal to your base.
Sorry this got so long, but I wanted to be rigorous enough to make this certain in my own mind.
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Feb 14th, 2008, 08:04 PM
#10
Lively Member
Re: math question - number base system
well lets start counting
A = 1
B = 2
.. = ..
Z = 26
AA = 1*26 + 1*1 = 27
AB = 1*26 + 2*1 = 28
AZ = 1*26 + 26*1= 52
BA = 2*26 + 1*1 = 53
ED = 5*26 + 4*1 = 134
ZY = 26*26 + 25*1 = 701
ZZ = 26*26 + 26*1 = 702
EVERything seems fine up to now,
to find the decimal number from the ABC number
(right most letter value *1) + (second from right letter value *26)
now the next number we want to represent is 703
the next number in our ABC representation is AAA
so the right most column is A=1 leaving us with 702 left to represent
the next colum is A=1*26 leaving us with 676 to represent
so we can say the third column is 676 [ so that 676 +26+1 =703]
now the lagest 3 letter number is ZZZ
which is 26*676 + 26*26 +26*1 = 18278
so again the next ABC number will be AAAA
and the next decimal number will be 18279
so AAA is already known to be 703
so the left most A here must be 18279-703 =17576
so the thing you might notice is that
the right most column represents units, 1 = 26^0
the next column represents 26's 26=26^1
the next column represents 676's 676=26^2
the next column represents 17576's 17576=26^3
so i'm guessing the next column will be 26^4 = 456976
so that AAAAA= 456976+17576+676+26+1=475255
lets see if ZZZZ= 475254.....
26*17576+26*676+26*26+26*1=475254
AS such i dont see an immediate problem with this systme
for just reprenting numbers.
-
Feb 21st, 2008, 07:09 AM
#11
Re: math question - number base system
I am better reading upside down than backwards but that is not relavent.
I don't have a problem with the number system proposed, but come on. Don't number systems have to pass first grade math?
Sally has A orange and Billy has A orange and Dirty Johnny takes A orange from Sally and Billy how many oranges do they each have?
Johnny - A + A = B - correct
Sally - A-A = NAN
Billy - A-A = NAN
So the number system:
does not work
is based on a concept of no nothingness
or A has to be 0.
If A = 0 then:
Johnny - B + B = C - correct
Sally - B-B = A - correct
Billy - B-B = A - correct
-
Feb 22nd, 2008, 06:20 PM
#12
Re: math question - number base system
I think that most practical number systems include a zero--but not all of them do. People tend to get so used to the field of real numbers that they forget the basic axioms they take for granted (zero works as you would expect, negatives exist, etc.) are actually just definitions that happen to have applications in real life. There are many other algebraic structures besides these fairly sane ones--Abstract Algebra deals with these.
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|