Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

cantor of couple

18 views
Skip to first unread message

ZarkXe

unread,
Oct 16, 2012, 2:00:01 PM10/16/12
to
Hi all,

Someone known Cantor of couple defined by :

<x, y> = (((( x + y ) ( x +y +1)) / 2) + y + 1)

Thanks,

ZarkXe

William Elliot

unread,
Oct 19, 2012, 4:46:53 AM10/19/12
to
On Tue, 16 Oct 2012, ZarkXe wrote:

> Someone known Cantor of couple defined by :
>
What's a Cantor of couple.

> <x, y> = (((( x + y ) ( x +y +1)) / 2) + y + 1)
>
IIRC, that's a bijection between N and N^2.

ZarkXe

unread,
Oct 19, 2012, 1:56:56 PM10/19/12
to
Thanks Willam,

I search a equation for find couple <x, y> what i have a number.

For exemple :

<x, y> = 31.

What value x and y ?

I find a naive algorithm but it's not optimal. I

Wasell

unread,
Oct 20, 2012, 10:21:08 AM10/20/12
to
On Fri, 19 Oct 2012 19:56:56 +0200, in article <k5s47c$oih$1
@speranza.aioe.org>, ZarkXe wrote:
>
> Thanks Willam,
>
> I search a equation for find couple <x, y> what i have a number.
>
> For exemple :
>
> <x, y> = 31.
>
> What value x and y ?
>
> I find a naive algorithm but it's not optimal. I

See <http://en.wikipedia.org/wiki/Pairing_function>.

HTH
/Wasell

ZarkXe

unread,
Oct 20, 2012, 1:14:06 PM10/20/12
to
It's super thanks Wasell.

Martin Michael Musatov

unread,
Dec 16, 2012, 4:44:35 PM12/16/12
to
x=composite
y=prime
26, 5
Musatov
0 new messages