From: Neo
Subject: General Form of Relationships?
Date: 
Message-ID: <4b45d3ad.0212281437.3102c5f9@posting.google.com>
What is the general form of relationships? Is it 
1) "t1 relator t2" or
2) "relator, t1, t2, ..."

Can form 2 relationships always be broken down to multiple form 1's?
Or are some relationships such that they cannot be broken down 
and thus form 2 is the more general.

For example, either form works for "John like Mary"
1) "John like Mary"
2) "like, John, Mary"

Next "John give Mary a ball" readily fits form 2
"give, John, Mary, ball"

But can it be broken down into multiple form 1's
"John give ball1"
"Mary receive ball2"
"ball1 isSameAs ball2"

From: Kaz Kylheku
Subject: Re: General Form of Relationships?
Date: 
Message-ID: <cf333042.0212290943.47b6f5c6@posting.google.com>
········@hotmail.com (Neo) wrote in message news:<····························@posting.google.com>...
> What is the general form of relationships? Is it 
> 1) "t1 relator t2" or
> 2) "relator, t1, t2, ..."
> 
> Can form 2 relationships always be broken down to multiple form 1's?
> Or are some relationships such that they cannot be broken down 
> and thus form 2 is the more general.

You need to get a few clues.

Firstly, your examples are merely different in syntax: infix versus
prefix. The actual relationship denoted by the syntax is a matter of
semantics. It's possible to define a grammar together with semantic
rules to interpret the syntax however you want. If you want deeper
answers, you should turn to the study of programming languages. There
is a newsgroup called comp.compilers which could be interesting.

Secondly, you need to learn to suppress the urge to initiate massively
crossposted discussions.

> For example, either form works for "John like Mary"
> 1) "John like Mary"
> 2) "like, John, Mary"
> 
> Next "John give Mary a ball" readily fits form 2
> "give, John, Mary, ball"
> 
> But can it be broken down into multiple form 1's
> "John give ball1"
> "Mary receive ball2"
> "ball1 isSameAs ball2"

Not in general; the combined action of moving the object from one
person to another cannot be factored into two independent actions.
Suppose that in the same transaction, Mary compensates John for the
ball with a kiss. That compensation can be hidden entirely in the
semantics of ``give john mary ball''.

In computing languages, it's highly beneficial to have the simplicity
of synthesized attributes. Synthesized attributes are semantics of an
expression that are computed from its constituents only, not from any
parents or siblings in the parse tree. Synthesized attributes can be
computed in a straight bottom-up manner, starting at the leaves of the
tree and working upward. Thus if you have the expression 'a * b * c',
it means (a * b) * c, and the value is a synthesized attribute: first
a and b are multiplied, to produce a value, and then that is
multiplied by c. Both multiplications are independent, except that the
output of one is an input to the other.

A prefix notation lets an operator be a function of any number of
parameters, yet the simplicity of bottom-up evaluation is preserved.
This is how it is in the language Lisp, whose newsgroup comp.lang.lisp
you crossposted into. The * function of Lisp can take a large number
of parameters, and it can take zero parameters as well.

You could write a translator such that the notation 'a * b * c * d
...' has the same meaning as (* a b c d) --- in other words, a single
invocation of the operator with multiple arguments. But that
translator could no longer treat evaluation as a simple synthesized
attribute! It would have to recognize patterns spanning portions of
the syntax tree, and reduce them.

In Lisp we could do this by writing an infix parser, and then by
defining * symbol as a macro. The infix parser would take a * b * c *
d and produce the nested list (* a (* b (* c d))). Then the macro *
would take over, and analyze its arguments. Seeing that everything is
multiplicative, it would produce the expression (* a b c d). So you
see, it's possible to achieve whatever evaluation rules you want, if
you are willing to do whole-tree analysis and transformation. But it's
a heck of a lot less work to just parse and evaluate (* a b c d) in
the first place, not to mention notationally clearer.

Returning to the John and Mary example, you could have functions YIELD
and TAKE, such that you could write:

   (take mary (yield john ball))

Everything is nicely evaluated bottom up. First (yield john ball)
liberates the ball object from john, and then that is passed to the
take function together with the mary object, causing that object to
accept the ball.

What if you wanted to keep that syntax, but add a complex two-way
interaction between john and mary? Well, you can no longer do simple
bottom-up evaluation. In the Lisp language, we could write TAKE as a
macro. That macro could analyze the parameter expressions, to
recognize the pattern:

   (take X (yield Y Z))

and translate the whole thing to the form:

   (take-yield X Y Z)

the TAKE-YIELD function would encapsulate the passing of Z from Y to
X, as well as X kissing Y. So in other words, mary's posession of the
ball is a synthesized attribute, and the kiss going to john is an
inherited attribute.
From: Neo
Subject: Re: General Form of Relationships?
Date: 
Message-ID: <4b45d3ad.0212311420.634468b9@posting.google.com>
The question was related to designing a system that can store and
process data using a consistent syntax so that it emmulates a human's
flexiblity in learning and processing.

