Re: [TF-PP] Worked examples of cardinality for :p{2} and :p+

From: Birte Glimm <birte.glimm@comlab.ox.ac.uk>
Date: Thu, 3 Jun 2010 16:17:15 +0100
Message-ID: <AANLkTimtIVj-fInu6oO7OOUvjkDvdb-xW38SIFzvHokH@mail.gmail.com>
To: Andy Seaborne <andy.seaborne@talis.com>
Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
```On 3 June 2010 12:38, Andy Seaborne <andy.seaborne@talis.com> wrote:
>
>
> On 03/06/2010 12:20, Birte Glimm wrote:
>>>>>
>>>>> :a :p :b .
>>>>> >>>  :b :p :z .
>>>>> >>>  :a :p :c .
>>>>> >>>  :c :p :z .
>>>>> >>>  :c :p :c .
>>>>> >>>
>>>>> >>>  Pattern: { :a :p+ ?z }
>>>>> >>>  ?z=:b
>>>>> >>>  ?z=:c
>>>>> >>>  ?z=:z
>>>>
>>>> >>
>>>> >>  with edge marking:
>>>> >>  b, c, c, z, z
>>

Sorry, my fault. I was drawing the graph on paper and put the loop at
the z node instead of at the c node, so I agree with your solution
when the loop is at c.

Birte

>> disagree: b, c, z, z, z
>> c is always just once, but z occurs three times with edge marking no
>> unwind, and four times with unwind. Without unwind it tells you
>> something about the graph, i.e., there are three edges going to :z.
>> Unwinding makes you go round the loop twice, once for each way you
>> reached :z.
>
> :a :p :b .
> :b :p :z .
> :a :p :c .
> :c :p :z .
> :c :p :c
>
> There are two edges into :z, from :b and :c and there are two edges into :c,
> from :a and :b which is how I got 2 c's and 2 z's.
>
>        Andy
>

--
Dr. Birte Glimm, Room 306
Computing Laboratory