Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #34313 > unrolled thread

Mathematics, Java, good enough

Started byDuncan Idaho <duncan@dunenoemail.com>
First post2016-05-17 11:49 +0100
Last post2016-05-17 17:49 -0400
Articles 4 on this page of 24 — 8 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Mathematics, Java, good enough Duncan Idaho <duncan@dunenoemail.com> - 2016-05-17 11:49 +0100
    Re: Mathematics, Java, good enough Eric Douglas <e.d.programmer@gmail.com> - 2016-05-17 04:55 -0700
    Re: Mathematics, Java, good enough Nigel Wade <nmw@ion.le.ac.uk> - 2016-05-17 12:56 +0100
      Re: Mathematics, Java, good enough Nigel Wade <nmw@ion.le.ac.uk> - 2016-05-17 13:06 +0100
      Re: Mathematics, Java, good enough Duncan Idaho <duncan@dunenoemail.com> - 2016-05-17 13:29 +0100
        Re: Mathematics, Java, good enough Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-17 09:54 -0400
          Re: Mathematics, Java, good enough FredK <fred.l.kleinschmidt@gmail.com> - 2016-05-17 07:17 -0700
            Re: Mathematics, Java, good enough FredK <fred.l.kleinschmidt@gmail.com> - 2016-05-17 07:29 -0700
              Re: Mathematics, Java, good enough Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-17 10:58 -0400
                Re: Mathematics, Java, good enough Duncan Idaho <duncan@dunenoemail.com> - 2016-05-17 18:10 +0100
                  Re: Mathematics, Java, good enough Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-17 14:02 -0400
                    Re: Mathematics, Java, good enough Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-17 14:10 -0400
                    Re: Mathematics, Java, good enough Eric Douglas <e.d.programmer@gmail.com> - 2016-05-17 11:36 -0700
                      Re: Mathematics, Java, good enough Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-17 16:12 -0400
                        Re: Mathematics, Java, good enough Eric Douglas <e.d.programmer@gmail.com> - 2016-05-17 13:56 -0700
                    Re: Mathematics, Java, good enough Gene Wirchenko <genew@telus.net> - 2016-05-17 14:13 -0700
                    Re: Mathematics, Java, good enough Duncan Idaho <duncan@dunenoemail.com> - 2016-05-18 05:06 +0100
    Re: Mathematics, Java, good enough Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-17 08:25 -0400
    Re: Mathematics, Java, good enough Martin Gregorie <martin@address-in-sig.invalid> - 2016-05-17 12:24 +0000
    Re: Mathematics, Java, good enough Duncan Idaho <duncan@dunenoemail.com> - 2016-05-17 18:15 +0100
      Re: Mathematics, Java, good enough Jerry Stuckle <jstucklex@attglobal.net> - 2016-05-17 13:33 -0400
      Re: Mathematics, Java, good enough Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-17 14:09 -0400
        Re: Mathematics, Java, good enough Gene Wirchenko <genew@telus.net> - 2016-05-17 14:17 -0700
          Re: Mathematics, Java, good enough Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-17 17:49 -0400

Page 2 of 2 — ← Prev page 1 [2]


#34327

FromJerry Stuckle <jstucklex@attglobal.net>
Date2016-05-17 13:33 -0400
Message-ID<nhfkds$90c$1@jstuckle.eternal-september.org>
In reply to#34326
On 5/17/2016 1:15 PM, Duncan Idaho wrote:
> On 17/05/16 15:43, Stefan Ram wrote:
>> Duncan Idaho <duncan@dunenoemail.com> writes:
>>> how many strings of length L are possible from
>> ...
>>> a set of characters S of cardinality C
>>
>>    If an alphabet has C members, there are C^L words of length
>>    L over it, because for every word position, there are C choices,
>>    and the choices of positions multiply as one can easily see.
>>
>>    For example, an octet of bit memory cells has java.lang.Math.pow
>>    ( 2, 8 ) possible states. A UHD screen with 24 bits of color can
>>    show java.math.BigInteger.valueOf( 2<<23 ).pow( 7680 * 4320 )
>>    different pictures.
> 
> hmm
> 
> That last one was too easy for you guys obviously :-)
> 
> So what if I said how many *sets* of cardinality C are there in a set S
> of cardinality SC
> 
> Example
> so where C = 8 then "ABCDEFGH" is good but "AABCDEFG" isn't
> 
> Idaho
> 
> 

Just as easy.  The number is 8! (8 factorial), or 40,320.

The first character can be any of 8 values. The second, any of the
remaining 7 values... etc.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#34330

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2016-05-17 14:09 -0400
Message-ID<nhfmi0$k4d$1@dont-email.me>
In reply to#34326
On 5/17/2016 1:15 PM, Duncan Idaho wrote:
> On 17/05/16 15:43, Stefan Ram wrote:
>> Duncan Idaho <duncan@dunenoemail.com> writes:
>>> how many strings of length L are possible from
>> ...
>>> a set of characters S of cardinality C
>>
>>    If an alphabet has C members, there are C^L words of length
>>    L over it, because for every word position, there are C choices,
>>    and the choices of positions multiply as one can easily see.
>>
>>    For example, an octet of bit memory cells has java.lang.Math.pow
>>    ( 2, 8 ) possible states. A UHD screen with 24 bits of color can
>>    show java.math.BigInteger.valueOf( 2<<23 ).pow( 7680 * 4320 )
>>    different pictures.
>
> hmm
>
> That last one was too easy for you guys obviously :-)
>
> So what if I said how many *sets* of cardinality C are there in a set S
> of cardinality SC
>
> Example
> so where C = 8 then "ABCDEFGH" is good but "AABCDEFG" isn't

     Your terminology isn't too clear; what does "in" mean?

     But *if* you mean "How many 8-character strings can I make from
