Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6814501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:41:47+00:00 2026-05-26T20:41:47+00:00

Let me preface this question by stating that I’m not a C# developer. I’m

  • 0

Let me preface this question by stating that I’m not a C# developer. I’m a C developer by trade and choice. But I have to use Visual C# for a class I’m taking.

I’ve been reading up on the differences between cryptographically secure pseudorandom number generators and System.Random. Everyone seems pretty clear that RNGCryptoServiceProvider is much more strongly random, but also slower.

For our algorithm in a group project we’ll be using 3 random nodes out of a given (fixed) list, as many times as we can in 25 seconds, to score edges on paths between them.

In order for our algorithm to be “complete” we need to be sure that every node will get picked as close to the same number of times as every other node. In order for our algorithm to be “optimal” (or as close as possible, since we’re ok with approximation) we need to do the scoring pass as many times as possible within that 25 second (or any other arbitrary) deadline.

Given that we’ll be using a single instance of Random, but that we’ll be running a loop that will call Random.Next() 3 times in rapid succession, and which will repeat as many times as possible, will Random produce a reasonably uniform distribution? Or will we need to incur the extra cost of RNGCryptoServiceProvider to ensure we don’t have any nodes that get skipped over completely?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:41:47+00:00Added an answer on May 26, 2026 at 8:41 pm

    Random will produce a uniform distribution. The problem with Random is that it’s somewhat predictable – from a few random numbers you can deduce the rest of the random number stream. Since this isn’t a problem for you, and you’re only worried about uniform distribution, Random should be enough.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First off, let me preface this question by stating that I'm really a pretty
Let me preface the question by stating that I'm not a programmer and am
Let me preface this question with first stating that I'm new to GUI interfaces:
Let me preface this question by stating that i don't usually condone the practice
Let me preface this question by saying that I am a .NET developer at
Let me preface this question by saying I use TextMate on Mac OSX for
So let me preface this by saying that I'm not an SQL wizard by
Let me preface this by saying that I'm pretty new to Java. I have
Ok guys, let me preface my question with this, This is not a technical
First let me preface this question by saying that I'm fairly new to Javascript.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.