Chance of two objects with same ID?

Just out of crazy/mathematical curiosity. I suppose Object-IDs are assigned randomly, but even so, there would be a chance of two objects getting the same ID.
Has anyone at McNeel calculated it? Is this situation somehow “protected”?

They look like GUIDs this link explains.
https://guidgenerator.com/online-guid-generator.aspx

Mark

What are the chanses of you finding a unique pattern in the sand at the shore one morning?

Exactly one. (1).

Many people would respond: - “Huh?”

But whether that fact has any relevance to your question is a completely different question. :slight_smile:

// Rolf

I think that is not (entirely) true.

Cool…

How unique is a GUID?

128-bits is big enough and the generation algorithm is unique enough that if 1,000,000,000 GUIDs per second were generated for 1 year the probability of a duplicate would be only 50%. Or if every human on Earth generated 600,000,000 GUIDs there would only be a 50% probability of a duplicate.

So THERE IS A CHANCE…

It is exactly true. Go down to the beach and see for yourself. It’s true. Every single morning.

Yes, ponder on that one. :slight_smile:

Edit: Perhaps my wording is a bit ambiguous. A more precise wording could be:
"What are the chanses of you finding a the unique pattern in the sand at the shore one this morning?

// Rolf

Maths say it is not.

The chances to find the pattern in the sand which you find this morning is exactly one (1).

// Rolf

There indeed is a chance, but it is so infitesmally small that these are considered to be unique.

As the numbers say you have to generate a shitload (professional term) of IDs to generate a collision.

1 Like

My curiosity (wouldn’t waste your time on workdays) comes out of the what if…
There IS a chance. Does McNeel know what would happen if…?

how high are the chances to meat your evil twin? :smiley:
anyway somehow i cant understand what this means

50% of what? i am dumb i know it, but it still sounds a lot or how do i interpret 50% here?

It’s quite simple - like the chances of winning any lottery are 50% - you either win or not.

3 Likes

Ah, if life were that simple!

1 Like

It means that if a large number of systems each generated 1,000,000,000 GUIDs per second for 1 year than about 50% of the systems would generate a duplicate pair.

1 Like

one way to see it is…
generate two lists of GUIDs… each list contains:
31,536,000,000,000,000 IDs :astonished:
statistically speaking, one list will contain one set of duplicates… the other won’t.


edit-
heh, and i doubt there have even been that amount of objects ever created in Rhino… all installs, all versions, all users… combined :smiley:

2 Likes

It’s more complicated.
Generate two lists and the probabilities are
neither list has duplicates 25%
one list has duplicates 50%
both lists have duplicates 25%

Generate 3 lists and the probabilities are"
0 list with duplicates 1/8
1 list with duplicates 3/8
2 lists with duplicates 3/8
3 lists with duplicates 1/8

Generate 4 lists and the probabilities are:
0 lists with duplicates 1/16
1 list with duplicates 4/16
2 lists with duplicates 6/16
3 lists with duplicates 4/16
4 lists with duplicates 1/16

1 Like

Actually, all you guys are just discussing hypothetical possibilities of something that will never happen. Why? Because Rhino is programmed to check for dup ID’s and change one of them. It’s easy enough to check if you try a scenario you probably all do every day.

  1. Open two new instances of Rhino
  2. In the first instance, create an object, go into Properties and copy its GUID
  3. Ctrl+C to copy the object
  4. In the second instance, Ctrl+V to paste the object
  5. Check the GUID in the second instance, it will be the same as the first
  6. In the second instance Ctrl+C to copy the pasted object
  7. Paste it back into the first instance
  8. Check the GUID of the pasted object - it will have changed.

Also, even with the incredibly remote possibility that for some reason duplicate GUIDs got made, what then? Maybe Rhino might crash or the file with the dupe ID get corrupted. It’ll just be one of those mysterious once in a million year things, you will never actually know what happened…

–Mitch

3 Likes

because
nerds
:nerd_face:

2 Likes

all this talks about chances,made me think deep into Ti…

Just for the sake of precision: generating a duplicate is improbable (highly so), but not impossible.

1 Like