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


Groups > comp.programming > #2550 > unrolled thread

Corecursion In Computer Programming

Started byBrian <briansipler@yahoo.com>
First post2012-11-30 08:46 -0800
Last post2012-12-04 16:37 +0100
Articles 7 — 5 participants

Back to article view | Back to comp.programming


Contents

  Corecursion In Computer Programming Brian <briansipler@yahoo.com> - 2012-11-30 08:46 -0800
    Re: Corecursion In Computer Programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-12-01 15:39 +0000
      Re: Corecursion In Computer Programming Brian <briansipler@yahoo.com> - 2012-12-01 09:34 -0800
        Re: Corecursion In Computer Programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-12-01 19:35 +0000
        Re: Corecursion In Computer Programming "Charles Richmond" <numerist@aquaporin4.com> - 2012-12-03 07:22 -0600
        Re: Corecursion In Computer Programming malcolm.mclean5@btinternet.com - 2012-12-04 06:13 -0800
    Re: Corecursion In Computer Programming Jongware <jongware@no-spam.plz> - 2012-12-04 16:37 +0100

#2550 — Corecursion In Computer Programming

FromBrian <briansipler@yahoo.com>
Date2012-11-30 08:46 -0800
SubjectCorecursion In Computer Programming
Message-ID<ee6456d4-f755-4a1c-a614-d376eb6d67dc@r3g2000vbn.googlegroups.com>
Hi, I was reading an article on the Internet about corecursion in
computer programming, and the article says that corecursion can be
used in computer programming to define a list of possible sentences.
I also read that you don;t have to define every sentence that you want
when you use corecursion.  How do you define the list of sentences
that you want with corecursion, without defining every single
sentence?

Brian

[toc] | [next] | [standalone]


#2555

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2012-12-01 15:39 +0000
Message-ID<0.36f7ff3d9857b1fd40d7.20121201153905GMT.874nk53hpi.fsf@bsb.me.uk>
In reply to#2550
Brian <briansipler@yahoo.com> writes:

> Hi, I was reading an article on the Internet about corecursion in
> computer programming, and the article says that corecursion can be
> used in computer programming to define a list of possible sentences.
> I also read that you don;t have to define every sentence that you want
> when you use corecursion.  How do you define the list of sentences
> that you want with corecursion, without defining every single
> sentence?

This sounds wrong.  Maybe there is a problem with the terms: define
vs. generate?  If you linked to sources the puzzled you might get more
answers, because at the moment it just sounds contradictory.

-- 
Ben.

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


#2556

FromBrian <briansipler@yahoo.com>
Date2012-12-01 09:34 -0800
Message-ID<39090359-75d6-423e-aaf3-dd251c40bdce@q5g2000vbp.googlegroups.com>
In reply to#2555
On Dec 1, 10:39 am, Ben Bacarisse <ben.use...@bsb.me.uk> wrote:
> Brian <briansip...@yahoo.com> writes:
> > Hi, I was reading an article on the Internet about corecursion in
> > computer programming, and the article says that corecursion can be
> > used in computer programming to define a list of possible sentences.
> > I also read that you don;t have to define every sentence that you want
> > when you use corecursion.  How do you define the list of sentences
> > that you want with corecursion, without defining every single
> > sentence?
>
> This sounds wrong.  Maybe there is a problem with the terms: define
> vs. generate?  If you linked to sources the puzzled you might get more
> answers, because at the moment it just sounds contradictory.
>
> --
> Ben.

Hi Ben, the article is on Wikipedia, and it's actually about
recursion, not corecursion.  The Wikipedia article on recursion in
computer science says that, with recursion, an infinite set of
possible sentences, designs, or other data can be defined, parsed, or
produced by a finite computer program.  How do you finitely define an
infinite set of possible sentences using recursion?

Brian

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


