MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Integers networks

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82292] RE: [mg82246] Integers networks
  • From: frusso at micron.com
  • Date: Wed, 17 Oct 2007 03:57:04 -0400 (EDT)
  • References: <200710160726.DAA08777@smc.vnet.net> <0E6AB70B-AD6A-4B41-A7EF-1DDEBC98D4ED@wolfram.com>

Fred thanks
It works. Please can you exaplin me better the following command? It is
a function that for each number give the prime factor. But I didin't
understand how it works.

Flatten@Array[Thread[Rule[#, FactorInteger[#][[All, 1]]]] &, i]

Thanks.  Felice


-----Original Message-----
From: Fred Meinberg [mailto:fredm at wolfram.com]
Sent: Tuesday, October 16, 2007 10:18 AM
To: frusso
Cc: mathgroup at smc.vnet.net
Subject: [mg82292] Re: [mg82246] Integers networks

try

graph[i_] := Flatten@Array[Thread[Rule[#, FactorInteger[#][[All, 1]]]]
&, i]

a nice visualization is:

Manipulate[GraphPlot[graph[i], SelfLoopStyle -> None], {i, 1, 100, 1}]

On Oct 16, 2007, at 3:26 AM, Felice Russo wrote:

> Hi
> This is my first post in this forum.
> I would like to generate a graph where each node is an integer number
> and the edges the prime factors. For example the node 10 and
> 2 will have an edge as also the nodes 10 and 5 being 2 and 5 the prime

> factors of 10.
> And so on....
> I know that I can generate the graph by using the adjacent matrix but
> I think that there should be a more smart and easy method. Can you
> help me?
>
> Thanks.  Felice



  • Prev by Date: Re: Integers networks
  • Next by Date: Re: Integrate question
  • Previous by thread: Re: Integers networks
  • Next by thread: Re: Integers networks