half Of Raul Miller
>> Sent: donderdag 25 augustus 2016 23:21
>> To: Programming forum
>> Subject: Re: [Jprogramming] determine the cycle
>>
>> I am more than willing to believe that I have been careless and made a
>> mistake. I'm actually pretty talented at makin
> R.E. Boss
> >
> >
> >> -Original Message-
> >> From: Programming [mailto:programming-
> boun...@forums.jsoftware.com]
> >> On Behalf Of Raul Miller
> >> Sent: donderdag 25 augustus 2016 15:36
> >> To: Programming f
;>> ;{.(3 :('''x y''=.y'; '(y-.t{y);~ x,({:x)-.~y{~t=.1 i.~ y e.~"1
>>> {:x'))^:(#@>@{:) ({.;}.) edges
>>> 1 2 4 5 6 7 8 9 10 11 12 13 24 25 26 23 16 15 14 22 21 20 19 18 17 3 1
>>>
>>>
>>>
ogramming-boun...@forums.jsoftware.com]
>> On Behalf Of Raul Miller
>> Sent: donderdag 25 augustus 2016 15:36
>> To: Programming forum
>> Subject: Re: [Jprogramming] determine the cycle
>>
>> Oops, I represented the vertices incorrectly ({."1 would only be
;@{:) ({.;}.) edges
>> 1 2 4 5 6 7 8 9 10 11 12 13 24 25 26 23 16 15 14 22 21 20 19 18 17 3 1
>>
>>
>> R.E. Boss
>>
>>
>>> -Original Message-----
>>> From: Programming [mailto:programming-boun...@forums.jsoftware.com]
>>> On Behalf Of Ra
traversed in the order they are encountered.
>>
>> Thanks,
>>
>> --
>> Raul
>>
>>
>> On Thu, Aug 25, 2016 at 8:36 AM, 'Jon Hough' via Programming
>> wrote:
>> > Raul,
>> >
>> > your solution seems to miss out
2 4 5 6 7 8 9 10 11 12 13 24 25 26 23 16 15 14 22 21 20 19 18 17 3 1
R.E. Boss
> -Original Message-
> From: Programming [mailto:programming-boun...@forums.jsoftware.com]
> On Behalf Of Raul Miller
> Sent: donderdag 25 augustus 2016 15:36
> To: Programming forum
> Subje
Pardon the interruption, but are you taking advantage of the well known
depth first search, rooted tree growing search that produces a complete
basis for all cycles in a connected graph? From there you can go on to
various exchange system (matroids) if you've a mind to. There's a lot of
work done a
t some vertices and duplicates others.
>
>
>
> On Thu, 8/25/16, Raul Miller wrote:
>
> Subject: Re: [Jprogramming] determine the cycle
> To: "Programming forum"
> Date: Thursday, August 25, 2016, 9:07 PM
>
> Best I can come up with
> is
>
>
By the way, this does not seem to be a cycle in the original graph.
On Thu, 8/25/16, Louis de Forcrand wrote:
Subject: Re: [Jprogramming] determine the cycle
To: programm...@jsoftware.com
Date: Thursday, August 25, 2016, 10:26 PM
I was just wonderi
gt; Sent: donderdag 25 augustus 2016 13:23
>> To: Programming forum
>> Subject: Re: [Jprogramming] determine the cycle
>>
>> That is not a cycle.
>>
>> (1+i.26) -. {."1 edges
>> 8 19 24
>>
>> --
>> Raul
>>
>>
>>
As usual, a minor typo:
Since cl finds only the shortest cycles (which are all the same length), I
added and >@
to the first {:”1. That’s why the result is unboxed. However cls deliberately
doesn’t
have this, as its results may be of different lengths.
Here they are again in case I copied the wr
Raul,
your solution seems to miss out some vertices and duplicates others.
On Thu, 8/25/16, Raul Miller wrote:
Subject: Re: [Jprogramming] determine the cycle
To: "Programming forum"
Date: Thursday, August 25, 2016, 9:07 PM
Best
Got this:
cl=: [: {:"1 ] ([: ; lp&.>/"1)@]^:(*./@:~: {:@>@{:"1)^:_ lp
lp=: [ ((-. (,: |.)@(_2&{.)) ; ])"2 1 ] ,"1 0 {:"1@[ {~ {:@] I.@:=
{."1@[
Not particularly elegant or concise, but it works (G -: edges):
((, |."1) G) cl 1
1 2 4 5 6 7 8 9 10 11 12 13
Best I can come up with is
{."1 ((] , -. {~ {.@I.@(-. +./"1@e. {:@]))^:(<:@#@[) ,:@{.) edges
1 3 17 18 18 20 20 21 22 14 15 16 23 26 25 13 12 11 11 10 9 7 6 5 4 2
Change {.@I. to {:@I. if you want things in the other order.
--
Raul
programming-boun...@forums.jsoftware.com]
> On Behalf Of Raul Miller
> Sent: donderdag 25 augustus 2016 13:23
> To: Programming forum
> Subject: Re: [Jprogramming] determine the cycle
>
> That is not a cycle.
>
>(1+i.26) -. {."1 edges
> 8 19 24
>
> --
>
That is not a cycle.
(1+i.26) -. {."1 edges
8 19 24
--
Raul
On Thu, Aug 25, 2016 at 6:13 AM, R.E. Boss wrote:
> Given the edges in a graph which is a cycle, like
>edges
> 1 2
> 3 1
> 2 4
> 4 5
> 5 6
> 6 7
> 7 8
> 9 8
> 10 9
> 11 10
> 11 12
> 12 13
> 14 15
> 15 16
> 17
Given the edges in a graph which is a cycle, like
edges
1 2
3 1
2 4
4 5
5 6
6 7
7 8
9 8
10 9
11 10
11 12
12 13
14 15
15 16
17 3
18 17
18 19
20 19
20 21
21 22
22 14
16 23
13 24
25 24
26 25
23 26
Vertices of the graph are represented by >:i.26
Question is how to determine in an
18 matches
Mail list logo