#2557

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2012-12-01 19:35 +0000
Message-ID<0.006efbe22dc8a65e86a2.20121201193504GMT.87y5hh1s7r.fsf@bsb.me.uk>
In reply to#2556
Brian <briansipler@yahoo.com> writes:
<snip>
> Hi Ben, the article is on Wikipedia, and it's actually about
> recursion, not corecursion.  The Wikipedia article on recursion in
> computer science says that, with recursion, an infinite set of
> possible sentences, designs, or other data can be defined, parsed, or
> produced by a finite computer program.  How do you finitely define an
> infinite set of possible sentences using recursion?

  S ::= a | a S

is a grammar that defines an infinite set of sentences.  The sole rule
in the grammar is recursive.

-- 
Ben.

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


#2579

From"Charles Richmond" <numerist@aquaporin4.com>
Date2012-12-03 07:22 -0600
Message-ID<k9i934$fet$1@dont-email.me>
In reply to#2556
"Brian" <briansipler@yahoo.com> wrote in message 
news:39090359-75d6-423e-aaf3-dd251c40bdce@q5g2000vbp.googlegroups.com...
On Dec 1, 10:39 am, Ben Bacarisse <ben.use...@bsb.me.uk> wrote:
>> Brian <briansip...@yahoo.com> writes:
>> > Hi, I was reading an article on the Internet about corecursion in
>> > computer programming, and the article says that corecursion can be
>> > used in computer programming to define a list of possible sentences.
>> > I also read that you don;t have to define every sentence that you want
>> > when you use corecursion. How do you define the list of sentences
>> > that you want with corecursion, without defining every single
>> > sentence?
>>
>> This sounds wrong. Maybe there is a problem with the terms: define
>> vs. generate? If you linked to sources the puzzled you might get more
>> answers, because at the moment it just sounds contradictory.
>>
>> --
>> Ben.
>
>Hi Ben, the article is on Wikipedia, and it's actually about
>recursion, not corecursion.  The Wikipedia article on recursion in
>computer science says that, with recursion, an infinite set of
>possible sentences, designs, or other data can be defined, parsed, or
>produced by a finite computer program.  How do you finitely define an
>infinite set of possible sentences using recursion?
>

You finitely define an infinite set of possible sentences using recursion... 
by designing a recursive-decent parser.

--

numerist at aquaporin4 dot com

Brian 

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


#2582

Frommalcolm.mclean5@btinternet.com
Date2012-12-04 06:13 -0800
Message-ID<f8387cb2-d6ac-492d-ba85-f0de59a5d8ab@googlegroups.com>
In reply to#2556
On Saturday, December 1, 2012 5:34:55 PM UTC, Brian wrote:
> On Dec 1, 10:39 am, Ben Bacarisse <ben.use...@bsb.me.uk> wrote:
> 
> How do you finitely define an infinite set of possible sentences using 
> recursion?
> 
You can make any sentence longer by putting "Fred said" in front of it. 
But that includes sentence starting with "Fred said" eg Fred said "Fred 
said 'Let's go to the pictures'".
So you can generate an infinite number of sentences from that rule.
Whilst this example is a bit silly, make it a little bit more complicated
and it's not silly at all. We can have any noun or noun clause instead of
"Fred". A noun clause can be a an noun clause, "and" and another noun 
clause, "Jones the steamtrain driver and Fred said, "Bert said let's go
to the pictures"".

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


#2583

FromJongware <jongware@no-spam.plz>
Date2012-12-04 16:37 +0100
Message-ID<50be189e$0$6885$e4fe514c@news2.news.xs4all.nl>
In reply to#2550
On 30-Nov-12 17:46 PM, Brian wrote:
> Hi, I was reading an article on the Internet about corecursion in
> computer programming, and the article says that corecursion can be
> used in computer programming to define a list of possible sentences.
> I also read that you don;t have to define every sentence that you want
> when you use corecursion.  How do you define the list of sentences
> that you want with corecursion, without defining every single
> sentence?

As the other posters said, by allowing the original state to take part 
in the new state.

How does one define "any positive integer number" without listing all of 
them?

posInt ::= 1 | posInt+1

Even though this is obviously true (every positive integer is either '1' 
or '1 plus another positive integer), your computer cannot prove it 
through testing for all possible values.

[Jw]

[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming


csiph-web