# How can we make replication of elements in a normal graph?

Page 1 of 1

## 11 Replies - 862 Views - Last Post: 17 May 2016 - 03:19 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'https://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=393398&amp;s=ebbb1c3a8f2308962a294f05fb35a9a9&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 flash driver

Reputation: 0
• Posts: 8
• Joined: 17-May 16

# How can we make replication of elements in a normal graph?

Posted 17 May 2016 - 02:35 PM

``` I am building a graph which should allow the repetition of elements's value. Replication should occur for each elements in graph. now my question is how can we implement the graph in order to allow duplication in a graph?
```

Is This A Good Question/Topic? 0

## Replies To: How can we make replication of elements in a normal graph?

### #2 NormR

• D.I.C Lover

Reputation: 814
• Posts: 6,248
• Joined: 25-December 13

## Re: How can we make replication of elements in a normal graph?

Posted 17 May 2016 - 02:38 PM

Do you have any java programming questions?

### #3 flash driver

Reputation: 0
• Posts: 8
• Joined: 17-May 16

## Re: How can we make replication of elements in a normal graph?

Posted 17 May 2016 - 02:41 PM

i have to make the implementation in java but i am seraching for any idea for the moment how to fix this thing

### #4 modi123_1

• Suitor #2

Reputation: 15677
• Posts: 62,769
• Joined: 12-June 08

## Re: How can we make replication of elements in a normal graph?

Posted 17 May 2016 - 02:42 PM

It's a graph. I'm not certain how you are not able to do that sine the 'node' object just has a list of connections to other nodes.. fairly independent of the actual node value.

### #5 flash driver

Reputation: 0
• Posts: 8
• Joined: 17-May 16

## Re: How can we make replication of elements in a normal graph?

Posted 17 May 2016 - 02:48 PM

You mean to create a Object to store the unique label and its value?? is this a correct solution?

### #6 modi123_1

• Suitor #2

Reputation: 15677
• Posts: 62,769
• Joined: 12-June 08

## Re: How can we make replication of elements in a normal graph?

Posted 17 May 2016 - 02:51 PM

It would make sense in a tree.. you have a value and a series of children nodes.. in a graph you explained you would be worrying less the value and more of the connections.

### #7 flash driver

Reputation: 0
• Posts: 8
• Joined: 17-May 16

## Re: How can we make replication of elements in a normal graph?

Posted 17 May 2016 - 02:56 PM

lets take an example. the value 5 is in the graphand connected with value 6. now we replicate the value 5 and 6 and now we have 2 object with value 5 and value 6 which each 5 is connected with both 6 object. the standart graph normaly does not allow this duplication. idea is to have 2 different nodes with same value and same connection.

### #8 macosxnerd101

• Games, Graphs, and Auctions

Reputation: 12737
• Posts: 45,923
• Joined: 27-December 08

## Re: How can we make replication of elements in a normal graph?

Posted 17 May 2016 - 03:00 PM

It does not make sense to have multiple vertices with the same label. I don't see any problem with non-distinct values. Do you understand the difference between these concepts?

Out of curiosity, what is the end result you are trying to achieve, rather than the narrow question you are asking in your OP?

### #9 flash driver

Reputation: 0
• Posts: 8
• Joined: 17-May 16

## Re: How can we make replication of elements in a normal graph?

Posted 17 May 2016 - 03:08 PM

an idea, a pseudocode to implement such thing. i have 1 task similar to implement in an exercise in analysis of algorithms course.

### #10 macosxnerd101

• Games, Graphs, and Auctions

Reputation: 12737
• Posts: 45,923
• Joined: 27-December 08

## Re: How can we make replication of elements in a normal graph?

Posted 17 May 2016 - 03:10 PM

That's not very enlightening or helpful...

Regardless, I wish you the best of luck in your search for a solution.

### #11 flash driver

Reputation: 0
• Posts: 8
• Joined: 17-May 16

## Re: How can we make replication of elements in a normal graph?

Posted 17 May 2016 - 03:14 PM

i thought that this is a forum to help you when facing problems. i am not asking any ready code.. just a hint , an idea.
besides thanks a lot for you grateful answer

### #12 macosxnerd101

• Games, Graphs, and Auctions

Reputation: 12737
• Posts: 45,923
• Joined: 27-December 08

## Re: How can we make replication of elements in a normal graph?

Posted 17 May 2016 - 03:19 PM

I've made a couple replies trying to point you in the right direction. One in my tutorial, and the other above:

macosxnerd101, on 17 May 2016 - 06:00 PM, said:

It does not make sense to have multiple vertices with the same label. I don't see any problem with non-distinct values. Do you understand the difference between these concepts?

Out of curiosity, what is the end result you are trying to achieve, rather than the narrow question you are asking in your OP?

The reason I asked about your end goal was to better direct you. But you're being very tight-lipped about your goal. So it's hard to tell where your misconceptions end, and where the assignment begins. As I said, I wish you the best of luck in searching for a solution. However, you're not really engaging with us, and I don't have any interest in playing twenty questions to pry details.