My initial example of 'John giving Mary a ball' was more complicated
that I realized because it involves different states over a period of
time. I should have stated a simpler example where things are in a
static state. The question should have been can all static states be
described by one or more combination of binary relationships or are
there some types of relationship that cannot be reduced to compound
binary relationships (regardless of syntax: infix, prefix). For
example

"ball isNextTo box" could be generalized as:
Relator t1, t2

"ball isBetween box and chair" could be generalized into:
R t1, t2, t3 

But can ternary and higher relationships always be broken down into
binary relationships, ie:
R2 (R1 t1, t2), t3

But then I thought of "-5" or "not Red", in these cases, the general
form is:
R t1

Would it be correct to conclude, the general syntax is:
R t1, ....  
where R could be a relator, predicate, operator, function, etc.
and t1 is a thing, element, term, input, data, etc.

In searching the web I found out this concept is already described by
lambda calculus.

Would you consider a DNA to be the ultimate LISP program / lambda
expression?
From: Dave Rusin
Subject: Re: General Form of Relationships?
Date: 
Message-ID: <auobrg$jcl$1@news.math.niu.edu>
In article <····························@posting.google.com>,
Neo <········@hotmail.com> wrote:
>What is the general form of relationships? Is it 
>1) "t1 relator t2" or
>2) "relator, t1, t2, ..."

The most general way to view a "relationship" among a set of  n  variables 
is as an arbitrary subset of  n-space. (In your examples, the variables
may come from other sets S_1, ..., S_n  instead of the real number line,
in which case a "relationship" is a subset of the cartesian product
S_1 x S_2 x ... x S_n .) For example, the relationship "<" can be described
by handing someone the set of all pairs (x,y) with  x<y ; this is an 
open half-plane.

>Can form 2 relationships always be broken down to multiple form 1's?
>Or are some relationships such that they cannot be broken down 
>and thus form 2 is the more general.

You'll have to describe what "broken down to" means. In some sense every
relationship can be described using "and", "or", and relationships of
one variable, that is, every subset can be described using unions, 
intersections, and projections to a single coordinate: Write the set as
a union of points specified by each of their coordinates. Of course
this may require an infinite number of "or"s (unions of singletons).

Mathematically the question gets more interesting if you restrict to
relations which are graphs of continuous functions: Hilbert's 13th problem
asked whether continuous functions of several variables can always be
reduced to functions of one variable, using addition and composition.
(There is an affirmative answer; see e.g. http://www.math-atlas.org/98/hilb_13)
I don't know if there is a good extension to relations other than 
(graphs of) functions.

Follow-ups set to sci.math.

dave
From: Neo
Subject: Re: General Form of Relationships?
Date: 
Message-ID: <4b45d3ad.0212311515.7e449bec@posting.google.com>
> The most general way to view a "relationship" among a set of  n  variables 
> is as an arbitrary subset of  n-space. (In your examples, the variables
> may come from other sets S_1, ..., S_n  instead of the real number line,
> in which case a "relationship" is a subset of the cartesian product
> S_1 x S_2 x ... x S_n .)

I didn't state my question clearly but your post triggers an idea.
Suppose the x-axis represents a set of balls and the y-axis a set of
colors, then a dot at x,y would indicate "ball2 is Red". How to extend
this system to represent "ball between box and chair"? Could I suppose
3-axes where each represents the set of all things in a room. Then a
dot a x,y,z would indicate what thing is between two other things?
From: George Cox
Subject: Re: General Form of Relationships?
Date: 
Message-ID: <3EF4D9AB.884A87DF@btinternet.com>
Neo wrote:
> 
> > The most general way to view a "relationship" among a set of  n  variables
> > is as an arbitrary subset of  n-space. (In your examples, the variables
> > may come from other sets S_1, ..., S_n  instead of the real number line,
> > in which case a "relationship" is a subset of the cartesian product
> > S_1 x S_2 x ... x S_n .)
> 
> I didn't state my question clearly but your post triggers an idea.
> Suppose the x-axis represents a set of balls and the y-axis a set of
> colors, then a dot at x,y would indicate "ball2 is Red". How to extend
> this system to represent "ball between box and chair"? Could I suppose
> 3-axes where each represents the set of all things in a room. Then a
> dot a x,y,z would indicate what thing is between two other things?



Since David hasn't answered: yes, but.

R(a,b,c...) iff the point (a,b,c,...) lies in a certain subset of  A x B
x C x... .  You can view that subset as being the relation (one does in
set theory.)  The 'but' is that you won't want A, B, C,... just to be
real numbers which might be what your use of 'x-axis' implies.  (Btw, I
didn't use 'x' as a variable because I wanted to use it for Cartesian
product.)

GC