473,386 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Duplicate Guid

Does anybody know the odds of generating a duplicate guid?

--
Jay Douglas
http://jaydouglas.com

Nov 17 '05 #1
16 4363
Jay,

You probably have better odds at winning the lottery. Seriously.

What is your concern?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jay Douglas" <ja****************@squarei.com> wrote in message
news:OH**************@TK2MSFTNGP14.phx.gbl...
Does anybody know the odds of generating a duplicate guid?

--
Jay Douglas
http://jaydouglas.com

Nov 17 '05 #2
Just wondering ... just candy for the mind.

I've heard someone say the odds are about the same as winning the Texas
lottery 32 times.

I was just hoping a formula or a number.

I slept though statistics, so I can't come up with a good answer.

--
Jay Douglas
http://jaydouglas.com
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:O8**************@TK2MSFTNGP14.phx.gbl...
Jay,

You probably have better odds at winning the lottery. Seriously.

What is your concern?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jay Douglas" <ja****************@squarei.com> wrote in message
news:OH**************@TK2MSFTNGP14.phx.gbl...
Does anybody know the odds of generating a duplicate guid?

--
Jay Douglas
http://jaydouglas.com


Nov 17 '05 #3
Probably not possible. Two computers would have to be built as exactly the
same time, have the same MAC address (normally impossible), and generate a
GUID at exactly the same time. (Actually, I vaguely remember that MS doesn't
use the MAC address anymore, but I may be mistaken.)

--
Jonathan Allen
"Jay Douglas" <ja****************@squarei.com> wrote in message
news:OH**************@TK2MSFTNGP14.phx.gbl...
Does anybody know the odds of generating a duplicate guid?

--
Jay Douglas
http://jaydouglas.com

Nov 17 '05 #4
Jay,

I remember reading something that said you had to generate 1000 new
GUIDs per second for the next 5000 years in order to come across a duplicate
(or something like that).

I wouldn't worry =)
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jay Douglas" <ja****************@squarei.com> wrote in message
news:Om**************@TK2MSFTNGP12.phx.gbl...
Just wondering ... just candy for the mind.

I've heard someone say the odds are about the same as winning the Texas
lottery 32 times.

I was just hoping a formula or a number.

I slept though statistics, so I can't come up with a good answer.

--
Jay Douglas
http://jaydouglas.com
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:O8**************@TK2MSFTNGP14.phx.gbl...
Jay,

You probably have better odds at winning the lottery. Seriously.

What is your concern?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jay Douglas" <ja****************@squarei.com> wrote in message
news:OH**************@TK2MSFTNGP14.phx.gbl...
Does anybody know the odds of generating a duplicate guid?

--
Jay Douglas
http://jaydouglas.com



Nov 17 '05 #5
Okay math wizards, a Guid is 32 hexidecimal digits.

Each digit can be A-F or 0-9 which amounts to 16.

so, 32 possiblities of 16 characters .. what's the formula

