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


Groups > comp.lang.java.programmer > #34317

Re: Mathematics, Java, good enough

Path csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Mathematics, Java, good enough
Date Tue, 17 May 2016 08:25:24 -0400
Organization A noiseless patient Spider
Lines 31
Message-ID <nhf2cv$5lk$1@dont-email.me> (permalink)
References <nhesp7$hn7$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Tue, 17 May 2016 12:21:51 -0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="2d081e2f7155c28005d4472f67c2f43d"; logging-data="5812"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18S143JU70vXWB7mm+PfbHl"
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0
In-Reply-To <nhesp7$hn7$1@dont-email.me>
Cancel-Lock sha1:6YX3Gzas7HAQk+GbWLbal2IIAhU=
Xref csiph.com comp.lang.java.programmer:34317

Show key headers only | View raw


On 5/17/2016 6:49 AM, Duncan Idaho wrote:
> Hello again
>
> I have a question that involves mathematics. I agree that it's off topic
> but as I am writing in Java
> I thought I'd give it a go (tenuous I know but it's the best I've got).
>
> I'm dredging up set theory from the furthest reaches of my memory. I'll
> probably get it wrong.
> Homework? If only, that would mean I could have the last 50 years again
> ... perhaps not. %-)
>
> Anyway
>
> I have a set of characters S of cardinality C
> example
> if S = {a..z, 0..9, A..Z} then C = er, um  ..,62.
>
> For any given result string X, X need not be a set.
>
> eg if L = 8 then
> "abcdefgh", "AAAAAAAA", "AABBCCDD" are all valid values for X
>
> how many strings of length L are possible from S

     There are Math.pow(C, L) strings of exactly L characters,
or (Math.pow(C, L+1) - 1) strings of "zero through L" characters.

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

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

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

csiph-web