Re: Can Mathematica construct a set of equations?
- To: mathgroup at smc.vnet.net
- Subject: [mg119355] Re: Can Mathematica construct a set of equations?
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Tue, 31 May 2011 07:49:43 -0400 (EDT)
Constraints. Not equations.
Clear[p, x, y]
p[i_] := {x@i, y@i}
n = 5;
And @@ Flatten@
Table[Norm[p[i] - p[j]] <= d, {i, 1, n - 1}, {j, i + 1, n}]
Bobby
On Mon, 30 May 2011 05:35:29 -0500, Ralph Dratman
<ralph.dratman at gmail.com> wrote:
> Given a set of N points Pn in the real plane, all within a distance d
> of each other,
>
> In vector notation,
>
> || Pj - Pk || <= d, 1 <= j,k <= N
>
> or written out, say for N=3,
>
> || P1 - P2 || <= d,
> || P2 - P3 || <= d,
> || P3 - P1 || <= d.
>
> That is fine for 3 points, but suppose I have 10. Then the long
> version is Choose[10,2] = 45 equations, and I don't particularly want
> to write them out by hand. Can Mathematica do that for me, and give me
> the equations in a notebook?
>
> I'm not even sure how to represent the position vectors so I can refer
> to xj or yk later on. How do I set up vector-sub-j and its components
> x-sub-j and y-sub-j ? Would that be a list of N lists of length 2?
> Or is there a more specific vector notation?
>
> Sorry to be so clueless. Thank you.
>
> Ralph
>
--
DrMajorBob at yahoo.com