--
Jay Douglas
http://jaydouglas.com
"Jonathan Allen" <x@x.x> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Probably not possible. Two computers would have to be built as exactly the
same time, have the same MAC address (normally impossible), and generate a
GUID at exactly the same time. (Actually, I vaguely remember that MS
doesn't use the MAC address anymore, but I may be mistaken.)

--
Jonathan Allen
"Jay Douglas" <ja****************@squarei.com> wrote in message
news:OH**************@TK2MSFTNGP14.phx.gbl...
Does anybody know the odds of generating a duplicate guid?

--
Jay Douglas
http://jaydouglas.com


Nov 17 '05 #6
Let's make this simpler. It's a 128 bit number, which means that there
are 2^128 possibilities. That turns out to be:

3.4028236692093846346337460743177e+38

That's a large number.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jay Douglas" <ja****************@squarei.com> wrote in message
news:Ou**************@TK2MSFTNGP15.phx.gbl...
Okay math wizards, a Guid is 32 hexidecimal digits.

Each digit can be A-F or 0-9 which amounts to 16.

so, 32 possiblities of 16 characters .. what's the formula

--
Jay Douglas
http://jaydouglas.com
"Jonathan Allen" <x@x.x> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Probably not possible. Two computers would have to be built as exactly
the same time, have the same MAC address (normally impossible), and
generate a GUID at exactly the same time. (Actually, I vaguely remember
that MS doesn't use the MAC address anymore, but I may be mistaken.)

--
Jonathan Allen
"Jay Douglas" <ja****************@squarei.com> wrote in message
news:OH**************@TK2MSFTNGP14.phx.gbl...
Does anybody know the odds of generating a duplicate guid?

--
Jay Douglas
http://jaydouglas.com



Nov 17 '05 #7
Nicholas Paldino [.NET/C# MVP] wrote:
Jay,

I remember reading something that said you had to generate 1000 new
GUIDs per second for the next 5000 years in order to come across a duplicate
(or something like that).

I wouldn't worry =)

Which would be the same as 1 million new GUIDs per second for the next 5 years,
or 1 billion per second for the next couple of days, would it not? If it's that
easy, I would worry.

-rick-
Nov 17 '05 #8
SP
"Jay Douglas" <ja****************@squarei.com> wrote in message
news:OH**************@TK2MSFTNGP14.phx.gbl...
Does anybody know the odds of generating a duplicate guid?

--
Jay Douglas
http://jaydouglas.com

Better than the odds of an incrementing numeric counter generating a
duplicate number.

SP
Nov 17 '05 #9
I thought its a combination of MAC address and current clock
tick(Year-Month-Day-HH:MM:SS:millisecond). So, probablility of getting a
duplicate is virtually 0.
"Jonathan Allen" wrote:
Probably not possible. Two computers would have to be built as exactly the
same time, have the same MAC address (normally impossible), and generate a
GUID at exactly the same time. (Actually, I vaguely remember that MS doesn't
use the MAC address anymore, but I may be mistaken.)

--
Jonathan Allen
"Jay Douglas" <ja****************@squarei.com> wrote in message
news:OH**************@TK2MSFTNGP14.phx.gbl...
Does anybody know the odds of generating a duplicate guid?

--
Jay Douglas
http://jaydouglas.com


Nov 17 '05 #10
but you can never be sure. since the guid is generated using a hashfunction
of the values you mentioned, errors in the implemention of the hashfunction
can lead to duplicated guids.

"Ravi Shankar" <Ravi Sh*****@discussions.microsoft.com> schrieb im
Newsbeitrag news:DF**********************************@microsof t.com...
I thought its a combination of MAC address and current clock
tick(Year-Month-Day-HH:MM:SS:millisecond). So, probablility of getting a
duplicate is virtually 0.
"Jonathan Allen" wrote:
Probably not possible. Two computers would have to be built as exactly the same time, have the same MAC address (normally impossible), and generate a GUID at exactly the same time. (Actually, I vaguely remember that MS doesn't use the MAC address anymore, but I may be mistaken.)

--
Jonathan Allen
"Jay Douglas" <ja****************@squarei.com> wrote in message
news:OH**************@TK2MSFTNGP14.phx.gbl...
Does anybody know the odds of generating a duplicate guid?

--
Jay Douglas
http://jaydouglas.com


Nov 17 '05 #11
I thought that MS stopped using the MAC address to create the guids since
the cheaper NIC cards were producing duplicate MAC addresses at an alarming
rate.

--
Jay Douglas
http://jaydouglas.com
"cody" <de********@gmx.de> wrote in message
news:eB**************@TK2MSFTNGP09.phx.gbl...
but you can never be sure. since the guid is generated using a
hashfunction
of the values you mentioned, errors in the implemention of the
hashfunction
can lead to duplicated guids.

"Ravi Shankar" <Ravi Sh*****@discussions.microsoft.com> schrieb im
Newsbeitrag news:DF**********************************@microsof t.com...
I thought its a combination of MAC address and current clock
tick(Year-Month-Day-HH:MM:SS:millisecond). So, probablility of getting a
duplicate is virtually 0.
"Jonathan Allen" wrote:
> Probably not possible. Two computers would have to be built as exactly the > same time, have the same MAC address (normally impossible), and
> generate a > GUID at exactly the same time. (Actually, I vaguely remember that MS doesn't > use the MAC address anymore, but I may be mistaken.)
>
> --
> Jonathan Allen
>
>
> "Jay Douglas" <ja****************@squarei.com> wrote in message
> news:OH**************@TK2MSFTNGP14.phx.gbl...
> > Does anybody know the odds of generating a duplicate guid?
> >
> > --
> > Jay Douglas
> > http://jaydouglas.com
> >
> >
> >
>
>
>


Nov 17 '05 #12
Nicholas,

Well put!

Taught me a little about coming up with the possibilities using the bit^2
deal too.

Thanks again.

--
Jay Douglas
http://jaydouglas.com
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:OZ**************@TK2MSFTNGP09.phx.gbl...
Let's make this simpler. It's a 128 bit number, which means that there
are 2^128 possibilities. That turns out to be:

3.4028236692093846346337460743177e+38

That's a large number.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jay Douglas" <ja****************@squarei.com> wrote in message
news:Ou**************@TK2MSFTNGP15.phx.gbl...
Okay math wizards, a Guid is 32 hexidecimal digits.

Each digit can be A-F or 0-9 which amounts to 16.

so, 32 possiblities of 16 characters .. what's the formula

--
Jay Douglas
http://jaydouglas.com
"Jonathan Allen" <x@x.x> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Probably not possible. Two computers would have to be built as exactly
the same time, have the same MAC address (normally impossible), and
generate a GUID at exactly the same time. (Actually, I vaguely remember
that MS doesn't use the MAC address anymore, but I may be mistaken.)

--
Jonathan Allen
"Jay Douglas" <ja****************@squarei.com> wrote in message
news:OH**************@TK2MSFTNGP14.phx.gbl...
Does anybody know the odds of generating a duplicate guid?

--
Jay Douglas
http://jaydouglas.com




Nov 17 '05 #13
MAC addresses aren't used any more to generate GUID's.

Willy.

"Jonathan Allen" <x@x.x> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Probably not possible. Two computers would have to be built as exactly the
same time, have the same MAC address (normally impossible), and generate a
GUID at exactly the same time. (Actually, I vaguely remember that MS
doesn't use the MAC address anymore, but I may be mistaken.)

--
Jonathan Allen
"Jay Douglas" <ja****************@squarei.com> wrote in message
news:OH**************@TK2MSFTNGP14.phx.gbl...
Does anybody know the odds of generating a duplicate guid?

--
Jay Douglas
http://jaydouglas.com


Nov 17 '05 #14

"Jay Douglas" <ja****************@squarei.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I thought that MS stopped using the MAC address to create the guids since
the cheaper NIC cards were producing duplicate MAC addresses at an alarming
rate.

--
Jay Douglas
http://jaydouglas.com


That's right, microsoft doesn't use the DCE algorithm on NT based systems
(since NT4 SP4), but the reason was a bit of "privacy paranoia", people
didn't like to give away their MAC addresses through a GUID.

Willy.
Nov 17 '05 #15
Willy Denoyette [MVP] wrote:
"Jay Douglas" <ja****************@squarei.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I thought that MS stopped using the MAC address to create the guids since
the cheaper NIC cards were producing duplicate MAC addresses at an alarming
rate.

--
Jay Douglas
http://jaydouglas.com

That's right, microsoft doesn't use the DCE algorithm on NT based systems
(since NT4 SP4), but the reason was a bit of "privacy paranoia", people
didn't like to give away their MAC addresses through a GUID.

Willy.


Is the algorithm MS uses to create a GUID published somewhere?

-Mark
Nov 17 '05 #16

"Mark Rance" <sp******@nomail.com> wrote in message
news:z7********************@pcisys.net...
Willy Denoyette [MVP] wrote:
"Jay Douglas" <ja****************@squarei.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I thought that MS stopped using the MAC address to create the guids since
the cheaper NIC cards were producing duplicate MAC addresses at an
alarming rate.

--
Jay Douglas
http://jaydouglas.com

That's right, microsoft doesn't use the DCE algorithm on NT based systems
(since NT4 SP4), but the reason was a bit of "privacy paranoia", people
didn't like to give away their MAC addresses through a GUID.

Willy.


Is the algorithm MS uses to create a GUID published somewhere?

-Mark


..NET uses RNGCryptoServiceProvider which is a wrapper over the cryptographic
pseudorandom number generator inside CryptoAPI which in turn calls Win32's
API CryptGenRandom().Note that COM uses the same Win32 API but now through
CoCreateGuid().
I don't know the exact algorithm used by CryptGenRandom() and I don't think
it's a trade secret so I would suggest you to ask MSFT for details by
sending a mail to Brian LaMacchia ba*@microsoft.com

Willy.


Nov 17 '05 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Robert Chapman | last post by:
I know that this should be impossible, yet it is happening... I have some c# code that uses a method scoped variable of type Guid. The code assigns Guid.NewGuid() to the variable. This value is...
14
by: Nak | last post by:
Hi there, Does anyone know how I would get the value of the assembly GUID in code from within the same application? Thanks in advance. Nick. --...
5
by: rcolby | last post by:
Evening, Wondering if someone can point me in the right direction, on how I would compare a system.guid with a system.byte. system.guid (pulled from sql server table with a data type of...
4
by: Doug Bell | last post by:
Hi, I have been having problems getting a Project to reference another project in as VS Solution. I believe that the reason the reference is not accepted is because another project that is...
5
by: Michael Primeaux | last post by:
I have a simple .NET 2.0 web service created with VS.NET 2005 with a single web method with the following signature: void HelloWorld(Guid parameter1); When calling this method I receive the...
2
by: Troll | last post by:
Windows XP Pro VS 2005 & C# (I'm fairly new to C# but have doing VB.Net going on 2yrs and VB6 for 5yrs.) I'm using C# to build a custom RSS generator. I'm having trouble building the guid...
1
by: Jeff | last post by:
ASP.NET 2.0 This problem occur using the basic version of SQL Server 2005 which get installed when installing Visual Studio 2005! I have inserted a record in the Test table. But when I try to...
3
by: sloan | last post by:
I know a Dictionary < TKey, TValue does not allow duplicate keys. System.Collections.Generic.Dictionary<Guid, Guidtest = new System.Collections.Generic.Dictionary<Guid, Guid>(); //duplicate key...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.