Path: news.mathworks.com!not-for-mail
From: "Andrzej Miekina" <a.miekina@ire.pw.edu.pl>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Fall 2012 MATLAB Contest: October 31 - November 7
Date: Mon, 5 Nov 2012 17:21:06 +0000 (UTC)
Organization: TU Warsaw
Lines: 37
Message-ID: <k78si2$c5j$1@newscl01ah.mathworks.com>
References: <k4v77h$im6$1@newscl01ah.mathworks.com> <k6ribc$5k7$1@newscl01ah.mathworks.com> <k6rqll$8o4$1@newscl01ah.mathworks.com> <k6s0f8$2o0$1@newscl01ah.mathworks.com> <k6sd64$guk$1@newscl01ah.mathworks.com> <k78ilf$qu$1@newscl01ah.mathworks.com> <k78m84$ft8$1@newscl01ah.mathworks.com>
Reply-To: "Andrzej Miekina" <a.miekina@ire.pw.edu.pl>
NNTP-Posting-Host: www-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1352136066 12467 172.30.248.47 (5 Nov 2012 17:21:06 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 5 Nov 2012 17:21:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11756
Xref: news.mathworks.com comp.soft-sys.matlab:782086

"David Hruska" <dhruska@mathworks.com> wrote in message <k78m84$ft8$1@newscl01ah.mathworks.com>...
> > Hi,
> > I think there is still something wrong with number of knots.
> > One of the rule is "A node sitting directly on a line counts as two 
> > knots."
> > For simple set of 4 points:
> > xy=[-1,0;1,0;0,1;0,0] and a=[0     1     0     0
> >     1     0     0     0
> >     0     0     0     1
> >     0     0     1     0];
> > number of knots should be 2, but numKnots returns 1
> > and for xy=[-2,0;2,0;-1,0;1,0]; and the same matrix a (one line in other) 
> > it should be 4 knots, but numKnots returns 1
> > PozdrawiAM -
> > Andrzej
> 
> Hi Andrzej,
> 
> Thanks for pointing this out. Indeed there is a bug; however, it turns out 
> it's the rules that are not quite right. Any given pair of line segments can 
> intersect at most one time. If a node is sitting directly on a segment, that 
> still counts as just one intersection.
> 
> When we wrote the bullet point "A node sitting directly on a line counts as 
> two knots" we must have been thinking about the example in the rules where 
> each node is connected to two other nodes. In that specific case, the 
> statement makes more sense but it is not correct in general.
> 
> Hope this helps.
> 
> Regards,
> David
> MATLAB Contest Team 
Hi David,
Thanks for your answer. I agree for my 1st example - it should be 1 knot (I interpreted the rules literally), but for the second I'm  not sure it's only one knot - for me it is rather infinity knots.
PozdrawiAM 
Andrzej