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


Groups > comp.programming > #2672 > unrolled thread

Mathematical Formulas In Programming

Started byBrian <briansipler@yahoo.com>
First post2012-12-28 13:17 -0800
Last post2013-01-06 16:54 -0500
Articles 6 — 4 participants

Back to article view | Back to comp.programming


Contents

  Mathematical Formulas In Programming Brian <briansipler@yahoo.com> - 2012-12-28 13:17 -0800
    Re: Mathematical Formulas In Programming Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2012-12-29 11:58 +0200
      Re: Mathematical Formulas In Programming Brian <briansipler@yahoo.com> - 2012-12-29 04:54 -0800
    Re: Mathematical Formulas In Programming Rui Maciel <rui.maciel@gmail.com> - 2012-12-29 13:26 +0000
      Re: Mathematical Formulas In Programming Brian <briansipler@yahoo.com> - 2012-12-29 07:55 -0800
        Re: Mathematical Formulas In Programming Roberto Waltman <usenet@rwaltman.com> - 2013-01-06 16:54 -0500

#2672 — Mathematical Formulas In Programming

FromBrian <briansipler@yahoo.com>
Date2012-12-28 13:17 -0800
SubjectMathematical Formulas In Programming
Message-ID<c523eb2a-e6ab-42cd-bb63-2f2d94ffc0a3@pu9g2000pbc.googlegroups.com>
Hi, somebody told me that mathematical formulas can be used in
programming to represent a list of certain words that you want, but
that you have to tell the program to convert the formulas to the exact
list of words.  Is it even possible to do that?

Brian

[toc] | [next] | [standalone]


#2674

FromJussi Piitulainen <jpiitula@ling.helsinki.fi>
Date2012-12-29 11:58 +0200
Message-ID<qothan5goyf.fsf@ruuvi.it.helsinki.fi>
In reply to#2672
Brian writes:

> Hi, somebody told me that mathematical formulas can be used in
> programming to represent a list of certain words that you want, but
> that you have to tell the program to convert the formulas to the
> exact list of words.  Is it even possible to do that?

You should have asked that someone to explain what they meant. In
particular, what counts as a mathematical formula.

Why wouldn't ['three', 'little', 'mice'] appearing in a program source
code be a mathematical formula representing the list of the three
words 'three', 'little', and 'mice'? But accepting it as a formula
makes the question trivial.

Regular expressions can be, and are, used to specify certain
interesting sets of strings in programming, including large
vocabularies of human languages. Such expressions can also specify
processes like compounding that make the sets technically infinite, so
a finite representation cannot be a simple list. Regular expressions
come with a large number of useful mathematical operations if you
accept union, intersection, complement, and difference of sets,
concatenation and repetition of strings, and so on, as mathematical,
and they come with a practical implementation in terms of finite
automata. It's not trivial but it's done in practice.

Goedel coding could in principle be used to represent any finite list
of words as a number. This is not done in practical programming. I
suppose it belongs in something like mathematical logic as a technique
of proving what can or cannot in principle be done at all.

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


#2675

FromBrian <briansipler@yahoo.com>
Date2012-12-29 04:54 -0800
Message-ID<5bc05a48-9471-4e75-bdd0-e708d255749a@z2g2000vbx.googlegroups.com>
In reply to#2674
On Dec 29, 4:58 am, Jussi Piitulainen <jpiit...@ling.helsinki.fi>
wrote:
> Brian writes:
> > Hi, somebody told me that mathematical formulas can be used in
> > programming to represent a list of certain words that you want, but
> > that you have to tell the program to convert the formulas to the
> > exact list of words.  Is it even possible to do that?
>
> You should have asked that someone to explain what they meant. In
> particular, what counts as a mathematical formula.
>
> Why wouldn't ['three', 'little', 'mice'] appearing in a program source
> code be a mathematical formula representing the list of the three
> words 'three', 'little', and 'mice'? But accepting it as a formula
> makes the question trivial.
>
> Regular expressions can be, and are, used to specify certain
> interesting sets of strings in programming, including large
> vocabularies of human languages. Such expressions can also specify
> processes like compounding that make the sets technically infinite, so
> a finite representation cannot be a simple list. Regular expressions
> come with a large number of useful mathematical operations if you
> accept union, intersection, complement, and difference of sets,
> concatenation and repetition of strings, and so on, as mathematical,
> and they come with a practical implementation in terms of finite
> automata. It's not trivial but it's done in practice.
>
> Goedel coding could in principle be used to represent any finite list
> of words as a number. This is not done in practical programming. I
> suppose it belongs in something like mathematical logic as a technique
> of proving what can or cannot in principle be done at all.

Thank you for the information.

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


#2676

FromRui Maciel <rui.maciel@gmail.com>
Date2012-12-29 13:26 +0000
Message-ID<kbmr1q$rmb$1@dont-email.me>
In reply to#2672
Brian wrote:

> Hi, somebody told me that mathematical formulas can be used in
> programming to represent a list of certain words that you want, but
> that you have to tell the program to convert the formulas to the exact
> list of words.  Is it even possible to do that?

It appears that you are describing a parser.  Essentially, a parser is a 
program which recognizes a grammar, and if you input a list of symbols which 
are valid according to that grammar, the parser accepts them.  Otherwise, it 
throws an error.

The mathematical bit is relevant in a number of aspects, but mainly because 
a grammar tends to be defined as a set of all valid symbol combinations.  

With this approach, although a grammar can be defined through set theory 
notation, a number of special-purpose languages have been defined for this 
purpose, including Backus-Naur form.

http://en.wikipedia.org/wiki/Backus_Naur_Form

So, in short, yes it's possible.


Rui Maciel

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


#2678

FromBrian <briansipler@yahoo.com>
Date2012-12-29 07:55 -0800
Message-ID<578287e4-856e-4888-aec8-2bbb903e96bb@u16g2000vbn.googlegroups.com>
In reply to#2676
Thank you everybody for your help.  You have answered my question.

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


#2742

FromRoberto Waltman <usenet@rwaltman.com>
Date2013-01-06 16:54 -0500
Message-ID<2isje85hat9lg2vqqv5ofe10mj3c87go35@4ax.com>
In reply to#2678
Brian wrote:
>Thank you everybody for your help.  You have answered my question.

For more (much more!) information on the subject check these sites:

http://antlr.org/
http://dickgrune.com/Books/PTAPG_1st_Edition/
--
Roberto Waltman

[ Please reply to the group,
  return address is invalid ]

[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming


csiph-web