a 62-character alphabet, with no repetitions?" that's an easy one:

	62 * 61 * 60 * 59 * 58 * 57 * 56 * 55

also known as

	62! / (62-8)! ~= 1.4E14

-- 
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM

[toc] | [prev] | [next] | [standalone]


#34337

FromGene Wirchenko <genew@telus.net>
Date2016-05-17 14:17 -0700
Message-ID<de2njbp07clfvncvpbspr7b7a0j6f1moj5@4ax.com>
In reply to#34330
On Tue, 17 May 2016 14:09:25 -0400, Eric Sosman
<esosman@comcast-dot-net.invalid> wrote:

>On 5/17/2016 1:15 PM, Duncan Idaho wrote:
>> On 17/05/16 15:43, Stefan Ram wrote:
>>> Duncan Idaho <duncan@dunenoemail.com> writes:
>>>> how many strings of length L are possible from
>>> ...
>>>> a set of characters S of cardinality C
>>>
>>>    If an alphabet has C members, there are C^L words of length
>>>    L over it, because for every word position, there are C choices,
>>>    and the choices of positions multiply as one can easily see.
>>>
>>>    For example, an octet of bit memory cells has java.lang.Math.pow
>>>    ( 2, 8 ) possible states. A UHD screen with 24 bits of color can
>>>    show java.math.BigInteger.valueOf( 2<<23 ).pow( 7680 * 4320 )
>>>    different pictures.
>>
>> hmm
>>
>> That last one was too easy for you guys obviously :-)
>>
>> So what if I said how many *sets* of cardinality C are there in a set S
>> of cardinality SC
>>
>> Example
>> so where C = 8 then "ABCDEFGH" is good but "AABCDEFG" isn't
>
>     Your terminology isn't too clear; what does "in" mean?
>
>     But *if* you mean "How many 8-character strings can I make from
>a 62-character alphabet, with no repetitions?" that's an easy one:
>
>	62 * 61 * 60 * 59 * 58 * 57 * 56 * 55
>
>also known as
>
>	62! / (62-8)! ~= 1.4E14

     Eric Sosman, DI did state "set" so order is not relevant so
divide your answer by 8!

     Duncan Idaho, if you are going to ask any more questions like
this, I suggest that 1) you post your work first and 2) make the
problems interesting.

Sincerely,

Gene Wirchenko

[toc] | [prev] | [next] | [standalone]


#34339

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2016-05-17 17:49 -0400
Message-ID<nhg3f5$6k2$1@dont-email.me>
In reply to#34337
On 5/17/2016 5:17 PM, Gene Wirchenko wrote:
> On Tue, 17 May 2016 14:09:25 -0400, Eric Sosman
> <esosman@comcast-dot-net.invalid> wrote:
>
>> On 5/17/2016 1:15 PM, Duncan Idaho wrote:
>>> On 17/05/16 15:43, Stefan Ram wrote:
>>>> Duncan Idaho <duncan@dunenoemail.com> writes:
>>>>> how many strings of length L are possible from
>>>> ...
>>>>> a set of characters S of cardinality C
>>>>
>>>>    If an alphabet has C members, there are C^L words of length
>>>>    L over it, because for every word position, there are C choices,
>>>>    and the choices of positions multiply as one can easily see.
>>>>
>>>>    For example, an octet of bit memory cells has java.lang.Math.pow
>>>>    ( 2, 8 ) possible states. A UHD screen with 24 bits of color can
>>>>    show java.math.BigInteger.valueOf( 2<<23 ).pow( 7680 * 4320 )
>>>>    different pictures.
>>>
>>> hmm
>>>
>>> That last one was too easy for you guys obviously :-)
>>>
>>> So what if I said how many *sets* of cardinality C are there in a set S
>>> of cardinality SC
>>>
>>> Example
>>> so where C = 8 then "ABCDEFGH" is good but "AABCDEFG" isn't
>>
>>     Your terminology isn't too clear; what does "in" mean?
>>
>>     But *if* you mean "How many 8-character strings can I make from
>> a 62-character alphabet, with no repetitions?" that's an easy one:
>>
>> 	62 * 61 * 60 * 59 * 58 * 57 * 56 * 55
>>
>> also known as
>>
>> 	62! / (62-8)! ~= 1.4E14
>
>      Eric Sosman, DI did state "set" so order is not relevant so
> divide your answer by 8!

     Well, I *did* say I found the question's terminology unclear.
I'll cite as supporting evidence the fact that the question got
*three* different answers!

-- 
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.java.programmer


csiph-web