MathGroup Archive 2007

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

Search the Archive

Re: Integers networks

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82319] Re: Integers networks
  • From: Yaroslav Bulatov <yaroslavvb at gmail.com>
  • Date: Wed, 17 Oct 2007 04:11:00 -0400 (EDT)
  • References: <ff1pka$8up$1@smc.vnet.net>

On Oct 16, 12:35 am, Felice Russo <fru... at micron.com> 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

Using adjacency matrix is the easiest method I can think of

For a graph of first 100 numbers:

GraphPlot[
   Array[If[#1 > 1 && #2 > 1 && Mod[#1, #2] == 0, 1, 0] &, {#, #}],
   VertexLabeling -> True] &@100



  • Prev by Date: Re: Releasing several Holds simultaneously
  • Next by Date: Re: Integers networks
  • Previous by thread: RE: Integers networks
  • Next by thread: ColorData etc.