Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #24895 > unrolled thread
| Started by | jonas.thornvall@gmail.com |
|---|---|
| First post | 2014-06-17 06:42 -0700 |
| Last post | 2014-07-22 12:16 -0700 |
| Articles | 20 on this page of 60 — 6 participants |
Back to article view | Back to comp.lang.javascript
Bijective basechanger jonas.thornvall@gmail.com - 2014-06-17 06:42 -0700
Re: Bijective basechanger "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-06-17 12:08 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-17 13:23 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-17 13:24 -0700
Re: Bijective basechanger "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-06-17 13:54 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-17 14:07 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-17 14:15 -0700
Re: Bijective basechanger John Harris <niam@jghnorth.org.uk.invalid> - 2014-06-23 17:23 +0100
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-17 14:23 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-17 14:41 -0700
Re: Bijective basechanger "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-06-17 20:28 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-18 13:04 -0700
Re: Bijective basechanger "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-06-18 16:30 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-18 17:45 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-18 17:49 -0700
Re: Bijective basechanger "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-06-19 11:21 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-19 14:44 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-19 14:48 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-19 14:55 -0700
Re: Bijective basechanger "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-06-19 19:59 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-21 09:25 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-21 11:15 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-18 18:05 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-18 18:19 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-18 18:25 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-18 18:46 -0700
Re: Bijective basechanger "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-06-23 16:00 -0700
Re: Bijective basechanger "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-06-23 17:51 -0700
Re: Bijective basechanger John Harris <niam@jghnorth.org.uk.invalid> - 2014-06-23 17:18 +0100
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-23 11:27 -0700
Re: Bijective basechanger Scott Sauyet <scott.sauyet@gmail.com> - 2014-06-23 15:29 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-24 03:26 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-24 03:28 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-24 04:24 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-24 05:36 -0700
Re: Bijective basechanger Scott Sauyet <scott.sauyet@gmail.com> - 2014-06-24 13:05 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-24 14:13 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-25 05:36 -0700
Re: Bijective basechanger Scott Sauyet <scott.sauyet@gmail.com> - 2014-06-25 12:45 -0700
Re: Bijective basechanger Scott Sauyet <scott.sauyet@gmail.com> - 2014-06-25 13:15 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-07-01 02:39 -0700
Re: Bijective basechanger Scott Sauyet <scott.sauyet@gmail.com> - 2014-07-03 07:33 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-07-03 09:54 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-07-04 02:14 -0700
Re: Bijective basechanger Scott Sauyet <scott.sauyet@gmail.com> - 2014-07-05 12:12 -0700
Re: Bijective basechanger "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-07-05 22:19 +0200
Re: Bijective basechanger Scott Sauyet <scott.sauyet@gmail.com> - 2014-07-05 13:50 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-07-06 11:11 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-07-06 14:59 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-07-06 15:00 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-07-06 15:02 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-07-16 23:31 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-07-04 02:28 -0700
Re: Bijective basechanger Scott Sauyet <scott.sauyet@gmail.com> - 2014-07-05 12:14 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-25 22:38 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-24 03:32 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-24 03:44 -0700
Re: Bijective basechanger jonas.thornvall@gmail.com - 2014-06-24 11:10 -0700
Re: Bijective basechanger Scott Sauyet <scott.sauyet@gmail.com> - 2014-06-24 11:45 -0700
Re: Bijective basechanger "Chris M. Thomasson" <no@spam.invalid> - 2014-07-22 12:16 -0700
Page 1 of 3 [1] 2 3 Next page →
| From | jonas.thornvall@gmail.com |
|---|---|
| Date | 2014-06-17 06:42 -0700 |
| Subject | Bijective basechanger |
| Message-ID | <e8847026-67f9-417c-9166-d1368bb9a704@googlegroups.com> |
10=A 100=9A 1000=99A ... 20=1A 30=2A 30=3A ... 101=A1 200=19A 201=1A1 ... 2000=199A 2001=19A1 2010=19AA 2014=1A14 1091020134=????????? Brainteaser A generic basechanger for anybase is rather easy to accomplish, but i am a bit stumped where to start with doing conversion into bijective bases, i was thinking counting up the base multiples upto the number to convert, and bone it out from there saving the differences. But i just can't recall howto do it. Is there an easy obvious way todo this? I slightly remember there is something about using pairs, but that may have been for ordinary base conversion. Who have the fastest head doing the conversion.
[toc] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2014-06-17 12:08 -0700 |
| Message-ID | <60b6a006-1e9e-4b16-8056-243992faedcb@googlegroups.com> |
| In reply to | #24895 |
On Tuesday, June 17, 2014 8:42:28 AM UTC-5, jonas.t...@gmail.com wrote:
> 10=A
> 100=9A
> 1000=99A
> ...
> 20=1A
> 30=2A
> 30=3A
> ...
> 101=A1
> 200=19A
> 201=1A1
> ...
> 2000=199A
> 2001=19A1
> 2010=19AA
> 2014=1A14
> 1091020134=????????? Brainteaser
>
> A generic basechanger for anybase is rather easy to accomplish, but i am a bit stumped where to start with doing conversion into bijective bases, i was thinking counting up the base multiples upto the number to convert, and bone it out from there saving the differences. But i just can't recall howto do it.
>
> Is there an easy obvious way todo this?
>
> I slightly remember there is something about using pairs, but that may have been for ordinary base conversion.
>
> Who have the fastest head doing the conversion.
Not certain if I follow your question completely, so I'm going to give an answer I hope is in the ball park and hope you can correct me where we disconnect:
An integer "i" in base "n" can be represented in the form "i = (k,l)" where
"k = (i - (i mod n)) / n"
and
"l = i mod n"
For example:
253 = ([253 - (253 mod 16)]/16, 253 mod 16)
= (15, 13)
Converting the pair back into its original form is simply the base expansion
of the pair: i = k*n + l
[toc] | [prev] | [next] | [standalone]
| From | jonas.thornvall@gmail.com |
|---|---|
| Date | 2014-06-17 13:23 -0700 |
| Message-ID | <5da0343a-ede6-473a-ae01-58bf34739171@googlegroups.com> |
| In reply to | #24896 |
Den tisdagen den 17:e juni 2014 kl. 21:08:23 UTC+2 skrev Michael Haufe (TNO): > On Tuesday, June 17, 2014 8:42:28 AM UTC-5, jonas.t...@gmail.com wrote: > > > 10=A > > > 100=9A > > > 1000=99A > > > ... > > > 20=1A > > > 30=2A > > > 30=3A > > > ... > > > 101=A1 > > > 200=19A > > > 201=1A1 > > > ... > > > 2000=199A > > > 2001=19A1 > > > 2010=19AA > > > 2014=1A14 > > > 1091020134=????????? Brainteaser > > > > > > A generic basechanger for anybase is rather easy to accomplish, but i am a bit stumped where to start with doing conversion into bijective bases, i was thinking counting up the base multiples upto the number to convert, and bone it out from there saving the differences. But i just can't recall howto do it. > > > > > > Is there an easy obvious way todo this? > > > > > > I slightly remember there is something about using pairs, but that may have been for ordinary base conversion. > > > > > > Who have the fastest head doing the conversion. > > > > Not certain if I follow your question completely, so I'm going to give an answer I hope is in the ball park and hope you can correct me where we disconnect: > > > > An integer "i" in base "n" can be represented in the form "i = (k,l)" where > > "k = (i - (i mod n)) / n" > > and > > "l = i mod n" > > > > For example: > > > > 253 = ([253 - (253 mod 16)]/16, 253 mod 16) > > = (15, 13) > > > > Converting the pair back into its original form is simply the base expansion > > of the pair: i = k*n + l Ok base 16 but lets 10=A,B...,C...,D...,E...,F,*G*=16 so 253=F13 Well using base 16 if we would use your suggeste method to convert 240 it would end up be F0? But I want a zeroless encoding (bijective?) EG=(14*16)+(16*1)
[toc] | [prev] | [next] | [standalone]
| From | jonas.thornvall@gmail.com |
|---|---|
| Date | 2014-06-17 13:24 -0700 |
| Message-ID | <3e123a91-76b7-47d4-b25f-400c4d662718@googlegroups.com> |
| In reply to | #24897 |
Den tisdagen den 17:e juni 2014 kl. 22:23:15 UTC+2 skrev jonas.t...@gmail.com: > Den tisdagen den 17:e juni 2014 kl. 21:08:23 UTC+2 skrev Michael Haufe (TNO): > > > On Tuesday, June 17, 2014 8:42:28 AM UTC-5, jonas.t...@gmail.com wrote: > > > > > > > 10=A > > > > > > > 100=9A > > > > > > > 1000=99A > > > > > > > ... > > > > > > > 20=1A > > > > > > > 30=2A > > > > > > > 30=3A > > > > > > > ... > > > > > > > 101=A1 > > > > > > > 200=19A > > > > > > > 201=1A1 > > > > > > > ... > > > > > > > 2000=199A > > > > > > > 2001=19A1 > > > > > > > 2010=19AA > > > > > > > 2014=1A14 > > > > > > > 1091020134=????????? Brainteaser > > > > > > > > > > > > > > A generic basechanger for anybase is rather easy to accomplish, but i am a bit stumped where to start with doing conversion into bijective bases, i was thinking counting up the base multiples upto the number to convert, and bone it out from there saving the differences. But i just can't recall howto do it. > > > > > > > > > > > > > > Is there an easy obvious way todo this? > > > > > > > > > > > > > > I slightly remember there is something about using pairs, but that may have been for ordinary base conversion. > > > > > > > > > > > > > > Who have the fastest head doing the conversion. > > > > > > > > > > > > Not certain if I follow your question completely, so I'm going to give an answer I hope is in the ball park and hope you can correct me where we disconnect: > > > > > > > > > > > > An integer "i" in base "n" can be represented in the form "i = (k,l)" where > > > > > > "k = (i - (i mod n)) / n" > > > > > > and > > > > > > "l = i mod n" > > > > > > > > > > > > For example: > > > > > > > > > > > > 253 = ([253 - (253 mod 16)]/16, 253 mod 16) > > > > > > = (15, 13) > > > > > > > > > > > > Converting the pair back into its original form is simply the base expansion > > > > > > of the pair: i = k*n + l > > Ok base 16 but lets 10=A,B...,C...,D...,E...,F,*G*=16 so 253=F13 > > Well using base 16 if we would use your suggeste method to convert 240 it would end up be F0? > > > > But I want a zeroless encoding (bijective?) EG=(14*16)+(16*1) Sorry F13=FD
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2014-06-17 13:54 -0700 |
| Message-ID | <56a7f5f9-25d0-4d19-a545-939eedfdb424@googlegroups.com> |
| In reply to | #24897 |
On Tuesday, June 17, 2014 3:23:15 PM UTC-5, jonas.t...@gmail.com wrote: > Ok base 16 but lets 10=A,B...,C...,D...,E...,F,*G*=16 so 253=F13 > > Well using base 16 if we would use your suggeste method to convert 240 it would end up be F0? > > But I want a zeroless encoding (bijective?) EG=(14*16)+(16*1) If you're using juxtaposition to represent the tuple (which is ambiguous), then yes, 240 as a base 16 encoding would be F0. You seem to be using the term "bijective" in a strange way. The above encoding I presented _is_ bijective. I don't understand your requirement of a "zeroless encoding" Another approach is to convert the integer into prime factors, but it will be quite slow: 864 = (2^5)*(3^3) Also, there do exist positional number systems that don't use "0", but honestly I think I want to know the context of your requirement better
[toc] | [prev] | [next] | [standalone]
| From | jonas.thornvall@gmail.com |
|---|---|
| Date | 2014-06-17 14:07 -0700 |
| Message-ID | <9b0b48bb-020b-4b5d-bd1e-2033a0891d61@googlegroups.com> |
| In reply to | #24899 |
Den tisdagen den 17:e juni 2014 kl. 22:54:02 UTC+2 skrev Michael Haufe (TNO): > On Tuesday, June 17, 2014 3:23:15 PM UTC-5, jonas.t...@gmail.com wrote: > > > > > Ok base 16 but lets 10=A,B...,C...,D...,E...,F,*G*=16 so 253=F13 > > > > > > Well using base 16 if we would use your suggeste method to convert 240 it would end up be F0? > > > > > > But I want a zeroless encoding (bijective?) EG=(14*16)+(16*1) > > > > If you're using juxtaposition to represent the tuple (which is ambiguous), then > > yes, 240 as a base 16 encoding would be F0. > > > > You seem to be using the term "bijective" in a strange way. The above encoding I > > presented _is_ bijective. > > > > I don't understand your requirement of a "zeroless encoding" > > > > Another approach is to convert the integer into prime factors, but it will be > > quite slow: > > > > 864 = (2^5)*(3^3) > > > > Also, there do exist positional number systems that don't use "0", but > > honestly I think I want to know the context of your requirement better I am not sure what to say about it is an zeroles encoding scheme for the natural numbers. Problem is i do not remember howto approach the problem i Think it must be pairwise from lowest to highest. BASE 10 1=1 10=A 20=1A =10+10 30=2A =20+10 30=3A =30+10 100=9A =90+10 101=A1 =100+1 200=19A =100+90+10 201=1A1 =100+100+1 1000=99A =900+90+10 2000=199A =1000+900+90+10 2001=19A1 =1000+900+100+1 2010=19AA =1000+900+100+10 2014=1A14 =1000+1000+14 And here you have ternary using same principle BASE3 Deroless Ordinary 1 =1 1 01 2 =2 2 02 3 =3 3 10 4 =11 3+1 11 5 =12 3+2 12 6 =13 3+3 20 7 =21 6+1 21 8 =22 6+2 22 9 =23 6+3 100 10=31 9+1 101 11=32 9+2 102 12=33 9+3 110 13=111 9+3+1 111 14=112 9+3+2 112 15=113 9+3+3 120 16=121 9+6+1 121 17=122 9+6+2 122 18=123 9+6+3 200 19=131 9+9+1 201 20=132 9+9+2 202 21=133 9+9+3 210 22=211 18+3+1 23=212 18+3+2 24=213 18+3+3 25=221 18+6+1 26=222 18+6+2 27=223 18+6+3
[toc] | [prev] | [next] | [standalone]
| From | jonas.thornvall@gmail.com |
|---|---|
| Date | 2014-06-17 14:15 -0700 |
| Message-ID | <b030f677-0c59-46a7-b3ef-a9ddefde8fe8@googlegroups.com> |
| In reply to | #24900 |
Den tisdagen den 17:e juni 2014 kl. 23:07:33 UTC+2 skrev jonas.t...@gmail.com: > Den tisdagen den 17:e juni 2014 kl. 22:54:02 UTC+2 skrev Michael Haufe (TNO): > > > On Tuesday, June 17, 2014 3:23:15 PM UTC-5, jonas.t...@gmail.com wrote: > > > > > > > > > > > > > Ok base 16 but lets 10=A,B...,C...,D...,E...,F,*G*=16 so 253=F13 > > > > > > > > > > > > > > Well using base 16 if we would use your suggeste method to convert 240 it would end up be F0? > > > > > > > > > > > > > > But I want a zeroless encoding (bijective?) EG=(14*16)+(16*1) > > > > > > > > > > > > If you're using juxtaposition to represent the tuple (which is ambiguous), then > > > > > > yes, 240 as a base 16 encoding would be F0. > > > > > > > > > > > > You seem to be using the term "bijective" in a strange way. The above encoding I > > > > > > presented _is_ bijective. > > > > > > > > > > > > I don't understand your requirement of a "zeroless encoding" > > > > > > > > > > > > Another approach is to convert the integer into prime factors, but it will be > > > > > > quite slow: > > > > > > > > > > > > 864 = (2^5)*(3^3) > > > > > > > > > > > > Also, there do exist positional number systems that don't use "0", but > > > > > > honestly I think I want to know the context of your requirement better > > > > I am not sure what to say about it is an zeroles encoding scheme for the natural numbers. Problem is i do not remember howto approach the problem i Think it must be pairwise from lowest to highest. > > > > > > BASE 10 > > 1=1 > > 10=A > > 20=1A =10+10 > > 30=2A =20+10 > > 30=3A =30+10 > > 100=9A =90+10 > > 101=A1 =100+1 > > 200=19A =100+90+10 > > 201=1A1 =100+100+1 > > 1000=99A =900+90+10 > > 2000=199A =1000+900+90+10 > > 2001=19A1 =1000+900+100+1 > > 2010=19AA =1000+900+100+10 > > 2014=1A14 =1000+1000+14 > > > > And here you have ternary using same principle > > > > BASE3 > > Deroless Ordinary > > 1 =1 1 01 > > 2 =2 2 02 > > 3 =3 3 10 > > 4 =11 3+1 11 > > 5 =12 3+2 12 > > 6 =13 3+3 20 > > 7 =21 6+1 21 > > 8 =22 6+2 22 > > 9 =23 6+3 100 > > 10=31 9+1 101 > > 11=32 9+2 102 > > 12=33 9+3 110 > > 13=111 9+3+1 111 > > 14=112 9+3+2 112 > > 15=113 9+3+3 120 > > 16=121 9+6+1 121 > > 17=122 9+6+2 122 > > 18=123 9+6+3 200 > > 19=131 9+9+1 201 > > 20=132 9+9+2 202 > > 21=133 9+9+3 210 > > 22=211 18+3+1 > > 23=212 18+3+2 > > 24=213 18+3+3 > > 25=221 18+6+1 > > 26=222 18+6+2 > > 27=223 18+6+3 Using zeroless base there is no infinity all numbers are recursively constructable?
[toc] | [prev] | [next] | [standalone]
| From | John Harris <niam@jghnorth.org.uk.invalid> |
|---|---|
| Date | 2014-06-23 17:23 +0100 |
| Message-ID | <v2lgq91rvanhd6t1vplkkvk3bf8fp81enc@4ax.com> |
| In reply to | #24901 |
On Tue, 17 Jun 2014 14:15:01 -0700 (PDT), jonas.thornvall@gmail.com wrote: <snip> >Using zeroless base there is no infinity all numbers are recursively constructable? Natural Numbers are recursively constructable by definition; Real Numbers are not. In neither is infinity a number. John
[toc] | [prev] | [next] | [standalone]
| From | jonas.thornvall@gmail.com |
|---|---|
| Date | 2014-06-17 14:23 -0700 |
| Message-ID | <8a732973-4e4f-41e0-b1bd-98311ee3859a@googlegroups.com> |
| In reply to | #24899 |
Den tisdagen den 17:e juni 2014 kl. 22:54:02 UTC+2 skrev Michael Haufe (TNO): > On Tuesday, June 17, 2014 3:23:15 PM UTC-5, jonas.t...@gmail.com wrote: > > > > > Ok base 16 but lets 10=A,B...,C...,D...,E...,F,*G*=16 so 253=F13 > > > > > > Well using base 16 if we would use your suggeste method to convert 240 it would end up be F0? > > > > > > But I want a zeroless encoding (bijective?) EG=(14*16)+(16*1) > > > > If you're using juxtaposition to represent the tuple (which is ambiguous), then > > yes, 240 as a base 16 encoding would be F0. > > > > You seem to be using the term "bijective" in a strange way. The above encoding I > > presented _is_ bijective. > > > > I don't understand your requirement of a "zeroless encoding" > > > > Another approach is to convert the integer into prime factors, but it will be > > quite slow: > > > > 864 = (2^5)*(3^3) > > > > Also, there do exist positional number systems that don't use "0", but > > honestly I think I want to know the context of your requirement better Wiki do call it bijective base-10 system http://en.wikipedia.org/wiki/Bijective_numeration They say it was used in greek by Plato and they guys.
[toc] | [prev] | [next] | [standalone]
| From | jonas.thornvall@gmail.com |
|---|---|
| Date | 2014-06-17 14:41 -0700 |
| Message-ID | <f3dd2e6b-b193-4990-8f5f-191f8609c4bd@googlegroups.com> |
| In reply to | #24899 |
Den tisdagen den 17:e juni 2014 kl. 22:54:02 UTC+2 skrev Michael Haufe (TNO): > On Tuesday, June 17, 2014 3:23:15 PM UTC-5, jonas.t...@gmail.com wrote: > > > > > Ok base 16 but lets 10=A,B...,C...,D...,E...,F,*G*=16 so 253=F13 > > > > > > Well using base 16 if we would use your suggeste method to convert 240 it would end up be F0? > > > > > > But I want a zeroless encoding (bijective?) EG=(14*16)+(16*1) > > > > If you're using juxtaposition to represent the tuple (which is ambiguous), then > > yes, 240 as a base 16 encoding would be F0. > > > > You seem to be using the term "bijective" in a strange way. The above encoding I > > presented _is_ bijective. > > > > I don't understand your requirement of a "zeroless encoding" > > > > Another approach is to convert the integer into prime factors, but it will be > > quite slow: > > > > 864 = (2^5)*(3^3) > > > > Also, there do exist positional number systems that don't use "0", but > > honestly I think I want to know the context of your requirement better According to wiki it is a The bijective base-10 system, used by the old greeks Plato and they guys. http://en.wikipedia.org/wiki/Bijective_numeration
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2014-06-17 20:28 -0700 |
| Message-ID | <5bf41f47-caa2-405f-8c13-dc67498702f9@googlegroups.com> |
| In reply to | #24903 |
On Tuesday, June 17, 2014 4:41:47 PM UTC-5, jonas.t...@gmail.com wrote: > According to wiki it is a The bijective base-10 system, used by the old greeks Plato and they guys. > > http://en.wikipedia.org/wiki/Bijective_numeration Ah, I vaguely recall this from a planetmath.org article from a few years ago. A cursory Google search yielded the following which could be a decent starting point to create a JavaScript implementation: http://math.stackexchange.com/questions/172808/finding-a-bijective-function-from-integer-to-words
[toc] | [prev] | [next] | [standalone]
| From | jonas.thornvall@gmail.com |
|---|---|
| Date | 2014-06-18 13:04 -0700 |
| Message-ID | <89156a84-6fa7-4b79-9a4c-f53686792543@googlegroups.com> |
| In reply to | #24906 |
Den onsdagen den 18:e juni 2014 kl. 05:28:03 UTC+2 skrev Michael Haufe (TNO): > On Tuesday, June 17, 2014 4:41:47 PM UTC-5, jonas.t...@gmail.com wrote: > > > According to wiki it is a The bijective base-10 system, used by the old greeks Plato and they guys. > > > > > > http://en.wikipedia.org/wiki/Bijective_numeration > > > > Ah, I vaguely recall this from a planetmath.org article from a few years ago. > > > > A cursory Google search yielded the following which could be a decent starting point to create a JavaScript implementation: > > > > http://math.stackexchange.com/questions/172808/finding-a-bijective-function-from-integer-to-words The guys at rec.puzzles really clever. Here is what they had to say. Andrew B Isn't it just A8AA1A134; convert each (non-leading) 0 into an A and subtract one from the number to its left, iterating if necessary? Simple and elegant.
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2014-06-18 16:30 -0700 |
| Message-ID | <e9444b01-8627-462c-94bd-1190f99d9665@googlegroups.com> |
| In reply to | #24910 |
On Wednesday, June 18, 2014 3:04:08 PM UTC-5, jonas.t...@gmail.com wrote: > > The guys at rec.puzzles really clever. > Here is what they had to say. > > Andrew B > > Isn't it just A8AA1A134; convert each (non-leading) 0 into an A and subtract one from the number to its left, iterating if necessary? > > Simple and elegant. It makes an assumption about the base used which makes me skeptical of its applicability beyond this specific case.
[toc] | [prev] | [next] | [standalone]
| From | jonas.thornvall@gmail.com |
|---|---|
| Date | 2014-06-18 17:45 -0700 |
| Message-ID | <ad574b14-98d3-4ca2-93e5-757bdb7fe8cc@googlegroups.com> |
| In reply to | #24932 |
Den torsdagen den 19:e juni 2014 kl. 01:30:09 UTC+2 skrev Michael Haufe (TNO): > On Wednesday, June 18, 2014 3:04:08 PM UTC-5, jonas.t...@gmail.com wrote: > > > > > > The guys at rec.puzzles really clever. > > > Here is what they had to say. > > > > > > Andrew B > > > > > > Isn't it just A8AA1A134; convert each (non-leading) 0 into an A and subtract one from the number to its left, iterating if necessary? > > > > > > Simple and elegant. > > > > It makes an assumption about the base used which makes me skeptical of its applicability beyond this specific case. No it doesn't, i recall it to be the correct solution.
[toc] | [prev] | [next] | [standalone]
| From | jonas.thornvall@gmail.com |
|---|---|
| Date | 2014-06-18 17:49 -0700 |
| Message-ID | <80d440d6-9eba-49cd-ae80-c35480a56e83@googlegroups.com> |
| In reply to | #24937 |
Den torsdagen den 19:e juni 2014 kl. 02:45:21 UTC+2 skrev jonas.t...@gmail.com: > Den torsdagen den 19:e juni 2014 kl. 01:30:09 UTC+2 skrev Michael Haufe (TNO): > > > On Wednesday, June 18, 2014 3:04:08 PM UTC-5, jonas.t...@gmail.com wrote: > > > > > > > > > > > > > > The guys at rec.puzzles really clever. > > > > > > > Here is what they had to say. > > > > > > > > > > > > > > Andrew B > > > > > > > > > > > > > > Isn't it just A8AA1A134; convert each (non-leading) 0 into an A and subtract one from the number to its left, iterating if necessary? > > > > > > > > > > > > > > Simple and elegant. > > > > > > > > > > > > It makes an assumption about the base used which makes me skeptical of its applicability beyond this specific case. > > > > No it doesn't, i recall it to be the correct solution. The idea is sound in any base just have to take care of leading and reoccuring zeros, and this is simply done by look one step forward beyond each zero.
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2014-06-19 11:21 -0700 |
| Message-ID | <efb887c8-ee9c-4024-8b22-d951ba26056c@googlegroups.com> |
| In reply to | #24937 |
On Wednesday, June 18, 2014 7:45:21 PM UTC-5, jonas.t...@gmail.com wrote: > > No it doesn't, i recall it to be the correct solution. To what question? What base? 16? There is no '0' in this encoding, nor a substituted letter for it so the answer to unquoted question I'm assuming you asked doesn't seem to make sense. It's position based, so a hex encoding (contra your mapping above) would instead be: 0 - ε 1 - 1 2 - 2 3 - 3 4 - 4 5 - 5 6 - 6 7 - 7 8 - 8 9 - 9 10 - A 11 - B 12 - C 13 - D 14 - E 15 - F 16 - 11 //NOT 'G' ...
[toc] | [prev] | [next] | [standalone]
| From | jonas.thornvall@gmail.com |
|---|---|
| Date | 2014-06-19 14:44 -0700 |
| Message-ID | <c267c834-0f19-4dc0-a576-7a3ffecb0e46@googlegroups.com> |
| In reply to | #24945 |
Den torsdagen den 19:e juni 2014 kl. 20:21:42 UTC+2 skrev Michael Haufe (TNO): > On Wednesday, June 18, 2014 7:45:21 PM UTC-5, jonas.t...@gmail.com wrote: > > > > > > No it doesn't, i recall it to be the correct solution. > > > > To what question? What base? 16? There is no '0' in this encoding, nor a substituted letter for it so the answer to unquoted question I'm assuming you asked doesn't seem to make sense. It's position based, so a hex encoding (contra your mapping above) would instead be: > > > > 0 - ε > > 1 - 1 > > 2 - 2 > > 3 - 3 > > 4 - 4 > > 5 - 5 > > 6 - 6 > > 7 - 7 > > 8 - 8 > > 9 - 9 > > 10 - A > > 11 - B > > 12 - C > > 13 - D > > 14 - E > > 15 - F > > 16 - 11 //NOT 'G' > > ... No using the encoding scheme on HEX would give G your 21 is Another encoding scheme.
[toc] | [prev] | [next] | [standalone]
| From | jonas.thornvall@gmail.com |
|---|---|
| Date | 2014-06-19 14:48 -0700 |
| Message-ID | <f635c1a2-508b-4eb6-aeae-07729bf76a5f@googlegroups.com> |
| In reply to | #24946 |
Den torsdagen den 19:e juni 2014 kl. 23:44:43 UTC+2 skrev jonas.t...@gmail.com: > Den torsdagen den 19:e juni 2014 kl. 20:21:42 UTC+2 skrev Michael Haufe (TNO): > > > On Wednesday, June 18, 2014 7:45:21 PM UTC-5, jonas.t...@gmail.com wrote: > > > > > > > > > > > > > > No it doesn't, i recall it to be the correct solution. > > > > > > > > > > > > To what question? What base? 16? There is no '0' in this encoding, nor a substituted letter for it so the answer to unquoted question I'm assuming you asked doesn't seem to make sense. It's position based, so a hex encoding (contra your mapping above) would instead be: > > > > > > > > > > > > 0 - ε > > > > > > 1 - 1 > > > > > > 2 - 2 > > > > > > 3 - 3 > > > > > > 4 - 4 > > > > > > 5 - 5 > > > > > > 6 - 6 > > > > > > 7 - 7 > > > > > > 8 - 8 > > > > > > 9 - 9 > > > > > > 10 - A > > > > > > 11 - B > > > > > > 12 - C > > > > > > 13 - D > > > > > > 14 - E > > > > > > 15 - F > > > > > > 16 - 11 //NOT 'G' > > > > > > ... > > > > No using the encoding scheme on HEX would give G your 21 is Another encoding scheme. Sorry yout 11 isn't same encoding scheme i Think you try coding base 15.
[toc] | [prev] | [next] | [standalone]
| From | jonas.thornvall@gmail.com |
|---|---|
| Date | 2014-06-19 14:55 -0700 |
| Message-ID | <37079c88-aac9-4633-bfbc-dbabf328109b@googlegroups.com> |
| In reply to | #24945 |
Den torsdagen den 19:e juni 2014 kl. 20:21:42 UTC+2 skrev Michael Haufe (TNO): > On Wednesday, June 18, 2014 7:45:21 PM UTC-5, jonas.t...@gmail.com wrote: > > > > > > No it doesn't, i recall it to be the correct solution. > > > > To what question? What base? 16? There is no '0' in this encoding, nor a substituted letter for it so the answer to unquoted question I'm assuming you asked doesn't seem to make sense. It's position based, so a hex encoding (contra your mapping above) would instead be: > > > > 0 - ε > > 1 - 1 > > 2 - 2 > > 3 - 3 > > 4 - 4 > > 5 - 5 > > 6 - 6 > > 7 - 7 > > 8 - 8 > > 9 - 9 > > 10 - A > > 11 - B > > 12 - C > > 13 - D > > 14 - E > > 15 - F > > 16 - 11 //NOT 'G' > > ... You do realise the numerals for a base should ideally be unique. But it works as well giving commaseparated Powers for the positions. And your bijective/zeroless HEX encoding only have 15 unique numerals.
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2014-06-19 19:59 -0700 |
| Message-ID | <72f14f01-bb4a-43ca-bf53-766527f95307@googlegroups.com> |
| In reply to | #24948 |
On Thursday, June 19, 2014 4:55:20 PM UTC-5, jonas.t...@gmail.com wrote: > And your bijective/zeroless HEX encoding only have 15 unique numerals. You're correct. The alphabet for base k should be of magnitude k
[toc] | [prev] | [next] | [standalone]
Page 1 of 3 [1] 2 3 Next page →
Back to top | Article view | comp.lang.javascript
csiph-web